Documentation ¶
Index ¶
- func ComponentNameFromContext(ctx context.Context) (componentName string, ok bool)
- func LoggerFromContext(ctx context.Context) (logger log.Logger, ok bool)
- func NewContextComponentName(ctx context.Context, componentName string) context.Context
- func NewContextLogger(ctx context.Context, logger log.Logger) context.Context
- func NewContextParams(ctx context.Context, params httprouter.Params) context.Context
- func NewContextRequestID(ctx context.Context, id string) context.Context
- func NewContextStartTime(ctx context.Context, start time.Time) context.Context
- func ParamsFromContext(ctx context.Context) (params httprouter.Params, ok bool)
- func RequestIDFromContext(ctx context.Context) (id string, ok bool)
- func StartTimeFromContext(ctx context.Context) (start time.Time, ok bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComponentNameFromContext ¶
ComponentNameFromContext extracts a component name from a context.
func LoggerFromContext ¶
LoggerFromContext extracts a logger from a context.
func NewContextComponentName ¶
NewContextComponentName creates a new context that carries the provided componentName value.
func NewContextLogger ¶
NewContextLogger creates a new context that carries the provided logger value.
func NewContextParams ¶
NewContextParams creates a new context that carries the provided params value.
func NewContextRequestID ¶
NewContextRequestID creates a new context that carries the provided request ID value.
func NewContextStartTime ¶
NewContextStartTime creates a new context that carries the provided start time.
func ParamsFromContext ¶
func ParamsFromContext(ctx context.Context) (params httprouter.Params, ok bool)
ParamsFromContext extracts params from a context.
func RequestIDFromContext ¶
RequestIDFromContext extracts a request ID from a context.
Types ¶
This section is empty.