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, hash Hash) *ConsistentHash
func (*ConsistentHash) AddTruthNode ¶
func (ch *ConsistentHash) AddTruthNode(nodes ...string)
func (*ConsistentHash) GetTruthNode ¶
func (ch *ConsistentHash) GetTruthNode(key string) string
选择真实节点
func (*ConsistentHash) RemovePeer ¶
func (ch *ConsistentHash) RemovePeer(peer string)
Click to show internal directories.
Click to hide internal directories.