wrr

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "wrr"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct{}

Builder is wrr Builder

func NewBuilder

func NewBuilder() *Builder

NewBuilder creates a new weighted-roundrobin balancer builder.

func (*Builder) Build

func (*Builder) Build(ctx context.Context, nodes []naming.Instance, errHandler func(error) bool, withoutFlight bool, withoutLag bool) balancer.Balancer

Build wrr

type WrrPicker

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

func (*WrrPicker) Pick

func (p *WrrPicker) Pick(ctx context.Context, nodes []naming.Instance) (*naming.Instance, func(di balancer.DoneInfo))

func (*WrrPicker) PrintStats

func (p *WrrPicker) PrintStats()

func (*WrrPicker) Schema

func (p *WrrPicker) Schema() string

Jump to

Keyboard shortcuts

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