Info |
---|
Map object into hash space + Map cache into hash space |
1- Define the interface (3 core functions)
Code Block | ||
---|---|---|
| ||
ConsistentHash interface {
Add(node Node)
AddWithReplicas(node Node, replicas int)
AddWithWeight(node Node, weight int)
Get(key Node) Node
Remove(node Node)
} |