roundrobin

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoundRobinBalancer

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

RoundRobinBalancer implements a round-robin load balancing algorithm.

func NewBalancer

func NewBalancer(proxies []proxy.Proxy) *RoundRobinBalancer

NewBalancer creates a new RoundRobinBalancer instance.

func (*RoundRobinBalancer) Proxies

func (b *RoundRobinBalancer) Proxies() []proxy.Proxy

Proxies returns the list of proxies managed by the balancer.

func (*RoundRobinBalancer) Select

Select picks the next available proxy in a round-robin fashion. It handles atomic counter increments and wraps around automatically.

Jump to

Keyboard shortcuts

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