ketamaselector

package module
v0.0.0-...-16e080a Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2015 License: MIT Imports: 5 Imported by: 0

README

go-memcache-ketama-selector

Ketama selector for go-memcache

Documentation

Overview

ketamaselector implements a list of servers where servers are picked based on Ketama consistent hashing algorithm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerSet

type ServerSet struct {
	// contains filtered or unexported fields
}

func (*ServerSet) Each

func (ss *ServerSet) Each(f func(net.Addr) error) error

func (*ServerSet) PickServer

func (ss *ServerSet) PickServer(key string) (net.Addr, error)

func (*ServerSet) SetBuckets

func (ss *ServerSet) SetBuckets(buckets ...ketama.Bucket) error

Sets buckets to be used. Label must be either a valid TCP address or a path to unix domain socket, in which case must contain a "/"

func (*ServerSet) SetServers

func (ss *ServerSet) SetServers(servers ...string) error

Sets servers. With this method, the weight for all the servers are all equal. You must use SetBuckets() if you want to control that.

Jump to

Keyboard shortcuts

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