gorrola

package
v0.0.0-...-37696ac Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Attempts key = iota
	Retry
)

Variables

This section is empty.

Functions

func GetAttemptsFromContext

func GetAttemptsFromContext(r *http.Request) int

func GetRetryFromContext

func GetRetryFromContext(r *http.Request) int

func Run

func Run(backendUrls []string, port uint)

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() bool

func (*Backend) SetAlive

func (b *Backend) SetAlive(alive bool)

type BackendPool

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

func (*BackendPool) CheckHealth

func (b *BackendPool) CheckHealth()

func (*BackendPool) GetNextAliveBackend

func (b *BackendPool) GetNextAliveBackend() (*Backend, error)

func (*BackendPool) MarkAsDown

func (b *BackendPool) MarkAsDown(backendUrl *url.URL)

Jump to

Keyboard shortcuts

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