package wrr
import "google.golang.org/grpc/balancer/internal/wrr"
Index ¶
Types ¶
type WRR ¶
type WRR interface { // Add adds an item with weight to the WRR set. Add(item interface{}, weight int64) // Next returns the next picked item. // // Next needs to be thread safe. Next() interface{} }
WRR defines an interface that implements weighted round robin.
func NewRandom ¶
func NewRandom() WRR
NewRandom creates a new WRR with random.
Source Files ¶
random.go wrr.go
- Version
- v1.21.3
- Published
- Aug 13, 2019
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 7 minutes ago –
Tools for package owners.