Documentation ¶
Overview ¶
Package maglevhash implements the hash function from Maglev, Google's fast load balancer.
https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/44824.pdf
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MaglevHasher ¶
type MaglevHasher struct {
// contains filtered or unexported fields
}
func New ¶
func New(members []string, replicas int) (*MaglevHasher, error)
New creates a new MaglevHasher consisting of members.
func (*MaglevHasher) Dispatch ¶
func (m *MaglevHasher) Dispatch(i uint64) []string
Dispatch gets the members corresponding to i. Dispatch evenly distributes all possible unsigned integers i across members.
func (*MaglevHasher) Len ¶
func (m *MaglevHasher) Len() int
Click to show internal directories.
Click to hide internal directories.