worker

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: MIT Imports: 5 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 {
	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) Interrupt

func (w *Worker) Interrupt() (err error)

func (*Worker) Kill

func (w *Worker) Kill() (err error)

Kill forces the child process to shut down without cleanup

func (*Worker) Pause

func (w *Worker) Pause() (err error)

func (*Worker) Resume

func (w *Worker) Resume() (err error)

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

func (*Worker) Wait

func (w *Worker) Wait() (err error)

Jump to

Keyboard shortcuts

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