package
1.5.0
Repository: https://github.com/m3db/m3.git
Documentation: pkg.go.dev

# Functions

Compression adds suitable response compression based on the client's Accept-Encoding headers.
Cors adds CORS headers will be added to all responses.
Default is the default list of middleware functions applied if no middleware functions are set in the HandlerOptions.
NewLoggingOptions returns new options from the config.
Panic recovers from panics and logs the error/stacktrace if possible.
PrometheusRangeRewrite is middleware that, when enabled, will rewrite the query parameter on the request (url and body, if present) if it's determined that the query contains a range duration that is less than the resolution that will be used to serve the request.
RequestID populates the request scoped logger with a unique request ID.
ResponseLogging logs the response time if the request took longer than the configured threshold.
ResponseMetrics records metrics for the http response.
RewriteRangeDuration is the driver function for the PrometheusRangeRewrite middleware.
Source adds the headers.SourceHeader value to the request context.
Tracing applies OpenTracing compatible middleware, which will start a span for each incoming request.

# Variables

WithNoResponseLogging disables response logging for a route.

# Structs

LoggingOptions are the options for the logging middleware.
MetricsOptions are the options for the metrics middleware.
Options is the set of parameters passed to the Register function.
PrometheusRangeRewriteOptions are the options for the prometheus range rewriting middleware.
QueryParams are the query request parameters.
SourceOptions are the options for the source middleware.

# Type aliases

Fields returns additional logging fields to add to the response log message.
OverrideOptions is a function that returns new Options from the provided Options.
ParseQueryParams parses the query parameters from the request.
Register is a func to build the set of middleware functions.