# Functions
NewMockTransactionManager Create a mock verison of the transaction manager.
NewTransactionManager returns an instance of a TransactionManager.
# Constants
Acknowledged is used to represent an Acknowledged action.
Committed is used to represent a Committed action.
DefaultTxManagerChannelBufferSize is the concurrent transactions before the tx manager begins backpressure.
DefaultTxManagerEvictionDurationSeconds is the amount of time before a transaction is evicted and rolled back, 10 minutes by default.
DefaultTxManagerTickerIntervalSeconds is the ticker interval to mark transactions as stale / timeout.
DefaultTxManagerTimeoutDurationSeconds is the amount of time before a transaction is marked as stale, 5 minutes by default.
Failed is used to represent a Failed transaction.
InProgress is used to represent a InProgress transaction.
Rejected is used to represent an Rejected action.
Stale is used to represent a Stale transaction.
Succeeded is used to represent a Succeeded transaction.
# Structs
AckAction acknowledges an action for a given transaction.
Action represents a single operation in a checkmanager, which consists of one or more actions.
ActionNotFound is triggered when trying to look up a non-existing action for a transaction in the transaction checkmanager.
CommitAction is used to commit an action for a certain transaction.
CompleteTransaction completes a transaction.
DiscardTransaction rolls back a transaction and marks a transaction as a failure.
EvictedTransaction is triggered once a stale transaction is evicted.
IntakeTransaction represents an intake checkmanager which consists of one or more actions.
MockTransactionManager is a mock implementation of the transaction manager for tests.
RejectAction rejects an action for a given transaction.
SetTransactionState is used to set transaction state for a given transactionID and Key.
StartTransaction starts a transaction for a given checkID, with an optional OnComplete callback function.
StopTransactionManager triggers the shutdown of the transaction checkmanager.
TransactionCompleted is triggered when trying to look up a transaction that is already in a failed / succeeded state.
TransactionNotFound is triggered when trying to look up a non-existing transaction in the transaction checkmanager.
TransactionState keeps the state for a given key.
# Interfaces
TransactionAPI contains the functions required for transactional behaviour.
TransactionManager encapsulates all the functionality of the transaction manager to keep track of transactions.
# Type aliases
ActionStatus is an integer representing the state of the action.
TransactionStatus is an integer representing the state of the transaction.