Categorygithub.com/avito-tech/go-transaction-manager/trm/v2
modulepackage
2.0.0
Repository: https://github.com/avito-tech/go-transaction-manager.git
Documentation: pkg.go.dev

# Packages

Package context implement a setter and getter to put and get trm.Transaction from context.Context.
Package drivers contains instruments for drivers.
Package manager implements a trm.Manager interface.
Package settings implements trm.Settings.

# Functions

IsSkippable checks that the error is ErrSkip.
Skippable marks error as ErrSkip.
UnSkippable removes ErrSkip from error.

# Constants

PropagationNested executes within a nested transaction if a current transaction exists, create a new one if none exists.
PropagationNever executes non-transactionally, throws an exception if a transaction exists.
PropagationNotSupported executes non-transactionally, suspends the current transaction if one exists.
PropagationRequired supports a current transaction, create a new one if none exists.
PropagationRequiresNew creates a new transaction, suspends the current transaction if one exists.
PropagationsMandatory supports a current transaction, throws an exception if none exists.
PropagationSupports supports a current transaction, execute non-transactionally if none exists.

# Variables

ErrAlreadyClosed occurs if the transaction was closed outside the Manager.
ErrBegin occurs when a transaction started with an error.
ErrCommit occurs when commit finished with an error.
ErrNestedBegin occurs when nested transaction started with an error.
ErrNestedCommit occurs when nested transaction finished with an error.
ErrNestedRollback occurs when rollback nested transaction finished with an error.
ErrPropagation occurs because of Propagation setting.
ErrPropagationMandatory occurs when the transaction doesn't exist.
ErrPropagationNever occurs when the transaction already exists.
ErrRollback occurs when rollback finished with an error.
ErrSkip marks error to skip rollback for transaction because of inside error.
ErrTransaction is an error while working with a transaction.

# Interfaces

CtxKey is a type to identify trm.Transaction in a context.Context.
Manager manages a transaction from Begin to Commit or Rollback.
NestedTrFactory creates nested Transaction.
Settings is the configuration of the Manager.
Transaction wraps different transaction implementations.
СtxManager sets and gets a Transaction in/from context.Context.

# Type aliases

CtxGetter gets Transaction from context.Context.
Propagation is a type for transaction propagation rules.
TrFactory is used in Manager to creates Transaction.