consistenthash

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

README

consistent-hash

go consistent-hash

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsistentHash

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

func NewConsistentHash

func NewConsistentHash(virtualNodeCount int) *ConsistentHash

func (*ConsistentHash) AddNode

func (h *ConsistentHash) AddNode(node string)

func (*ConsistentHash) GetNode

func (h *ConsistentHash) GetNode(key string) string

func (*ConsistentHash) RemoveNode

func (h *ConsistentHash) RemoveNode(node string)

type HashCircle

type HashCircle []uint32

func (HashCircle) Len

func (h HashCircle) Len() int

func (HashCircle) Less

func (h HashCircle) Less(i, j int) bool

func (HashCircle) Swap

func (h HashCircle) Swap(i, j int)

Jump to

Keyboard shortcuts

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