Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action interface {
// Execute executes this action, returning error if any.
Execute(ctx context.Context) error
// Rollback rollbacks this action, returning error if any.
Rollback() error
}
Action is an abstraction of some action that can be rolled back.
type ActionQueue ¶
type ActionQueue struct {
// contains filtered or unexported fields
}
ActionQueue represents a queue of executable actions. Any action that fails triggers cascade previous actions rollback.
func NewActionQueue ¶
func NewActionQueue(actions ...Action) *ActionQueue
Click to show internal directories.
Click to hide internal directories.