consistent

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: MIT Imports: 4 Imported by: 0

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(replicas int, hashFunc func([]byte) uint32) *ConsistentHash

func (*ConsistentHash) AddNode

func (c *ConsistentHash) AddNode(node *Node)

func (*ConsistentHash) GetNode

func (c *ConsistentHash) GetNode(hash uint32) *Node

func (*ConsistentHash) RemoveNode

func (c *ConsistentHash) RemoveNode(node *Node)

type Node

type Node struct {
	Proxy proxy.IProxyClient
	Addr  string
	Id    int
}

Jump to

Keyboard shortcuts

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