Documentation ¶
Overview ¶
Package cleanup handles cleanup tasks for cleaning up after a run.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List struct {
// contains filtered or unexported fields
}
List is a list of things that should happen in case the program receives a signal. This should be things like making sure temp files are deleted, volumes are destroyed, etc.
func NewList ¶
func NewList() *List
NewList will create a new List that will run all registered functions on SIGINT or SIGTERM.
func (*List) Add ¶
Add will register a function to be invoked on system exit unless the returned function is called. The given function is wrapped in the return function, so it can be used in its place. This function MUST be called in order to deregister it on exit if it cannot be called idempotently. The order of functions invoked on exit is not guaranteed to be stable.