...
Code Block | ||
---|---|---|
| ||
ConsistentHash interface {
Add(node Node)
AddWithReplicas(node Node, replicas int)
AddWithWeight(node Node, weight int) //When specifying weight: actual number of virtual nodes = configured virtual nodes * weight/100
Get(key Node) Node
Remove(node Node)
} |
...