roundrobin

package
v0.1.0-beta1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoAvailableItem no item is available
	ErrNoAvailableItem = errors.New("no item is available")
)

Functions

This section is empty.

Types

type Balancer

type Balancer struct {
	// contains filtered or unexported fields
}

Balancer roundrobin instance.

func New

func New(items []string) *Balancer

New - Creates a new instance.

func (*Balancer) Pick

func (b *Balancer) Pick() (string, error)

Pick - Chooses next available item.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL