algorithm

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionsServerInfo

type ConnectionsServerInfo struct {
	Connections int
	Healthy     bool
	Index       int
}

type LeastConnections

type LeastConnections struct {
}

func NewLeastConnections

func NewLeastConnections() *LeastConnections

func (*LeastConnections) Next

func (r *LeastConnections) Next(servers []server.Server) (int, error)

type ResourceBased

type ResourceBased struct {
}

func NewResourceBased

func NewResourceBased() *ResourceBased

func (*ResourceBased) Next

func (r *ResourceBased) Next(servers []server.Server) (int, error)

type ResourceServerInfo

type ResourceServerInfo struct {
	CPUUsage float64
	Healthy  bool
	Index    int
}

type RoundRobin

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

func NewRoundRobin

func NewRoundRobin() *RoundRobin

func (*RoundRobin) Next

func (r *RoundRobin) Next(servers []server.Server) (int, error)

type WeightedRoundRobin

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

func NewWeightedRoundRobin

func NewWeightedRoundRobin() *WeightedRoundRobin

func (*WeightedRoundRobin) Next

func (r *WeightedRoundRobin) Next(servers []server.Server) (int, error)

Jump to

Keyboard shortcuts

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