Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consistent ¶
type ConsistentHash ¶
type ConsistentHash struct {
// contains filtered or unexported fields
}
func NewConsistentHash ¶
func NewConsistentHash(opts ...ConsistentHashOption) *ConsistentHash
func (*ConsistentHash) AddNode ¶
func (c *ConsistentHash) AddNode(node string)
func (*ConsistentHash) GetNode ¶
func (c *ConsistentHash) GetNode(key string) string
func (*ConsistentHash) RemoveNode ¶
func (c *ConsistentHash) RemoveNode(node string)
type ConsistentHashOption ¶
type ConsistentHashOption func(c *ConsistentHash)
func WithHash ¶
func WithHash(h HashFunc) ConsistentHashOption
func WithReplica ¶
func WithReplica(replicas int) ConsistentHashOption
Click to show internal directories.
Click to hide internal directories.