edsbalancer

package
v1.39.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2021 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Package edsbalancer contains EDS balancer implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EDSConfig added in v1.27.0

type EDSConfig struct {
	serviceconfig.LoadBalancingConfig
	// ChildPolicy represents the load balancing config for the child
	// policy.
	ChildPolicy *loadBalancingConfig
	// FallBackPolicy represents the load balancing config for the
	// fallback.
	FallBackPolicy *loadBalancingConfig
	// ClusterName is the cluster name.
	ClusterName string
	// EDSServiceName is the name to use in EDS query. If not set, use
	// ClusterName.
	EDSServiceName string
	// MaxConcurrentRequests is the max number of concurrent request allowed for
	// this service. If unset, default value 1024 is used.
	//
	// Note that this is not defined in the service config proto. And the reason
	// is, we are dropping EDS and moving the features into cluster_impl. But in
	// the mean time, to keep things working, we need to add this field. And it
	// should be fine to add this extra field here, because EDS is only used in
	// CDS today, so we have full control.
	MaxConcurrentRequests *uint32
	// LRS server to send load reports to.  If not present, load reporting
	// will be disabled.  If set to the empty string, load reporting will
	// be sent to the same server that we obtained CDS data from.
	LrsLoadReportingServerName *string
}

EDSConfig represents the loadBalancingConfig section of the service config for EDS balancers.

func (*EDSConfig) MarshalJSON added in v1.27.0

func (l *EDSConfig) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON encoding of l.

func (*EDSConfig) UnmarshalJSON added in v1.27.0

func (l *EDSConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON parses the JSON-encoded byte slice in data and stores it in l. When unmarshalling, we iterate through the childPolicy/fallbackPolicy lists and select the first LB policy which has been registered.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL