package internal
import "google.golang.org/grpc/xds/internal"
Package internal contains functions/structs shared by xds balancers/resolvers.
Index ¶
Functions ¶
func SetLocalityID ¶
func SetLocalityID(addr resolver.Address, l LocalityID) resolver.Address
SetLocalityID sets locality ID in addr to l.
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 GetLocalityID ¶
func GetLocalityID(addr resolver.Address) LocalityID
GetLocalityID returns the locality ID of addr.
func LocalityIDFromString ¶
func LocalityIDFromString(s string) (ret LocalityID, _ error)
LocalityIDFromString converts a json representation of locality, into a LocalityID struct.
func (LocalityID) Equal ¶
func (l LocalityID) Equal(o interface{}) bool
Equal allows the values to be compared by Attributes.Equal.
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 ¶
Path | Synopsis |
---|---|
xds/internal/balancer | Package balancer installs all the xds balancers. |
xds/internal/balancer/cdsbalancer | Package cdsbalancer implements a balancer to handle CDS responses. |
xds/internal/balancer/clusterimpl | Package clusterimpl implements the xds_cluster_impl balancing policy. |
xds/internal/balancer/clustermanager | Package clustermanager implements the cluster manager LB policy for xds. |
xds/internal/balancer/clusterresolver | Package clusterresolver contains EDS balancer implementation. |
xds/internal/balancer/loadstore | Package loadstore contains the loadStoreWrapper shared by the balancers. |
xds/internal/balancer/orca | Package orca implements Open Request Cost Aggregation. |
xds/internal/balancer/outlierdetection | Package outlierdetection provides an implementation of the outlier detection LB policy, as defined in https://github.com/grpc/proposal/blob/master/A50-xds-outlier-detection.md. |
xds/internal/balancer/priority | Package priority implements the priority balancer. |
xds/internal/balancer/ringhash | Package ringhash implements the ringhash balancer. |
xds/internal/clusterspecifier | Package clusterspecifier contains the ClusterSpecifier interface and a registry for storing and retrieving their implementations. |
xds/internal/clusterspecifier/rls | Package rls implements the RLS cluster specifier plugin. |
xds/internal/httpfilter | Package httpfilter contains the HTTPFilter interface and a registry for storing and retrieving their implementations. |
xds/internal/httpfilter/fault | Package fault implements the Envoy Fault Injection HTTP filter. |
xds/internal/httpfilter/rbac | Package rbac implements the Envoy RBAC HTTP filter. |
xds/internal/httpfilter/router | Package router implements the Envoy Router HTTP filter. |
xds/internal/resolver | Package resolver implements the xds resolver, that does LDS and RDS to find the cluster to use. |
xds/internal/server | Package server contains internal server-side functionality used by the public facing xds package. |
xds/internal/test | |
xds/internal/test/e2e | Package e2e implements xds e2e tests using go-control-plane. |
xds/internal/testutils | Package testutils provides utility types, for use in xds tests. |
xds/internal/testutils/fakeclient | Package fakeclient provides a fake implementation of an xDS client. |
xds/internal/testutils/fakeserver | Package fakeserver provides a fake implementation of the management server. |
xds/internal/xdsclient | Package xdsclient implements a full fledged gRPC client for the xDS API used by the xds resolver and balancer implementations. |
xds/internal/xdsclient/bootstrap | Package bootstrap provides the functionality to initialize certain aspects of an xDS client by reading a bootstrap file. |
xds/internal/xdsclient/controller | Package controller contains implementation to connect to the control plane. |
xds/internal/xdsclient/controller/version | Package version defines APIs to deal with different versions of xDS. |
xds/internal/xdsclient/controller/version/v2 | Package v2 provides xDS v2 transport protocol specific functionality. |
xds/internal/xdsclient/controller/version/v3 | Package v3 provides xDS v3 transport protocol specific functionality. |
xds/internal/xdsclient/load | Package load provides functionality to record and maintain load data. |
xds/internal/xdsclient/pubsub | Package pubsub implements a utility type to maintain resource watchers and the updates. |
xds/internal/xdsclient/xdsresource | Package xdsresource contains functions to proto xds updates (unmarshal from proto), and types for the resource updates. |
xds/internal/xdsclient/xdsresource/version | Package version defines constants to distinguish between supported xDS API versions. |
- Version
- v1.48.0
- Published
- Jul 12, 2022
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 1 hour ago –
Tools for package owners.