Documentation ¶
Index ¶
- Constants
- func NewMaxLatencyWriter(dst writeFlusher, latency time.Duration) *maxLatencyWriter
- type AccessLogRecord
- type AccessLogger
- type Proxy
- type RequestHandler
- func (h *RequestHandler) HandleBadGateway(err error)
- func (h *RequestHandler) HandleHeartbeat()
- func (h *RequestHandler) HandleHttpRequest(transport *http.Transport, endpoint *route.Endpoint) (*http.Response, error)
- func (h *RequestHandler) HandleMissingRoute()
- func (h *RequestHandler) HandleTcpRequest(endpoint *route.Endpoint)
- func (h *RequestHandler) HandleUnsupportedProtocol()
- func (h *RequestHandler) HandleWebSocketRequest(endpoint *route.Endpoint)
- func (h *RequestHandler) SetTraceHeaders(routerIp, addr string)
- func (h *RequestHandler) WriteResponse(endpointResponse *http.Response) int64
Constants ¶
View Source
const ( VcapTraceHeader = "X-Vcap-Trace" VcapCookieId = "__VCAP_ID__" StickyCookieKey = "JSESSIONID" )
View Source
const ( VcapBackendHeader = "X-Vcap-Backend" CfRouteEndpointHeader = "X-Cf-RouteEndpoint" VcapRouterHeader = "X-Vcap-Router" )
Variables ¶
This section is empty.
Functions ¶
func NewMaxLatencyWriter ¶
Types ¶
type AccessLogRecord ¶
type AccessLogRecord struct { Request *http.Request Response *http.Response RouteEndpoint *route.Endpoint StartedAt time.Time FirstByteAt time.Time FinishedAt time.Time BodyBytesSent int64 }
func (*AccessLogRecord) Emit ¶
func (r *AccessLogRecord) Emit(e emitter.Emitter)
func (*AccessLogRecord) FormatRequestHeader ¶
func (r *AccessLogRecord) FormatRequestHeader(k string) (v string)
func (*AccessLogRecord) FormatStartedAt ¶
func (r *AccessLogRecord) FormatStartedAt() string
func (*AccessLogRecord) ResponseTime ¶
func (r *AccessLogRecord) ResponseTime() float64
type AccessLogger ¶
type AccessLogger struct {
// contains filtered or unexported fields
}
func NewAccessLogger ¶
func NewAccessLogger(f io.Writer, loggregatorUrl, loggregatorSharedSecret string, index uint) *AccessLogger
func (*AccessLogger) Log ¶
func (x *AccessLogger) Log(r AccessLogRecord)
func (*AccessLogger) Run ¶
func (x *AccessLogger) Run()
func (*AccessLogger) Stop ¶
func (x *AccessLogger) Stop()
type Proxy ¶
type RequestHandler ¶
type RequestHandler struct {
// contains filtered or unexported fields
}
func NewRequestHandler ¶
func NewRequestHandler(request *http.Request, response http.ResponseWriter) RequestHandler
func (*RequestHandler) HandleBadGateway ¶
func (h *RequestHandler) HandleBadGateway(err error)
func (*RequestHandler) HandleHeartbeat ¶
func (h *RequestHandler) HandleHeartbeat()
func (*RequestHandler) HandleHttpRequest ¶
func (*RequestHandler) HandleMissingRoute ¶
func (h *RequestHandler) HandleMissingRoute()
func (*RequestHandler) HandleTcpRequest ¶
func (h *RequestHandler) HandleTcpRequest(endpoint *route.Endpoint)
func (*RequestHandler) HandleUnsupportedProtocol ¶
func (h *RequestHandler) HandleUnsupportedProtocol()
func (*RequestHandler) HandleWebSocketRequest ¶
func (h *RequestHandler) HandleWebSocketRequest(endpoint *route.Endpoint)
func (*RequestHandler) SetTraceHeaders ¶
func (h *RequestHandler) SetTraceHeaders(routerIp, addr string)
func (*RequestHandler) WriteResponse ¶
func (h *RequestHandler) WriteResponse(endpointResponse *http.Response) int64
Click to show internal directories.
Click to hide internal directories.