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)
Click to show internal directories.
Click to hide internal directories.