Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Handler = NewCancellable()
Handler is the default registered signal handler. It is created when this package is initialized.
Functions ¶
This section is empty.
Types ¶
type Cancellable ¶
Cancellable is a cancellable process triggered via signal. It will cascade through the context's cancel functions destroying each build process as a result.
func NewCancellable ¶
func NewCancellable() *Cancellable
NewCancellable creates a cancellable process
func (*Cancellable) AddFile ¶ added in v0.5.0
func (c *Cancellable) AddFile(filename string)
AddFile adds a temporary filename to be reaped if the action is canceled.
func (*Cancellable) AddFunc ¶
func (c *Cancellable) AddFunc(f context.CancelFunc)
AddFunc adds a cancel func to the list.
func (*Cancellable) AddRunner ¶
func (c *Cancellable) AddRunner(run chan struct{})
AddRunner adds a chan struct{} to the list of runners. See BuildConfig for more.
func (*Cancellable) RemoveFile ¶ added in v0.5.0
func (c *Cancellable) RemoveFile(filename string)
RemoveFile removes a file from the temporary file list.
func (*Cancellable) SignalHandler ¶
func (c *Cancellable) SignalHandler(signals chan os.Signal)
SignalHandler is the signal handler that will be used throughout box to cancel things.
Click to show internal directories.
Click to hide internal directories.