wrr

package
v1.22.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WRR

type WRR interface {
	// Add adds an item with weight to the WRR set.
	Add(item interface{}, weight int64)
	// Next returns the next picked item.
	//
	// Next needs to be thread safe.
	Next() interface{}
}

WRR defines an interface that implements weighted round robin.

func NewRandom

func NewRandom() WRR

NewRandom creates a new WRR with random.

Jump to

Keyboard shortcuts

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