selector

package
v0.0.0-...-b9bbc83 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Random

type Random struct {
}

Random 随机选择器

func NewRandom

func NewRandom() *Random

NewRandom 创建随机选择器

func (*Random) Filter

func (c *Random) Filter(name string, srvs []*service.Service) []*service.Service

Filter 随机过滤器

type Round

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

Round 轮询选择器

func NewRound

func NewRound() *Round

NewRound 创建论询选择器

func (*Round) Filter

func (c *Round) Filter(name string, srvs []*service.Service) []*service.Service

Filter 轮询过滤器

type Selector

type Selector interface {
	// Filter 选择过滤器
	Filter(name string, srvs []*service.Service) []*service.Service
}

Selector 服务选择器

Jump to

Keyboard shortcuts

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