Documentation
¶
Overview ¶
Package transaction defines an application transaction boundary independent of a storage driver. Pass the callback context to every participating operation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) Within ¶
Within owns begin/commit/rollback at the outermost call. Inner failures mark the shared scope rollback-only, even if their caller handles the returned error. Panics roll back and propagate unchanged. Work must finish before fn returns; do not retain the context or launch unjoined goroutines from the callback.
type Runner ¶
Runner is the application-facing contract. Nested calls on the same manager join the existing transaction, rather than creating savepoints.
type Transaction ¶
Transaction is implemented by storage adapters. Commit must honor the caller context. Rollback receives a separate bounded context for cleanup.