Documentation ¶
Overview ¶
Package correlation provides a set of tools to add correlation ID to the context at certain levels (transport, endpoint) of the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext returns the correlation ID from the context (if any). Returns false as the second parameter if none is found.
func GRPCToContext ¶
func GRPCToContext(headers ...string) grpc.ServerRequestFunc
GRPCToContext moves a correlation ID from request header to context (if any).
func HTTPToContext ¶
func HTTPToContext(headers ...string) http.RequestFunc
HTTPToContext moves a correlation ID from request header to context (if any).
func Middleware ¶
func Middleware() endpoint.Middleware
Middleware creates a new middleware that ensures the context contains a correlation ID.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.