Documentation
¶
Overview ¶
Package reqid holds the request-ID context plumbing shared between the middleware that mints the ID (internal/api) and the handlers that want to include it in audit log lines (internal/api/handlers). Lives in its own package so neither side has to import the other.
Index ¶
Constants ¶
View Source
const HeaderName = "X-Request-ID"
HeaderName is the request/response header that carries the per-request ID. Kept here so the middleware and the http client agree.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext returns the request ID associated with ctx, or "" if none was attached (e.g. tests calling a handler directly without going through the middleware).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.