selector

package
v1.4.29 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConHashVirtualNodes = 100
)

Variables

This section is empty.

Functions

func BuildStaticWeightList

func BuildStaticWeightList(endpoints []endpoint.Endpoint) []int

Types

type HashType

type HashType int

HashType is the hash type

const (
	ModHash HashType = iota
	ConsistentHash
)

HashType enum

func (HashType) String

func (h HashType) String() string

type Message

type Message interface {
	HashCode() uint32
	HashType() HashType
	IsHash() bool
}

type Selector

type Selector interface {
	Select(msg Message) (endpoint.Endpoint, error)
	Refresh(node []endpoint.Endpoint)
	Add(node endpoint.Endpoint) error
	Remove(node endpoint.Endpoint) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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