selector

package
v0.0.0-...-3b4426b 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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const RandomSelectorType = "random"
View Source
const WeightRandomSelectorType = "weight_random"
View Source
const WeightRoundRobinSelectorType = "weight_round_robin"

Variables

This section is empty.

Functions

func GetSelectorBuilder

func GetSelectorBuilder(selectorName string) (selectorBuilder, error)

Types

type LoadBalanceSelector

type LoadBalanceSelector interface {
	Select() MeshNode
	GetType() string
}

func CreateNewSelector

func CreateNewSelector(selectorName string, config *conf.EventMeshHttpClientConfig) (LoadBalanceSelector, error)

type MeshNode

type MeshNode struct {
	Addr   string
	Weight int64
}

type RandomLoadSelector

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

func (*RandomLoadSelector) GetType

func (s *RandomLoadSelector) GetType() string

func (*RandomLoadSelector) Select

func (s *RandomLoadSelector) Select() MeshNode

type WeightRandomLoadSelector

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

func NewWeightRandomLoadSelector

func NewWeightRandomLoadSelector(clusterGroup []MeshNode) (*WeightRandomLoadSelector, error)

func (*WeightRandomLoadSelector) GetType

func (s *WeightRandomLoadSelector) GetType() string

func (*WeightRandomLoadSelector) Select

func (s *WeightRandomLoadSelector) Select() MeshNode

type WeightRoundRobinLoadSelector

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

func NewWeightRoundRobinLoadSelector

func NewWeightRoundRobinLoadSelector(clusterGroup []MeshNode) (*WeightRoundRobinLoadSelector, error)

func (*WeightRoundRobinLoadSelector) GetType

func (s *WeightRoundRobinLoadSelector) GetType() string

func (*WeightRoundRobinLoadSelector) Select

type WeightRoundRobinMeshNode

type WeightRoundRobinMeshNode struct {
	MeshNode
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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