rthash

package
v2.14.6 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBytesHash

func NewBytesHash() func(b []byte) uintptr

NewBytesHash returns a new hash function to hash byte slice.

Note that this function generates a random seed, each calling of this function returns DIFFERENT hash function, different hash functions generate different hash result for same input.

The returned function is safe for concurrent use by multiple goroutines.

Types

type HashFunc

type HashFunc[K comparable] func(key K) uintptr

func NewHashFunc

func NewHashFunc[K comparable]() HashFunc[K]

NewHashFunc returns a new hash function, which exposes several hash functions in package runtime.

Note that this function generates a random seed, each calling of this function returns DIFFERENT hash function, different hash functions generate different result for same input.

The returned function is safe for concurrent use by multiple goroutines.

Jump to

Keyboard shortcuts

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