weighted_rendezvous

package
v0.0.0-...-f607f80 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

type Table struct {
	// contains filtered or unexported fields
}

func New

func New(key uint64, membersMap map[netip.Addr]float64) (Table, error)

func NewWithTableSize

func NewWithTableSize(key uint64, size uint32, membersMap map[netip.Addr]float64) (Table, error)

func (*Table) Add

func (t *Table) Add(addr netip.Addr, weight float64)

func (*Table) Delete

func (t *Table) Delete(addr netip.Addr)

func (*Table) Get

func (t *Table) Get(addr netip.Addr) netip.Addr

func (*Table) Key

func (t *Table) Key() uint64

func (*Table) Set

func (t *Table) Set(addr netip.Addr, weight float64)

Jump to

Keyboard shortcuts

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