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.1
- Published
- Jun 4, 2019
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 4 minutes ago –
Tools for package owners.