ketama

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: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ketama

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

Ketama implements upstream balancing that is based on the Ketama consistent hashing algorithm.

func New

func New() *Ketama

New creates a new ketama consistent hash upstream balancer.

func (*Ketama) Get

func (k *Ketama) Get(path string) (*types.UpstreamAddress, error)

Get implements the balancing algorithm interface.

func (*Ketama) Set

func (k *Ketama) Set(upstreams []*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