Documentation ¶
Overview ¶
Package rollback provides a friendly interface for rolling back partial state when parent tasks fail.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rollback ¶
type Rollback struct {
// contains filtered or unexported fields
}
Rollback wraps a deferred cleanup task that can be cancelled if the parent task succeeds.
func New ¶
func New(runnable func()) *Rollback
New creates a new Rollback with code to be run to cleanup a dirty state.
Click to show internal directories.
Click to hide internal directories.