Documentation ¶
Overview ¶
Package process contains an implementation of a callback-based asynchronous process.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Async ¶
type Async struct { // Command to run asynchronously Command *exec.Cmd // OnStart is called once the process has been started. OnStart func(p *os.Process) // OnExit will be called, if non-nil, once the process exits (with or without // an error). OnExit is called after any call to either OnSuccess or OnError. OnExit func(state *os.ProcessState, err error) // OnSuccess will be called if it is non-nil and the process exits // successfully. OnSuccess func(state *os.ProcessState) // OnError will be called if it is non-nil and the process exits with an // error. OnError func(state *os.ProcessState, err error) }
Async controls an asynchronous process with callbacks to handle its exit. Each callback can be nil to ignore that particular process state.
Click to show internal directories.
Click to hide internal directories.