consistent

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 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