roundrobin

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

README

round-robin

Round-Robin Scheduling Algorithm for golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoundRobin added in v0.1.1

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

func NewRR

func NewRR() *RoundRobin

func (*RoundRobin) Add added in v0.1.1

func (r *RoundRobin) Add(data any)

func (*RoundRobin) IsNil added in v0.1.1

func (r *RoundRobin) IsNil() bool

func (*RoundRobin) Next added in v0.1.1

func (r *RoundRobin) Next() any

type Source

type Source interface {
	Weight() int64
}

type WeightedRoundRobin added in v0.1.1

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

func NewWRR

func NewWRR() *WeightedRoundRobin

func (*WeightedRoundRobin) Add added in v0.1.1

func (r *WeightedRoundRobin) Add(data ...Source)

func (*WeightedRoundRobin) IsNil added in v0.1.1

func (r *WeightedRoundRobin) IsNil() bool

func (*WeightedRoundRobin) Next added in v0.1.1

func (r *WeightedRoundRobin) Next() Source

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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