rendezvous

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2015 License: GPL-3.0 Imports: 6 Imported by: 1

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