selector

package
v0.0.0-...-303e327 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.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 Selector

type Selector interface {
	GetHashN(n int, key []byte) []string
	GetRandomN(n int) []string
	GetRoundRobinN(n int) []string
}

Selector select hosts or something from somewhere.

func MakeSelector

func MakeSelector(intervalMs int64, getter func() ([]string, error)) Selector

MakeSelector always return a selector

func NewSelector

func NewSelector(intervalMs int64, getter func() ([]string, error)) (Selector, error)

NewSelector implements Selector

Jump to

Keyboard shortcuts

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