utils

package
v0.0.0-...-545b386 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbortOnError

func AbortOnError(err error)

Exit with a fatal log if an error occurred

func ChooseBucket

func ChooseBucket(key uint64, numOfBuckets int32) int32

Use jump consistent has to choose a bucket for a given key Outputs a number in the range [0, numOfBuckets]

func ChooseBucketString

func ChooseBucketString(key string, numOfBuckets int32) (uint64, uint32)

Call ChooseBucket (jump consistent hash) after converting a string key to uint64 Returns the hash (key as uint64) and the bucket number

func HashString

func HashString(key string) uint64

Types

This section is empty.

Jump to

Keyboard shortcuts

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