-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
type Config struct {
Hasher hasher
...type hasher interface {
update(servers []*server)
getServerIndex(key string) (uint, error)
}now Hasher should implement an interface with private methods with private types like *server so the only way to define a Hasher is to use a NewModuloHasher() function.
the problem is that Hasher field is public, but i cant really use it.
i purpose to change the interface this way:
type Hasher interface {
Update(servers []strings)
GetServerIndex(key string) (uint, error)
}this will let us to make custom implemenation of Hasher interface
Metadata
Metadata
Assignees
Labels
No labels