Documentation
¶
Index ¶
Constants ¶
View Source
const TransactionIDHeader = "X-Request-Id"
TransactionIDHeader is the request header to look for
View Source
const TransactionIDKey string = "transaction_id"
TransactionIDKey is the key used to store the value on the context
Variables ¶
This section is empty.
Functions ¶
func GetTransactionIDFromContext ¶
GetTransactionIDFromContext will look for a transactionID value on the context and return it if found. If none is found, return empty string and an error
func GetTransactionIDFromRequest ¶
GetTransactionIDFromRequest will look on the request for an 'X-Request-Id' header, and use that value as the returned transactionID. If none is found, one will be autogenerated, with a 'tid_' prefix and a random ten character string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.