package internal
import "google.golang.org/grpc/xds/internal"
Index ¶
- Variables
- type LBConfig
- func (l *LBConfig) MarshalJSON() ([]byte, error)
- func (l *LBConfig) UnmarshalJSON(data []byte) error
- type LoadBalancingConfig
- func (l *LoadBalancingConfig) MarshalJSON() ([]byte, error)
- func (l *LoadBalancingConfig) UnmarshalJSON(data []byte) error
- type Locality
Variables ¶
var ( // GrpcHostname is the metadata key for specifying the grpc service name when sending xDS requests // from grpc to the traffic director. GrpcHostname = "TRAFFICDIRECTOR_GRPC_HOSTNAME" )
Types ¶
type LBConfig ¶
type LBConfig 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 }
LBConfig represents the loadBalancingConfig section of the service config for xDS balancers.
func (*LBConfig) MarshalJSON ¶
MarshalJSON returns a JSON enconding of l.
func (*LBConfig) UnmarshalJSON ¶
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.
type LoadBalancingConfig ¶
type LoadBalancingConfig struct { Name string Config json.RawMessage }
LoadBalancingConfig represents a single load balancing config, stored in JSON format.
func (*LoadBalancingConfig) MarshalJSON ¶
func (l *LoadBalancingConfig) MarshalJSON() ([]byte, error)
MarshalJSON returns a JSON enconding of l.
func (*LoadBalancingConfig) UnmarshalJSON ¶
func (l *LoadBalancingConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON parses the JSON-encoded byte slice in data and stores it in l.
type Locality ¶
Locality is xds.Locality without XXX fields, so it can be used as map keys.
xds.Locality cannot be map keys because one of the XXX fields is a slice.
This struct should only be used as map keys. Use the proto message directly in all other places.
func (Locality) String ¶
func (Locality) ToProto ¶
ToProto convert Locality to the proto representation.
Source Files ¶
const.go internal.go
Directories ¶
- Version
- v1.24.0
- Published
- Sep 25, 2019
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 16 minutes ago –
Tools for package owners.