Documentation ¶
Overview ¶
Package selector is for node selection and load balancing
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoneAvailable = errors.New("none available")
ErrNoneAvailable is returned by select when no routes were provided to select from
Functions ¶
Types ¶
type SelectOptions ¶
type SelectOptions struct{}
SelectOptions used to configure selection
func NewSelectOptions ¶
func NewSelectOptions(opts ...SelectOption) SelectOptions
NewSelectOptions parses select options
type Selector ¶
type Selector interface { // Select a route from the pool using the strategy Select([]string, ...SelectOption) (Next, error) // Record the error returned from a route to inform future selection Record(string, error) error // Reset the selector Reset() error // String returns the name of the selector String() string }
Selector selects a route from a pool
Click to show internal directories.
Click to hide internal directories.