shad-go/consistenthash/consistenthash.go
2023-04-18 14:48:06 +04:00

27 lines
459 B
Go

//go:build !solution
package consistenthash
type Node interface {
// ID is some persistent and unique identifier
ID() string
}
type ConsistentHash[N Node] struct {
}
func New[N Node]() *ConsistentHash[N] {
panic("implement me")
}
func (h *ConsistentHash[N]) AddNode(n *N) {
panic("implement me")
}
func (h *ConsistentHash[N]) RemoveNode(n *N) {
panic("implement me")
}
func (h *ConsistentHash[N]) GetNode(key string) *N {
panic("implement me")
}