weightedroundrobin

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 1 Imported by: 16

Documentation

Overview

Package weightedroundrobin defines a weighted roundrobin balancer.

Index

Constants

View Source
const Name = "weighted_round_robin"

Name is the name of 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 Attributes field is updated with addrInfo.

Experimental

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

Types

type AddrInfo

type AddrInfo struct {
	Weight uint32
}

AddrInfo will be stored inside Address metadata 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 Attributes fields of addr.

Experimental

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

Jump to

Keyboard shortcuts

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