shad-go/consistenthash/consistenthash.go

28 lines
459 B
Go
Raw Normal View History

2023-04-18 10:48:06 +00:00
//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")
}