config

package
v0.0.0-...-d1b9435 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hashring

type Hashring struct {
	HashringSpec `json:",inline"`
	Endpoints    []string `json:"endpoints"`
}

Hashring is the config for the hashring

type HashringAlgorithm

type HashringAlgorithm string
const (
	AlgorithmHashmod         HashringAlgorithm = "hashmod"
	AlgorithmKetama          HashringAlgorithm = "ketama"
	DefaultHashringAlgorithm                   = AlgorithmKetama
)

type HashringSpec

type HashringSpec struct {
	// Name is the name of the hashring
	Name string `json:"hashring"`
	// Tenants is a list of tenants that should be included in the hashring
	Tenants []string `json:"tenants"`
}

HashringSpec describes the hashring

type Hashrings

type Hashrings []Hashring

Hashrings is a list of hashrings

func (Hashrings) Len

func (h Hashrings) Len() int

func (Hashrings) Less

func (h Hashrings) Less(i, j int) bool

func (Hashrings) Swap

func (h Hashrings) Swap(i, j int)

Jump to

Keyboard shortcuts

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