Documentation
¶
Overview ¶
Package random implements a scheduling picker that selects endpoints uniformly at random, ignoring any scores calculated by scorer plugins.
For detailed behavioral intent and configuration, see the package README.
Index ¶
Constants ¶
View Source
const (
// RandomPickerType is the registered name of the random picker plugin.
RandomPickerType = "random-picker"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RandomPicker ¶
type RandomPicker struct {
// contains filtered or unexported fields
}
RandomPicker picks random endpoint(s) from the list of candidates.
func NewRandomPicker ¶
func NewRandomPicker(maxNumOfEndpoints int) *RandomPicker
NewRandomPicker initializes a new RandomPicker and returns its pointer.
func (*RandomPicker) Pick ¶
func (p *RandomPicker) Pick(ctx context.Context, scoredEndpoints []*fwksched.ScoredEndpoint) *fwksched.ProfileRunResult
Pick selects random endpoint(s) from the list of candidates.
func (*RandomPicker) TypedName ¶
func (p *RandomPicker) TypedName() fwkplugin.TypedName
TypedName returns the type and name tuple of this plugin instance.
func (*RandomPicker) WithName ¶
func (p *RandomPicker) WithName(name string) *RandomPicker
WithName sets the name of the picker.
Click to show internal directories.
Click to hide internal directories.