signal

package
v0.5.7 Latest Latest
Warning

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: 4 modules, 10 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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.

Jump to

Keyboard shortcuts

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