round_robin

package
v0.0.0-...-2a30276 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSimpleServer

func NewSimpleServer(addr string) *simpleServer

Creates and returns a new instance of the simpleServer struct

Types

type Loadbalancer

type Loadbalancer struct {
	Port string
	// contains filtered or unexported fields
}

func NewLoadBalancer

func NewLoadBalancer(port string, servers []lb.Server) *Loadbalancer

Creates a new loadbalancer instance

func (*Loadbalancer) ServeProxy

func (loadbalancer *Loadbalancer) ServeProxy(rw http.ResponseWriter, req *http.Request)

Forwards the request to the server returned by the getNextAvailableServer method

Jump to

Keyboard shortcuts

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