loadbalancer

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: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoadBalancer

type LoadBalancer struct {
	Servers []server.Server
	// contains filtered or unexported fields
}

func MakeLB

func MakeLB(algo string, statusCheckFrequency time.Duration) (*LoadBalancer, error)

func (*LoadBalancer) Register

func (lb *LoadBalancer) Register(server server.Server)

func (*LoadBalancer) Remove

func (lb *LoadBalancer) Remove(index int)

func (*LoadBalancer) Start

func (lb *LoadBalancer) Start()

type Scheduler

type Scheduler interface {
	Next([]server.Server) (int, error)
}

type StatsResponse

type StatsResponse struct {
	CPUUsage float64 `json:"CPUUsage"`
}

Jump to

Keyboard shortcuts

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