Documentation ¶
Index ¶
- func ContextWithFilepath(ctx context.Context, filepath string) context.Context
- func ContextWithMessageID(ctx context.Context, messageID string) context.Context
- func ContextWithProcessorID(ctx context.Context, processorID string) context.Context
- func ContextWithRequestID(ctx context.Context, requestID string) context.Context
- func FilepathFromContext(ctx context.Context) string
- func MessageIDFromContext(ctx context.Context) string
- func ProcessorIDFromContext(ctx context.Context) string
- func RequestIDFromContext(ctx context.Context) string
- type FilepathLogCtxHook
- type MessageIDLogCtxHook
- type ProcessorIDLogCtxHook
- type RequestIDLogCtxHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithFilepath ¶ added in v0.6.0
ContextWithFilepath wraps ctx and returns a context that contains filepath.
func ContextWithMessageID ¶
ContextWithMessageID wraps ctx and returns a context that contains message ID.
func ContextWithProcessorID ¶ added in v0.11.0
ContextWithProcessorID wraps ctx and returns a context that contains processor ID.
func ContextWithRequestID ¶
ContextWithRequestID wraps ctx and returns a context that contains requestID.
func FilepathFromContext ¶ added in v0.6.0
FilepathFromContext fetches the record filepath from the context. If the context does not contain a filepath it returns nil.
func MessageIDFromContext ¶
MessageIDFromContext fetches the record message ID from the context. If the context does not contain a message ID it returns nil.
func ProcessorIDFromContext ¶ added in v0.11.0
ProcessorIDFromContext fetches the record processor ID from the context. If the context does not contain a processor ID it returns nil.
func RequestIDFromContext ¶
RequestIDFromContext fetches the request ID from the context. If the context does not contain a request ID it returns nil.
Types ¶
type FilepathLogCtxHook ¶ added in v0.6.0
type FilepathLogCtxHook struct{}
FilepathLogCtxHook fetches the record filepath from the context and if it exists it adds the filepath to the log output.
type MessageIDLogCtxHook ¶
type MessageIDLogCtxHook struct{}
MessageIDLogCtxHook fetches the record message ID from the context and if it exists it adds the messageID to the log output.
type ProcessorIDLogCtxHook ¶ added in v0.11.0
type ProcessorIDLogCtxHook struct{}
ProcessorIDLogCtxHook fetches the record processor ID from the context and if it exists it adds the processorID to the log output.
type RequestIDLogCtxHook ¶
type RequestIDLogCtxHook struct{}
RequestIDLogCtxHook fetches the request ID from the context and if it exists it adds the request ID to the log output.