Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyInstance = errors.New("empty round-robin instance")
ErrEmptyInstance denotes that there is nothing in the round-robin instance to schedule.
Functions ¶
This section is empty.
Types ¶
type RoundRobin ¶
type RoundRobin struct {
// contains filtered or unexported fields
}
RoundRobin implements quite simple round-robin scheduling algorithm to distribute load fairly between servers.
func (*RoundRobin) Add ¶
func (r *RoundRobin) Add(item string)
Add adds a new item to the Round-Robin scheduler.
func (*RoundRobin) Delete ¶
func (r *RoundRobin) Delete(item string)
Delete deletes an item from the Round-Robin scheduler.
Click to show internal directories.
Click to hide internal directories.