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

const Name = "xds_wrr_locality_experimental"

Name is the name of wrr_locality balancer.

Functions

func SetAddrInfo

func SetAddrInfo(addr resolver.Address, addrInfo AddrInfo) resolver.Address

SetAddrInfo returns a copy of addr in which the BalancerAttributes 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

func (a AddrInfo) Equal(o interface{}) bool

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

func (AddrInfo) String

func (a AddrInfo) String() 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.57.0
Published
Jul 26, 2023
Platform
linux/amd64
Imports
11 packages
Last checked
52 minutes ago

Tools for package owners.