package wrrlocality
import "google.golang.org/grpc/xds/internal/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(addr resolver.Address, addrInfo AddrInfo) resolver.Address
- func SetAddrInfoInEndpoint(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 addr in which the BalancerAttributes field is updated with AddrInfo.
func SetAddrInfoInEndpoint ¶
SetAddrInfoInEndpoint 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.70.0 (latest)
- Published
- Jan 23, 2025
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 27 minutes ago –
Tools for package owners.