internal

package
v1.52.0-dev Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 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

This section is empty.

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) Equal added in v1.42.0

func (l LocalityID) Equal(o interface{}) 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.
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.
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.
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
Package testutils provides utility types, for use in xds tests.
Package testutils provides utility types, for use in xds tests.
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.

Jump to

Keyboard shortcuts

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