Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TxFromContext ¶ added in v1.5.2
TxFromContext retrieves the transaction from the context, if available.
func Update ¶ added in v1.5.2
Update is a helper function that will update the job in the store it accepts a context, an update function and creates a new transaction to perform the update if no transaction is provided in the context
Types ¶
type TracingContext ¶ added in v1.5.2
type TracingContext struct { TxContext // contains filtered or unexported fields }
TracingContext is a context that can be used to trace the duration of a transaction and log a debug message if it exceeds a certain threshold.
func NewTracingContext ¶ added in v1.5.2
func NewTracingContext(ctx TxContext) *TracingContext
NewTracingContext creates a new tracing context
func (*TracingContext) Commit ¶ added in v1.5.2
func (t *TracingContext) Commit() error
func (*TracingContext) Rollback ¶ added in v1.5.2
func (t *TracingContext) Rollback() error
func (*TracingContext) WithTracingDuration ¶ added in v1.5.2
func (t *TracingContext) WithTracingDuration(d time.Duration) *TracingContext
WithTracingDuration sets the duration threshold for transaction tracing
Click to show internal directories.
Click to hide internal directories.