random

package
v0.0.0-...-f59cc51 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is random balancer name
	Name = "random"
)

Variables

This section is empty.

Functions

func New

func New(opts ...Option) selector.Selector

New 随机select

Types

type Balancer

type Balancer struct{}

Balancer is a random balancer.

func (*Balancer) Pick

Pick pick a weighted node.

type Option

type Option func(o *options)

Option is random builder option.

func WithFilter

func WithFilter(filters ...selector.Filter) Option

WithFilter 过滤filter

Jump to

Keyboard shortcuts

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