Documentation ¶
Index ¶
Constants ¶
View Source
const (
LazyTxID = "LAZY_TX"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Identifier ¶
type Identifier interface { ID() string // contains filtered or unexported methods }
type OnTransactionCompletedFunc ¶
type OnTransactionCompletedFunc func(transactionResult error)
type Transaction ¶
type Transaction interface { Identifier UnLazy(ctx context.Context) error SessionID() string // OnBeforeCommit add callback, which will be called before commit transaction // the method will be not call the method if some error happen and transaction will not be committed OnBeforeCommit(f OnTransactionBeforeCommit) OnCompleted(f OnTransactionCompletedFunc) Rollback(ctx context.Context) error }
func AsTransaction ¶
func AsTransaction(id Identifier) (Transaction, error)
Click to show internal directories.
Click to hide internal directories.