Documentation ¶
Index ¶
Constants ¶
View Source
const (
//TransactionIDHeader is the request header to look for
TransactionIDHeader = "X-Request-Id"
)
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 and it will be set as request header.
func NewTransactionID ¶ added in v0.2.0
func NewTransactionID() string
NewTransactionID generates a new random transaction ID conforming to the FT spec
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.