rendezvous

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 Rendezvous

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

Rendezvous implements upstream balancing that is based on the Rendezvous (a.k.a Highest Random Weight - HRW) hashing algorithm.

func New

func New() *Rendezvous

New creates a new Rendezvous upstream balancer.

func (*Rendezvous) Get

func (r *Rendezvous) Get(path string) (*types.UpstreamAddress, error)

Get implements the balancing algorithm interface.

func (*Rendezvous) Set

func (r *Rendezvous) Set(newBuckets []*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