server

package
v0.0.0-...-a39e3f0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: GPL-3.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 Backend

type Backend struct {
	URL   *url.URL
	Alive bool

	ReverseProxy *httputil.ReverseProxy
	// contains filtered or unexported fields
}

func (*Backend) IsAlive

func (b *Backend) IsAlive() (alive bool)

func (*Backend) SetAlive

func (b *Backend) SetAlive(alive bool)

type ServerPool

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

func NewServerPool

func NewServerPool(lg *log.Logger) *ServerPool

func (*ServerPool) AddBackend

func (s *ServerPool) AddBackend(backend *Backend)

func (*ServerPool) GetNextPeer

func (s *ServerPool) GetNextPeer() *Backend

func (*ServerPool) NextIndex

func (s *ServerPool) NextIndex() int

Jump to

Keyboard shortcuts

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