wrr

package
v0.5.10 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func New

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

New random a selector.

func NewBuilder

func NewBuilder(opts ...Option) selector.Builder

NewBuilder returns a selector builder with wrr balancer

Types

type Balancer

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

Balancer is a random balancer.

func (*Balancer) Pick

Pick is pick a weighted node.

type Builder

type Builder struct{}

Builder is wrr builder

func (*Builder) Build

func (b *Builder) Build() selector.Balancer

Build creates Balancer

type Option

type Option func(o *options)

Option is random builder option.

func WithFilter

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

WithFilter with select filters

Jump to

Keyboard shortcuts

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