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 NewContextRequestID(ctx context.Context, id string) context.Context
- func RequestIDFromContext(ctx context.Context) (id string, 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 NewContextRequestID ¶
NewContextRequestID creates a new context that carries the provided request ID value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.