Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvContext ¶
EnvContext creates a new context containing an EnvInfo object in it's values storage.
Types ¶
type EnvInfo ¶
EnvInfo stores information that are pertinent to the environment, which won't change over the execution of a program and can be safely cached.
func EnvFromContext ¶
EnvFromContext retrieves an EnvInfo stored within a context.
func NewEnvInfo ¶
NewEnvInfo returns a new initialized EnvInfo instance.
type Info ¶
Info is simply a object that combines EnvInfo and TxInfo for easy of consumption.
func FromContext ¶
FromContext simply gets the EnvInfo and TxInfo object out of the context, returning a combined representation of it.
type TxInfo ¶
type TxInfo struct {
TransactionID uuid.UUID
}
Info is a struct that stores information about a specific transaction. It embeds the environment information but unlike EnvInfo, it is expected to be created multiple time over the execution of a program.
func TxFromContext ¶
TxFromContext retrieves an TxInfo stored within a context.