Documentation ¶ Index ¶ type Worker func Spawn(args ...string) (w *Worker) func (w *Worker) Kill() (err error) func (w *Worker) Stop() (err error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Worker ¶ type Worker struct { *exec.Cmd StdConn stdconn.StdConn // contains filtered or unexported fields } func Spawn ¶ func Spawn(args ...string) (w *Worker) Spawn starts up an arbitrary executable file with given arguments and attaches a connection to its stdin/stdout func (*Worker) Kill ¶ func (w *Worker) Kill() (err error) Kill forces the child process to shut down without cleanup func (*Worker) Stop ¶ func (w *Worker) Stop() (err error) Stop signals the worker to shut down cleanly. Note that the worker must have handlers for os.Signal messages. It is possible and neater to put a quit method in the IPC API and use the quit channel built into the StdConn Source Files ¶ View all Source files worker.go Click to show internal directories. Click to hide internal directories.