weightedroundrobin

package
v1.67.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 23 Imported by: 16

Documentation

Overview

Package weightedroundrobin provides an implementation of the weighted round robin LB policy, as defined in gRFC A58.

Experimental

Notice: This package is EXPERIMENTAL and may be changed or removed in a later release.

Index

Constants

View Source
const Name = "weighted_round_robin"

Name is the name of the weighted round robin balancer.

Variables

This section is empty.

Functions

func SetAddrInfo added in v1.30.0

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 {
	Weight uint32
}

AddrInfo will be stored in the BalancerAttributes field of Address in order to use weighted roundrobin balancer.

func GetAddrInfo added in v1.30.0

func GetAddrInfo(addr resolver.Address) AddrInfo

GetAddrInfo returns the AddrInfo stored in the BalancerAttributes field of addr.

func (AddrInfo) Equal added in v1.42.0

func (a AddrInfo) Equal(o any) bool

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

func (AddrInfo) String added in v1.56.0

func (a AddrInfo) String() string

Directories

Path Synopsis
Package internal allows for easier testing of the weightedroundrobin package.
Package internal allows for easier testing of the weightedroundrobin package.

Jump to

Keyboard shortcuts

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