roundrobin

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2015 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoundRobin

type RoundRobin struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

RoundRobin balances requests between its upstreams one by one.

func New

func New() *RoundRobin

New creates a new round-robin upstream balancer.

func (*RoundRobin) Get

func (rr *RoundRobin) Get(path string) (*types.UpstreamAddress, error)

Get implements the balancing algorithm interface.

func (*RoundRobin) Set

func (rr *RoundRobin) Set(buckets []*types.UpstreamAddress)

Set implements the balancing algorithm interface.

Jump to

Keyboard shortcuts

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