hashing

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: Unlicense Imports: 4 Imported by: 0

README

rendezvous_hashing

highest random weight (HRW) hashing

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexMax

func IndexMax[T comparable](values []T) int

func Less

func Less[T comparable](a, b T) bool

func Max

func Max[T comparable](values ...T) (T, bool)

Types

type Hasher

type Hasher func() hash.Hash

type Node

type Node struct {
	Name      string
	Weight    float64
	Convertor func()
}

func DetermineResponsibleNode

func DetermineResponsibleNode(hasher Hasher, key string, nodes []*Node) *Node

func NewNode

func NewNode(name string, weight float64) *Node

Jump to

Keyboard shortcuts

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