package balancer

import "google.golang.org/grpc/xds/internal/balancer"

Package balancer contains xds balancer implementation.

Index

Types

type XDSConfig

type XDSConfig struct {
	serviceconfig.LoadBalancingConfig
	// BalancerName represents the load balancer to use.
	BalancerName string
	// ChildPolicy represents the load balancing config for the child
	// policy.
	ChildPolicy *loadBalancingConfig
	// FallBackPolicy represents the load balancing config for the
	// fallback.
	FallBackPolicy *loadBalancingConfig
	// Name to use in EDS query.  If not present, defaults to the server
	// name from the target URI.
	EDSServiceName string
	// 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
}

XDSConfig represents the loadBalancingConfig section of the service config for xDS balancers.

func (*XDSConfig) MarshalJSON

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

MarshalJSON returns a JSON encoding of l.

func (*XDSConfig) UnmarshalJSON

func (l *XDSConfig) 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.

Source Files

config.go xds.go xds_client_wrapper.go xds_old.go

Directories

PathSynopsis
xds/internal/balancer/cdsbalancerPackage cdsbalancer implements a balancer to handle CDS responses.
xds/internal/balancer/edsbalancerPackage edsbalancer implements a balancer to handle EDS responses.
xds/internal/balancer/lrsPackage lrs implements load reporting service for xds balancer.
xds/internal/balancer/orcaPackage orca implements Open Request Cost Aggregation.
Version
v1.26.0
Published
Dec 17, 2019
Platform
windows/amd64
Imports
19 packages
Last checked
1 hour ago

Tools for package owners.