type Node struct {
ID string
Keys map[string]string
}
type ConsistentHashRing struct {
mu sync.RWMutex
nodes map[uint32]*Node
hashes []uint32
}
func NewConsistentHashRing() *ConsistentHashRing {
return &ConsistentHashRing{
nodes: make(map[uint32]*Node),
hashes: []uint32{},
}
}