Documentation ¶
Index ¶
Constants ¶
View Source
const (
MaxRetries = 3
)
Variables ¶
View Source
var NoEndpointsAvailable = errors.New("No endpoints available")
Functions ¶
func DisableSourceIPLogging ¶
func DisableSourceIPLogging(t bool) func(*RequestHandler)
func DisableXFFLogging ¶
func DisableXFFLogging(t bool) func(*RequestHandler)
func SetRequestXCfInstanceId ¶
func SetRequestXRequestStart ¶
Types ¶
type Forwarder ¶
func (*Forwarder) ForwardIO ¶
func (f *Forwarder) ForwardIO(clientConn, backendConn io.ReadWriter) int
ForwardIO sets up websocket forwarding with a backend
It returns after one of the connections closes.
If the backend response code is not 101 Switching Protocols, then ForwardIO will return immediately, allowing the caller to close the connections.
type RequestHandler ¶
type RequestHandler struct {
// contains filtered or unexported fields
}
func NewRequestHandler ¶
func NewRequestHandler(request *http.Request, response utils.ProxyResponseWriter, r metrics.ProxyReporter, logger logger.Logger, endpointDialTimeout time.Duration, tlsConfig *tls.Config, opts ...func(*RequestHandler)) *RequestHandler
func (*RequestHandler) HandleBadGateway ¶
func (h *RequestHandler) HandleBadGateway(err error, request *http.Request)
func (*RequestHandler) HandleTcpRequest ¶
func (h *RequestHandler) HandleTcpRequest(iter route.EndpointIterator)
func (*RequestHandler) HandleWebSocketRequest ¶
func (h *RequestHandler) HandleWebSocketRequest(iter route.EndpointIterator)
func (*RequestHandler) Logger ¶
func (h *RequestHandler) Logger() logger.Logger
Click to show internal directories.
Click to hide internal directories.