Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RoundRobin ¶
RoundRobin manages item in round-robin order.
func (*RoundRobin) Exclude ¶
func (rr *RoundRobin) Exclude(key string)
Exclude adds a item in exclude list or swaps a item from include list. Items in exclude list are excluded and can't be fetched.
func (*RoundRobin) HasNext ¶
func (rr *RoundRobin) HasNext() bool
HasNext returns true if next item exists.
func (*RoundRobin) Include ¶
func (rr *RoundRobin) Include(key string)
Include adds a item in include list or swaps a item from exclude list. Only items in include list can't be fetched in round-robin order.
func (*RoundRobin) Next ¶
func (rr *RoundRobin) Next() string
Next returns next item in round-robin order.
func (*RoundRobin) Reset ¶
func (rr *RoundRobin) Reset()
Reset appends items in exclude list to include list and resets exclude list.
Click to show internal directories.
Click to hide internal directories.