internal

package
v1.67.0-dev Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var ResourceTypeMapForTesting map[string]any

ResourceTypeMapForTesting maps TypeUrl to corresponding ResourceType.

View Source
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 SetLocalityID added in v1.40.0

func SetLocalityID(addr resolver.Address, l LocalityID) resolver.Address

SetLocalityID sets locality ID in addr to l.

Types

type LocalityID added in v1.30.0

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 added in v1.40.0

func GetLocalityID(addr resolver.Address) LocalityID

GetLocalityID returns the locality ID of addr.

func LocalityIDFromString added in v1.33.0

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

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

func (LocalityID) Empty added in v1.66.0

func (l LocalityID) Empty() bool

Empty returns whether or not the locality ID is empty.

func (LocalityID) Equal added in v1.42.0

func (l LocalityID) Equal(o any) bool

Equal allows the values to be compared by Attributes.Equal.

func (LocalityID) ToString added in v1.33.3

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.

Directories

Path Synopsis
Package balancer installs all the xds balancers.
Package balancer installs all the xds balancers.
cdsbalancer
Package cdsbalancer implements a balancer to handle CDS responses.
Package cdsbalancer implements a balancer to handle CDS responses.
clusterimpl
Package clusterimpl implements the xds_cluster_impl balancing policy.
Package clusterimpl implements the xds_cluster_impl balancing policy.
clustermanager
Package clustermanager implements the cluster manager LB policy for xds.
Package clustermanager implements the cluster manager LB policy for xds.
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.
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.
loadstore
Package loadstore contains the loadStoreWrapper shared by the balancers.
Package loadstore contains the loadStoreWrapper shared by the balancers.
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.
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.
priority
Package priority implements the priority balancer.
Package priority implements the priority balancer.
ringhash
Package ringhash implements the ringhash balancer.
Package ringhash implements the ringhash balancer.
wrrlocality
Package wrrlocality provides an implementation of the wrr locality LB policy, as defined in [A52 - xDS Custom LB Policies].
Package wrrlocality provides an implementation of the wrr locality LB policy, as defined in [A52 - xDS Custom LB Policies].
Package clusterspecifier contains the ClusterSpecifier interface and a registry for storing and retrieving their implementations.
Package clusterspecifier contains the ClusterSpecifier interface and a registry for storing and retrieving their implementations.
rls
Package rls implements the RLS cluster specifier plugin.
Package rls implements the RLS cluster specifier plugin.
Package httpfilter contains the HTTPFilter interface and a registry for storing and retrieving their implementations.
Package httpfilter contains the HTTPFilter interface and a registry for storing and retrieving their implementations.
fault
Package fault implements the Envoy Fault Injection HTTP filter.
Package fault implements the Envoy Fault Injection HTTP filter.
rbac
Package rbac implements the Envoy RBAC HTTP filter.
Package rbac implements the Envoy RBAC HTTP filter.
router
Package router implements the Envoy Router HTTP filter.
Package router implements the Envoy Router HTTP filter.
Package resolver implements the xds resolver, that does LDS and RDS to find the cluster to use.
Package resolver implements the xds resolver, that does LDS and RDS to find the cluster to use.
internal
Package internal contains functionality internal to the xDS resolver.
Package internal contains functionality internal to the xDS resolver.
Package server contains internal server-side functionality used by the public facing xds package.
Package server contains internal server-side functionality used by the public facing xds package.
test
e2e
Package e2e implements xds e2e tests using go-control-plane.
Package e2e implements xds e2e tests using go-control-plane.
Package testutils provides utility types, for use in xds tests.
Package testutils provides utility types, for use in xds tests.
fakeclient
Package fakeclient provides a fake implementation of an xDS client.
Package fakeclient provides a fake implementation of an xDS client.
Package xdsclient implements a full fledged gRPC client for the xDS API used by the xds resolver and balancer implementations.
Package xdsclient implements a full fledged gRPC client for the xDS API used by the xds resolver and balancer implementations.
internal
Package internal contains functionality internal to the xdsclient package.
Package internal contains functionality internal to the xdsclient package.
load
Package load provides functionality to record and maintain load data.
Package load provides functionality to record and maintain load data.
transport
Package transport implements the xDS transport protocol functionality required by the xdsclient.
Package transport implements the xDS transport protocol functionality required by the xdsclient.
transport/internal
Package internal contains functionality internal to the transport package.
Package internal contains functionality internal to the transport package.
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.
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.
xdslbregistry/converter
Package converter provides converters to convert proto load balancing configuration, defined by the xDS API spec, to JSON load balancing configuration.
Package converter provides converters to convert proto load balancing configuration, defined by the xDS API spec, to JSON load balancing configuration.
xdsresource
Package xdsresource implements the xDS data model layer.
Package xdsresource implements the xDS data model layer.
xdsresource/version
Package version defines constants to distinguish between supported xDS API versions.
Package version defines constants to distinguish between supported xDS API versions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL