package internal

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

Index

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

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

MarshalJSON returns a JSON enconding of l.

func (*LBConfig) UnmarshalJSON

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

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

type Locality struct {
	Region  string
	Zone    string
	SubZone string
}

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 (lamk Locality) String() string

func (Locality) ToProto

func (lamk Locality) ToProto() *basepb.Locality

ToProto convert Locality to the proto representation.

Source Files

const.go internal.go

Directories

PathSynopsis
xds/internal/balancerPackage balancer contains xds balancer implementation.
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.
xds/internal/clientPackage client contains the implementation of the xds client used by grpc-lb-v2.
xds/internal/proto
xds/internal/proto/envoy
xds/internal/proto/envoy/api
xds/internal/proto/envoy/api/v2
xds/internal/proto/envoy/api/v2/auth
xds/internal/proto/envoy/api/v2/auth/cert
xds/internal/proto/envoy/api/v2/cds
xds/internal/proto/envoy/api/v2/cluster
xds/internal/proto/envoy/api/v2/cluster/circuit_breaker
xds/internal/proto/envoy/api/v2/cluster/outlier_detection
xds/internal/proto/envoy/api/v2/core
xds/internal/proto/envoy/api/v2/core/address
xds/internal/proto/envoy/api/v2/core/base
xds/internal/proto/envoy/api/v2/core/config_source
xds/internal/proto/envoy/api/v2/core/grpc_service
xds/internal/proto/envoy/api/v2/core/health_check
xds/internal/proto/envoy/api/v2/core/protocol
xds/internal/proto/envoy/api/v2/discovery
xds/internal/proto/envoy/api/v2/eds
xds/internal/proto/envoy/api/v2/endpoint
xds/internal/proto/envoy/api/v2/endpoint/endpoint
xds/internal/proto/envoy/api/v2/endpoint/load_report
xds/internal/proto/envoy/service
xds/internal/proto/envoy/service/discovery
xds/internal/proto/envoy/service/discovery/v2
xds/internal/proto/envoy/service/discovery/v2/ads
xds/internal/proto/envoy/service/load_stats
xds/internal/proto/envoy/service/load_stats/v2
xds/internal/proto/envoy/service/load_stats/v2/lrs
xds/internal/proto/envoy/type
xds/internal/proto/envoy/type/percent
xds/internal/proto/envoy/type/range
xds/internal/proto/udpa
xds/internal/proto/udpa/data
xds/internal/proto/udpa/data/orca
xds/internal/proto/udpa/data/orca/v1
xds/internal/proto/udpa/data/orca/v1/orca_load_report
xds/internal/proto/udpa/service
xds/internal/proto/udpa/service/orca
xds/internal/proto/udpa/service/orca/v1
xds/internal/proto/udpa/service/orca/v1/orca
xds/internal/proto/validate
xds/internal/resolverPackage resolver implements the xds resolver.
Version
v1.24.0
Published
Sep 25, 2019
Platform
linux/amd64
Imports
5 packages
Last checked
16 minutes ago

Tools for package owners.