package
2.8.3+incompatible
Repository: https://github.com/docker/distribution.git
Documentation: pkg.go.dev

# Functions

Background returns a non-nil, empty Context.
GetLogger returns the logger from the current context, if present.
GetLoggerWithField returns a logger instance with the specified field key and value without affecting the context.
GetLoggerWithFields returns a logger instance with the specified fields without affecting the context.
GetRequest returns the http request in the given context.
GetRequestID attempts to resolve the current request id, if possible.
GetRequestLogger returns a logger that contains fields from the request in the current context.
GetResponseLogger reads the current response stats and builds a logger.
GetResponseWriter returns the http.ResponseWriter from the provided context.
GetStringValue returns a string value from the context.
GetVersion returns the application version from the context.
RemoteAddr extracts the remote address of the request, taking into account proxy headers.
RemoteIP extracts the remote IP of the request, taking into account proxy headers.
Since looks up key, which should be a time.Time, and returns the duration since that time.
WithLogger creates a new context with provided logger.
WithRequest places the request on the context.
WithResponseWriter returns a new context and response writer that makes interesting response statistics available within the context.
WithTrace allocates a traced timing span in a new context.
WithValues returns a context that proxies lookups through a map.
WithVars extracts gorilla/mux vars and makes them available on the returned context.
WithVersion stores the application version in the context.

# Variables

Common errors used with this package.
Common errors used with this package.

# Interfaces

Logger provides a leveled-logging interface.