package internal
import "google.golang.org/grpc/xds/internal"
Package internal contains functions/structs shared by xds balancers/resolvers.
Index ¶
- Variables
- func GetLocalityID(addr resolver.Address) clients.Locality
- func IsLocalityEqual(l clients.Locality, o any) bool
- func LocalityFromString(s string) (ret clients.Locality, _ error)
- func LocalityString(l clients.Locality) string
- func SetLocalityID(addr resolver.Address, l clients.Locality) resolver.Address
- func SetLocalityIDInEndpoint(endpoint resolver.Endpoint, l clients.Locality) resolver.Endpoint
Variables ¶
ResourceTypeMapForTesting maps TypeUrl to corresponding ResourceType.
var UnknownCSMLabels = map[string]string{ "csm.service_name": "unknown", "csm.service_namespace_name": "unknown", }
UnknownCSMLabels are TelemetryLabels emitted from CDS if CSM Telemetry Label data is not present in the CDS Resource.
Functions ¶
func GetLocalityID ¶
GetLocalityID returns the locality ID of addr.
func IsLocalityEqual ¶
IsLocalityEqual allows the values to be compared by Attributes.Equal.
func LocalityFromString ¶
LocalityFromString converts a string representation of clients.locality as specified in gRFC A76, into a LocalityID struct.
func LocalityString ¶
LocalityString generates a string representation of clients.Locality in the format specified in gRFC A76.
func SetLocalityID ¶
SetLocalityID sets locality ID in addr to l.
func SetLocalityIDInEndpoint ¶
SetLocalityIDInEndpoint sets locality ID in endpoint to l.
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/clusterimpl/tests | |
xds/internal/balancer/clustermanager | Package clustermanager implements the cluster manager LB policy for xds. |
xds/internal/balancer/clustermanager/e2e_test | |
xds/internal/balancer/clusterresolver | Package clusterresolver contains the implementation of the cluster_resolver_experimental LB policy which resolves endpoint addresses using a list of one or more discovery mechanisms. |
xds/internal/balancer/clusterresolver/e2e_test | |
xds/internal/balancer/loadstore | Package loadstore contains the loadStoreWrapper shared by the balancers. |
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/outlierdetection/e2e_test | |
xds/internal/balancer/priority | Package priority implements the priority balancer. |
xds/internal/balancer/wrrlocality | Package wrrlocality provides an implementation of the wrr locality LB policy, as defined in [A52 - xDS Custom LB Policies]. |
xds/internal/clients | Package clients provides implementations of the clients to interact with xDS and LRS servers. |
xds/internal/clients/grpctransport | Package grpctransport provides an implementation of the clients.TransportBuilder interface using gRPC. |
xds/internal/clients/internal | Package internal contains helpers for xDS and LRS clients. |
xds/internal/clients/internal/backoff | Package backoff implements the backoff strategy for clients. |
xds/internal/clients/internal/buffer | Package buffer provides an implementation of an unbounded buffer. |
xds/internal/clients/internal/pretty | Package pretty defines helper functions to pretty-print structs for logging. |
xds/internal/clients/internal/syncutil | Package syncutil implements additional synchronization primitives built upon the sync package. |
xds/internal/clients/internal/testutils | Package testutils contains testing helpers for xDS and LRS clients. |
xds/internal/clients/internal/testutils/e2e | Package e2e provides utilities for end2end testing of xDS and LRS clients functionalities. |
xds/internal/clients/internal/testutils/fakeserver | Package fakeserver provides a fake implementation of the management server. |
xds/internal/clients/lrsclient | Package lrsclient provides an LRS (Load Reporting Service) client. |
xds/internal/clients/lrsclient/internal | Package internal contains functionality internal to the lrsclient package. |
xds/internal/clients/xdsclient | Package xdsclient provides an xDS (* Discovery Service) client. |
xds/internal/clients/xdsclient/internal | Package internal contains functionality internal to the xdsclient package. |
xds/internal/clients/xdsclient/internal/xdsresource | Package xdsresource defines constants to distinguish between supported xDS API versions. |
xds/internal/clients/xdsclient/metrics | Package metrics defines all metrics that can be produced by an xDS client. |
xds/internal/clients/xdsclient/test | |
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/resolver/internal | Package internal contains functionality internal to the xDS resolver. |
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/xdsclient | Package xdsclient implements a full fledged gRPC client for the xDS API used by the xds resolver and balancer implementations. |
xds/internal/xdsclient/internal | Package internal contains functionality internal to the xdsclient package. |
xds/internal/xdsclient/pool | |
xds/internal/xdsclient/tests | |
xds/internal/xdsclient/xdslbregistry | Package xdslbregistry provides a registry of converters that convert proto from load balancing configuration, defined by the xDS API spec, to JSON load balancing configuration. |
xds/internal/xdsclient/xdslbregistry/converter | Package converter provides converters to convert proto load balancing configuration, defined by the xDS API spec, to JSON load balancing configuration. |
xds/internal/xdsclient/xdsresource | Package xdsresource implements the xDS data model layer. |
xds/internal/xdsclient/xdsresource/tests | |
xds/internal/xdsclient/xdsresource/version | Package version defines constants to distinguish between supported xDS API versions. |
- Version
- v1.74.2 (latest)
- Published
- Jul 22, 2025
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 21 hours ago –
Tools for package owners.