package wrrlocality
import "google.golang.org/grpc/internal/xds/balancer/wrrlocality"
Package wrrlocality provides an implementation of the wrr locality LB policy, as defined in A52 - xDS Custom LB Policies.
Index ¶
- Constants
- func SetAddrInfo(endpoint resolver.Endpoint, addrInfo AddrInfo) resolver.Endpoint
- type AddrInfo
- type LBConfig
Constants ¶
const Name = "xds_wrr_locality_experimental"
Name is the name of wrr_locality balancer.
Functions ¶
func SetAddrInfo ¶
SetAddrInfo returns a copy of endpoint in which the Attributes field is updated with AddrInfo.
Types ¶
type AddrInfo ¶
type AddrInfo struct {
LocalityWeight uint32
}
AddrInfo is the locality weight of the locality an address is a part of.
func (AddrInfo) Equal ¶
Equal allows the values to be compared by Attributes.Equal.
func (AddrInfo) String ¶
type LBConfig ¶
type LBConfig struct {
serviceconfig.LoadBalancingConfig `json:"-"`
// ChildPolicy is the config for the child policy.
ChildPolicy *internalserviceconfig.BalancerConfig `json:"childPolicy,omitempty"`
}
LBConfig is the config for the wrr locality balancer.
Source Files ¶
balancer.go logging.go
- Version
- v1.80.0-dev
- Published
- Jan 21, 2026
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 26 minutes ago –
Tools for package owners.