Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AdhocTransport = &http.Transport{ Proxy: http.ProxyFromEnvironment, DialContext: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, DualStack: true, }).DialContext, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, } )
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(authorizer authorize.Authorizer) httpwares.Middleware
Types ¶
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy is a forward/reverse proxy that implements Route+Backend and Adhoc Rules forwarding.
func New ¶
func New(pool backendpool.Pool, router router.Router, adhocRouter adhoc.Addresser, logEntry logrus.FieldLogger) *Proxy
New creates a forward/reverse proxy that is either Route+Backend and Adhoc Rules forwarding.
The Router decides which "well-known" routes a given request matches, and which backend from the Pool it should be sent to. The backends in the Pool have pre-dialed connections and are load balanced.
If Adhoc routing supports dialing to whitelisted DNS names either through DNS A or SRV records for undefined backends.
Click to show internal directories.
Click to hide internal directories.