Documentation ¶
Index ¶
- Constants
- func HandleRoundTripError(rw http.ResponseWriter, req *http.Request, err error)
- func New(cfg *Config, trnsprt http.RoundTripper, preparer request.Preparer, ...) (*httputil.ReverseProxy, error)
- func StatusCodeFromRoundTripError(err error) int
- func StatusText(statusCode int) string
- type Config
- type HandleRoundTripErrorFunc
Constants ¶
View Source
const StatusClientClosedRequest = 499
StatusClientClosedRequest non-standard HTTP status code for client disconnection
View Source
const StatusClientClosedRequestText = "Client Closed Connection"
StatusClientClosedRequestText non-standard HTTP status for client disconnection
Variables ¶
This section is empty.
Functions ¶
func HandleRoundTripError ¶
func HandleRoundTripError(rw http.ResponseWriter, req *http.Request, err error)
func New ¶
func New( cfg *Config, trnsprt http.RoundTripper, preparer request.Preparer, modifier response.Modifier, errorHandler HandleRoundTripErrorFunc, pool httputil.BufferPool, ) (*httputil.ReverseProxy, error)
New creates a new HTTP proxy
func StatusText ¶
Types ¶
type Config ¶
type Config struct { Transport *transport.Config `json:"transport,omitempty"` FlushInterval *json.Duration `json:"flushInterval,omitempty"` Request *request.ProxyConfig `json:"request,omitempty"` Response *response.ProxyConfig `json:"response,omitempty"` }
func (*Config) SetDefault ¶
type HandleRoundTripErrorFunc ¶
type HandleRoundTripErrorFunc func(rw http.ResponseWriter, req *http.Request, err error)
Click to show internal directories.
Click to hide internal directories.