worker

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2019 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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