Documentation ¶
Overview ¶
Package internal contains functions/structs shared by xds balancers/resolvers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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.
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 EDS balancer implementation.
|
Package clusterresolver contains EDS balancer implementation. |
loadstore
Package loadstore contains the loadStoreWrapper shared by the balancers.
|
Package loadstore contains the loadStoreWrapper shared by the balancers. |
orca
Package orca implements Open Request Cost Aggregation.
|
Package orca implements Open Request Cost Aggregation. |
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. |
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. |
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. |
e2e
Package e2e provides utilities for end2end testing of xDS functionality.
|
Package e2e provides utilities for end2end testing of xDS functionality. |
fakeclient
Package fakeclient provides a fake implementation of an xDS client.
|
Package fakeclient provides a fake implementation of an xDS client. |
fakeserver
Package fakeserver provides a fake implementation of the management server.
|
Package fakeserver provides a fake implementation of the management server. |
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. |
bootstrap
Package bootstrap provides the functionality to initialize certain aspects of an xDS client by reading a bootstrap file.
|
Package bootstrap provides the functionality to initialize certain aspects of an xDS client by reading a bootstrap file. |
controller
Package controller contains implementation to connect to the control plane.
|
Package controller contains implementation to connect to the control plane. |
controller/version
Package version defines APIs to deal with different versions of xDS.
|
Package version defines APIs to deal with different versions of xDS. |
controller/version/v2
Package v2 provides xDS v2 transport protocol specific functionality.
|
Package v2 provides xDS v2 transport protocol specific functionality. |
controller/version/v3
Package v3 provides xDS v3 transport protocol specific functionality.
|
Package v3 provides xDS v3 transport protocol specific functionality. |
load
Package load provides functionality to record and maintain load data.
|
Package load provides functionality to record and maintain load data. |
pubsub
Package pubsub implements a utility type to maintain resource watchers and the updates.
|
Package pubsub implements a utility type to maintain resource watchers and the updates. |
xdsresource
Package xdsresource contains functions to proto xds updates (unmarshal from proto), and types for the resource updates.
|
Package xdsresource contains functions to proto xds updates (unmarshal from proto), and types for the resource updates. |
xdsresource/version
Package version defines constants to distinguish between supported xDS API versions.
|
Package version defines constants to distinguish between supported xDS API versions. |
Click to show internal directories.
Click to hide internal directories.