Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchRoutePathTemplate ¶
FetchRoutePathTemplate extracts the path template from a given request, or emptry string if none could be found.
Types ¶
type StatusRecorder ¶
type StatusRecorder struct { http.ResponseWriter StatusCode int }
StatusRecorder wraps the http ResponseWriter, allowing additional instrumentation and metrics capture before the response is returned to the client.
func (*StatusRecorder) WriteHeader ¶
func (sr *StatusRecorder) WriteHeader(code int)
WriteHeader implements the http ResponseWriter WriteHeader interface. This function acts as a middleware which captures the StatusCode on the StatusRecorder and then delegates the actual work of writing the header to the underlying http ResponseWriter.
Click to show internal directories.
Click to hide internal directories.