maglev

package
v1.9.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2021 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DefaultTableSize = 16381

	// seed=$(head -c12 /dev/urandom | base64 -w0)
	DefaultHashSeed = "JLfvgnHc2kaSUFaI"
)

Variables

View Source
var (
	SeedJhash0 uint32
	SeedJhash1 uint32
)

Functions

func GetLookupTable

func GetLookupTable(backends []string, m uint64) []int

GetLookupTable returns the Maglev lookup table of the size "m" for the given backends. The lookup table contains the indices of the given backends.

func InitMaglevSeeds added in v1.9.0

func InitMaglevSeeds(seed string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL