Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithCorrelationID ¶
ContextWithCorrelationID sets correlation ID to context for further use. When no correlation ID is provided, the function generates a new correlation ID.
func ID ¶
ID returns correlation ID from the context, if found. Otherwise the return value is an empty string.
func SetCorrelationID ¶
SetCorrelationID stored in the context in the HTTP request.
func WithCorrelationID ¶
WithCorrelationID is an HTTP handler factory function for use in the handlers chain. The handler extracts "Correlation-ID" header from HTTP request and saves it in the request context. If there is no "Correlation-ID" header found in the request, a new correlation ID is generated.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.