# Functions
CloseNotify is a middleware that cancels ctx when the underlying connection has gone away.
Compress is a middleware that compresses response body of a given content types to a data format based on Accept-Encoding request header.
DefaultCompress is a middleware that compresses response body of predefined content types to a data format based on Accept-Encoding request header.
No description provided by the author
GetReqID returns a request ID from the given context if one is present.
Heartbeat endpoint middleware useful to setting up a path like `/ping` that load balancers or uptime testing external services can make a request before hitting any routes.
Logger is a middleware that logs the start and end of each request, along with some useful data about what was requested, what the response status was, and how long it took to return.
NewWrapResponseWriter wraps an http.ResponseWriter, returning a proxy that allows you to hook into various parts of the response process.
NextRequestID generates the next request ID in the sequence.
NoCache is a simple piece of middleware that sets a number of HTTP headers to prevent a router (or subrouter) from being cached by an upstream proxy and/or client.
Profiler is a convenient subrouter used for mounting net/http/pprof.
RealIP is a middleware that sets a http.Request's RemoteAddr to the results of parsing either the X-Forwarded-For header or the X-Real-IP header (in that order).
Recoverer is a middleware that recovers from panics, logs the panic (and a backtrace), and returns a HTTP 500 (Internal Server Error) status if possible.
RedirectSlashes is a middleware that will match request paths with a trailing slash and redirect to the same path, less the trailing slash.
RequestID is a middleware that injects a request ID into the context of each request.
No description provided by the author
StripSlashes is a middleware that will match request paths with a trailing slash, strip it from the path and continue routing through the mux, if a route matches, then it will serve the handler.
Throttle is a middleware that limits number of currently processed requests at a time.
ThrottleBacklog is a middleware that limits number of currently processed requests at a time and provides a backlog for holding a finite number of pending requests.
Timeout is a middleware that cancels ctx after a given timeout and return a 504 Gateway Timeout error to the client.
No description provided by the author
WithValue is a middleware that sets a given key/value in a context chain.
# Constants
RequestIDKey is the key that holds th unique request ID in a request context.
StatusClientClosedRequest represents a 499 Client Closed Request (Nginx) HTTP status.
# Variables
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
WrapResponseWriter is a proxy around an http.ResponseWriter that allows you to hook into various parts of the response process.