random

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: May 27, 2016 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Random

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

Random randomly balances requests between its upstreams.

func New

func New() *Random

New creates a new weighted random upstream balancer.

func (*Random) Get

func (r *Random) Get(_ string) (*types.UpstreamAddress, error)

Get implements the balancing algorithm interface.

func (*Random) Set

func (r *Random) 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