We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8c6f7e commit 84f59a7Copy full SHA for 84f59a7
internal/wrr/wrr.go
@@ -21,11 +21,12 @@ package wrr
21
22
// WRR defines an interface that implements weighted round robin.
23
type WRR interface {
24
- // Add adds an item with weight to the WRR set. All Add must be only called
25
- // before any calls to Next().
+ // Add adds an item with weight to the WRR set. Add must be only called
+ // before any calls to Next.
26
Add(item any, weight int64)
27
// Next returns the next picked item.
28
//
29
- // Next needs to be thread safe.
+ // Next needs to be thread safe. Add may not be called after any call to
30
+ // Next.
31
Next() any
32
}
0 commit comments