package internal

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

Package internal contains functions/structs shared by xds balancers/resolvers.

Index

Constants

const XDSClientID = clientID("xdsClientID")

XDSClientID is the attributes key used to pass the address of the xdsClient object shared between the resolver and the balancer. The xdsClient object is created by the resolver and passed to the balancer.

Types

type LocalityID

type LocalityID struct {
	Region  string `json:"region,omitempty"`
	Zone    string `json:"zone,omitempty"`
	SubZone string `json:"subZone,omitempty"`
}

LocalityID 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.

func LocalityIDFromString

func LocalityIDFromString(s string) (ret LocalityID, _ error)

LocalityIDFromString converts a json representation of locality, into a LocalityID struct.

func (LocalityID) ToString

func (l LocalityID) ToString() (string, error)

ToString generates a string representation of LocalityID by marshalling it into json. Not calling it String() so printf won't call it.

Source Files

internal.go

Directories

PathSynopsis
xds/internal/balancerPackage balancer installs all the xds balancers.
xds/internal/balancer/balancergroupPackage balancergroup implements a utility struct to bind multiple balancers into one balancer.
xds/internal/balancer/cdsbalancerPackage cdsbalancer implements a balancer to handle CDS responses.
xds/internal/balancer/edsbalancerPackage edsbalancer contains EDS balancer implementation.
xds/internal/balancer/lrsPackage lrs implements load reporting balancer for xds.
xds/internal/balancer/orcaPackage orca implements Open Request Cost Aggregation.
xds/internal/balancer/priorityPackage priority implements the priority balancer.
xds/internal/balancer/weightedtargetPackage weightedtarget implements the weighted_target balancer.
xds/internal/balancer/weightedtarget/weightedaggregatorPackage weightedaggregator implements state aggregator for weighted_target balancer.
xds/internal/balancer/xdsroutingPackage xdsrouting implements the routing balancer for xds.
xds/internal/clientPackage client implementation a full fledged gRPC client for the xDS API used by the xds resolver and balancer implementations.
xds/internal/client/bootstrapPackage bootstrap provides the functionality to initialize certain aspects of an xDS client by reading a bootstrap file.
xds/internal/client/loadPackage load provides functionality to record and maintain load data.
xds/internal/client/tests
xds/internal/client/v2Package v2 provides xDS v2 transport protocol specific functionality.
xds/internal/client/v3Package v3 provides xDS v3 transport protocol specific functionality.
xds/internal/envPackage env acts a single source of definition for all environment variables related to the xDS implementation in gRPC.
xds/internal/resolverPackage resolver implements the xds resolver, that does LDS and RDS to find the cluster to use.
xds/internal/test
xds/internal/testutilsPackage testutils provides utility types, for use in xds tests.
xds/internal/testutils/fakeclientPackage fakeclient provides a fake implementation of an xDS client.
xds/internal/testutils/fakeserverPackage fakeserver provides a fake implementation of the management server.
xds/internal/versionPackage version defines constants to distinguish between supported xDS API versions.
Version
v1.34.2
Published
Mar 12, 2021
Platform
windows/amd64
Imports
2 packages
Last checked
14 minutes ago

Tools for package owners.