Documentation ¶
Overview ¶
Package consistenthash provides consistent hash utilities.
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
}
ConsistentHash defines the consistent hash.
func NewConsistentHash ¶
func NewConsistentHash() *ConsistentHash
NewConsistentHash creates a new ConsistentHash.
func NewCustomConsistentHash ¶
func NewCustomConsistentHash(hashFunc Hash) *ConsistentHash
NewCustomConsistentHash creates a new ConsistentHash with custom hash function.
type Uint64Slice ¶
type Uint64Slice []uint64
Uint64Slice defines uint64 slice.
func (Uint64Slice) Less ¶
func (s Uint64Slice) Less(i, j int) bool
Less returns whether the value at i is less than j.
Click to show internal directories.
Click to hide internal directories.