Documentation
¶
Index ¶
- func ComponentNameFromContext(ctx context.Context) (componentName string, ok bool)
- func LoggerFromContext(ctx context.Context) (logger *zap.Logger, ok bool)
- func NewContextComponentName(ctx context.Context, componentName string) context.Context
- func NewContextLogger(ctx context.Context, logger *zap.Logger) context.Context
- func NewContextRequestID(ctx context.Context, id string) context.Context
- func NewContextStartTime(ctx context.Context, start time.Time) context.Context
- 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 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 RequestIDFromContext ¶
RequestIDFromContext extracts a request ID from a context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.