httpproxy

package
v0.15.2-0...-1d34bd1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: AGPL-3.0-only Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfiguration = &Configuration{
	Policy:      "random",
	FailTimeout: 0,
	MaxFails:    1,
	MaxConns:    0,
	Keepalive:   8,
	TryDuration: 0,
	TryInterval: time.Duration(250) * time.Millisecond,
}

DefaultConfiguration is the proxy configuration which is used by default.

Functions

func New

func New(name string, upstreamURIs []string, configuration *Configuration) (proxy.HTTPProxyHandler, error)

New creates a new proxy identified by the provided name to the provided upstreamURIs..

Types

type Configuration

type Configuration struct {
	Policy      string
	FailTimeout time.Duration
	MaxFails    uint
	MaxConns    uint
	Keepalive   uint
	TryDuration time.Duration
	TryInterval time.Duration
	Sticky      string
	Extra       []string
}

Configuration defines configuration settings for a proxy.

Jump to

Keyboard shortcuts

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