hashring

package
v0.0.0-...-e391cb3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2016 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash func(date []byte) uint32

Hash .

type HashRing

type HashRing struct {
	sync.RWMutex // mixin rw locker
	// contains filtered or unexported fields
}

HashRing .

func New

func New() *HashRing

New .

func (*HashRing) Get

func (ring *HashRing) Get(key string) (interface{}, bool)

Get get value by key

func (*HashRing) Put

func (ring *HashRing) Put(key string, value interface{}) interface{}

Put insert data into hash ring

func (*HashRing) Remove

func (ring *HashRing) Remove(key string) interface{}

Remove remove value from key

Jump to

Keyboard shortcuts

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