Documentation ¶
Index ¶
- type Logging
- type Recovery
- type Savepoint
- func (s Savepoint) Check(ctx weave.Context, store weave.KVStore, tx weave.Tx, next weave.Checker) (weave.CheckResult, error)
- func (s Savepoint) Deliver(ctx weave.Context, store weave.KVStore, tx weave.Tx, next weave.Deliverer) (weave.DeliverResult, error)
- func (s Savepoint) OnCheck() Savepoint
- func (s Savepoint) OnDeliver() Savepoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logging ¶
type Logging struct{}
Logging is a decorator to log messages as they pass through
type Recovery ¶
type Recovery struct{}
Recovery is a decorator to recover from panics in transactions, so we can log them as errors
type Savepoint ¶
type Savepoint struct {
// contains filtered or unexported fields
}
Savepoint will isolate all data inside of the call, and commit/rollback to savepoint based on if error
func NewSavepoint ¶
func NewSavepoint() Savepoint
NewSavepoint creates a Savepoint decorator, but you must call OnCheck/OnDeliver so it will be triggered
func (Savepoint) Check ¶
func (s Savepoint) Check(ctx weave.Context, store weave.KVStore, tx weave.Tx, next weave.Checker) (weave.CheckResult, error)
Check will optionally set a checkpoint
func (Savepoint) Deliver ¶
func (s Savepoint) Deliver(ctx weave.Context, store weave.KVStore, tx weave.Tx, next weave.Deliverer) (weave.DeliverResult, error)
Deliver will optionally set a checkpoint
Click to show internal directories.
Click to hide internal directories.