package
0.0.61
Repository: https://github.com/quadev-ltd/qd-common.git
Documentation: pkg.go.dev

# Packages

Package mock is a generated GoMock package.

# Functions

AddCorrelationIDToIncomingContext adds the correlation ID to the context.
AddCorrelationIDToOutgoingContext adds the correlation ID to the context.
AddNewCorrelationIDToContext can ber used as a middleware that adds a new correlation ID to the context.
CreateGinLoggerMiddleware is the middleware that adds a logger with a correlation ID to the context.
CreateLoggerInterceptor is the interceptor that intercepts the gRPC calls and adds a logger with a correlation ID to the context.
GetCorrelationIDFromContext returns the correlation ID obtained from the context.
GetLoggerFromContext returns the logger from the context.
NewLogFactory creates a new log factory.
TransferCorrelationIDToOutgoingContext transfers the correlation ID from the incoming context to the outgoing context.

# Constants

CorrelationIDKey is the key of the correlation ID in the metadata.
LoggerKey is the key for the logger in the context.

# Structs

Factory is the factory for creating a logger.
Logger is the logger of the application.

# Interfaces

Factoryer is the interface for creating a log factory to create a logger.
Loggerer is the interface of the logger.