Documentation ¶
Index ¶
- func Close()
- func ListenAndServeHTTP(l config.Listen, h http.Handler, cfg *tls.Config) error
- func ListenAndServeTCP(l config.Listen, h tcp.Handler, cfg *tls.Config) error
- func ListenTCP(laddr string, cfg *tls.Config) (net.Listener, error)
- func Shutdown(timeout time.Duration)
- type HTTPProxy
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenAndServeHTTP ¶ added in v1.4.1
func ListenAndServeTCP ¶ added in v1.4.1
Types ¶
type HTTPProxy ¶ added in v1.4.1
type HTTPProxy struct { // Config is the proxy configuration as provided during startup. Config config.Proxy // Time returns the current time as the number of seconds since the epoch. // If Time is nil, time.Now is used. Time func() time.Time // Transport is the http connection pool configured with timeouts. // The proxy will panic if this value is nil. Transport http.RoundTripper // InsecureTransport is the http connection pool configured with // InsecureSkipVerify set. This is used for https proxies with // self-signed certs. InsecureTransport http.RoundTripper // Lookup returns a target host for the given request. // The proxy will panic if this value is nil. Lookup func(*http.Request) *route.Target // Requests is a timer metric which is updated for every request. Requests metrics.Timer // Noroute is a counter metric which is updated for every request // where Lookup() returns nil. Noroute metrics.Counter // Logger is the access logger for the requests. Logger logger.Logger }
HTTPProxy is a dynamic reverse proxy for HTTP and HTTPS protocols.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package gzip provides an HTTP handler which compresses responses if the client supports this, the response is compressable and not already compressed.
|
Package gzip provides an HTTP handler which compresses responses if the client supports this, the response is compressable and not already compressed. |
Click to show internal directories.
Click to hide internal directories.