maglev

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 6 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 Init

func Init(seed string, m uint64) error

Init initializes the Maglev subsystem with the seed and the backend table size (m).

Types

This section is empty.

Jump to

Keyboard shortcuts

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