grpcgoogle.golang.org/grpc/balancer/weightedroundrobin Index | Files

package weightedroundrobin

import "google.golang.org/grpc/balancer/weightedroundrobin"

Package weightedroundrobin defines a weighted roundrobin balancer.

Index

Constants

const Name = "weighted_round_robin"

Name is the name of weighted_round_robin balancer.

Functions

func SetAddrInfo

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

SetAddrInfo returns a copy of addr in which the Attributes field is updated with addrInfo.

This is an EXPERIMENTAL API.

Types

type AddrInfo

type AddrInfo struct {
	Weight uint32
}

AddrInfo will be stored inside Address metadata in order to use weighted roundrobin balancer.

func GetAddrInfo

func GetAddrInfo(addr resolver.Address) AddrInfo

GetAddrInfo returns the AddrInfo stored in the Attributes fields of addr.

This is an EXPERIMENTAL API.

Source Files

weightedroundrobin.go

Version
v1.31.0
Published
Jul 30, 2020
Platform
linux/amd64
Imports
1 packages
Last checked
2 hours ago

Tools for package owners.