Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RRW ¶
type RRW struct {
// contains filtered or unexported fields
}
type RandW ¶
type RandW struct {
// contains filtered or unexported fields
}
type SW ¶
type SW struct {
// contains filtered or unexported fields
}
type W ¶
type W interface {
// Next is not goroutine-safe. You MUST use the snchronization primitive to protect it in concurrent cases.
Next() (item interface{})
// Add adds a weighted item for selection.
Add(item interface{}, weight int)
// All returns all items.
All() map[interface{}]int
// RemoveAll removes all weighted items.
RemoveAll()
// Reset resets the balancing algorithm.
Reset()
}
Click to show internal directories.
Click to hide internal directories.