Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrExcessiveContention is used to signal that even after retrying, the transaction operations // could not be successfully applied due to database contention. ErrExcessiveContention = stderrors.New("state changing too quickly; try again soon") // ErrNoOperations is returned by TransactionSource implementations to signal that // no transaction operations are available to run. ErrNoOperations = stderrors.New("no transaction operations are available") // ErrNoOperations is returned by TransactionSource implementations to signal that // the transaction list could not be built but the caller should retry. ErrTransientFailure = stderrors.New("transient failure") )
Functions ¶
Types ¶
type Runner ¶
type Runner interface { // RunTransaction applies the specified transaction operations to a database. RunTransaction(ops []txn.Op) error // Run calls the nominated function to get the transaction operations to apply to a database. // If there is a failure due to a txn.ErrAborted error, the attempt is retried up to nrRetries times. Run(transactions TransactionSource) error // ResumeTransactions resumes all pending transactions. ResumeTransactions() error }
Runner instances applies operations to collections in a database.
Click to show internal directories.
Click to hide internal directories.