Version: v0.5.7 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2017 License: Apache-2.0 Imports: 6 Imported by: 5




This section is empty.


View Source
var Handler = NewCancellable()

Handler is the default registered signal handler. It is created when this package is initialized.


This section is empty.


type Cancellable

type Cancellable struct {
	Exit          bool
	IgnoreRunners bool
	// contains filtered or unexported fields

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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL