balancer

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoadBalance

type LoadBalance[K comparable, V any] interface {
	Size() int32
	Append(node ...Node[K, V])
	Remove(key K) bool
	Next() (V, error)
}

func NewRandom

func NewRandom[K comparable, V any]() LoadBalance[K, V]

func NewRoundRobin

func NewRoundRobin[K comparable, V any]() LoadBalance[K, V]

type Node

type Node[K comparable, V any] interface {
	Key() K
	Value() V
}

Jump to

Keyboard shortcuts

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