dgryski

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(buckets []ketama.Bucket) memcache.ServerSelector

func NewWithHash

func NewWithHash(buckets []ketama.Bucket, fn ketama.HashFunc) memcache.ServerSelector

Types

type ServerList

type ServerList struct {
	Buckets  []ketama.Bucket
	HashFunc ketama.HashFunc
}

ServerList is a simple ServerSelector. Its zero value is usable.

func (*ServerList) Each

func (sl *ServerList) Each(func(net.Addr) error) error

func (*ServerList) PickServer

func (sl *ServerList) PickServer(key string) (net.Addr, error)

Jump to

Keyboard shortcuts

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