Documentation ¶
Index ¶
Constants ¶
View Source
const HeaderKey = "X-Request-Id"
HeaderKey is the header key for the request ID.
View Source
const MaxRequestID = 64
MaxRequestID is the maximum allowed length for a request id.
Variables ¶
This section is empty.
Functions ¶
func AddToContext ¶
AddToContext uses adds a unique requestid to the context and the response headers of each request.
func FromContext ¶
FromContext returns the request ID from the context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.