MCPcopy
hub / github.com/grpc/grpc-go / randomWRR

Struct randomWRR

internal/wrr/random.go:38–42  ·  view source on GitHub ↗

randomWRR is a struct that contains weighted items implement weighted random algorithm.

Source from the content-addressed store, hash-verified

36
37// randomWRR is a struct that contains weighted items implement weighted random algorithm.
38type randomWRR struct {
39 items []*weightedItem
40 // Are all item's weights equal
41 equalWeights bool
42}
43
44// NewRandom creates a new WRR with random.
45func NewRandom() WRR {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected