wrrlocality

package
v1.66.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package wrrlocality provides an implementation of the wrr locality LB policy, as defined in A52 - xDS Custom LB Policies.

Index

Constants

View Source
const Name = "xds_wrr_locality_experimental"

Name is the name of wrr_locality balancer.

Variables

This section is empty.

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 any) 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.

Jump to

Keyboard shortcuts

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