worker

package
Version: v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(err error) bool

func Debug

func Debug(a ...interface{})

func Debugc

func Debugc(fn func() string)

func Debugf

func Debugf(format string, a ...interface{})

func Debugs

func Debugs(a interface{})

func Error

func Error(a ...interface{})

func Errorc

func Errorc(fn func() string)

func Errorf

func Errorf(format string, a ...interface{})

func Errors

func Errors(a interface{})

func Fatal

func Fatal(a ...interface{})

func Fatalc

func Fatalc(fn func() string)

func Fatalf

func Fatalf(format string, a ...interface{})

func Fatals

func Fatals(a interface{})

func Info

func Info(a ...interface{})

func Infoc

func Infoc(fn func() string)

func Infof

func Infof(format string, a ...interface{})

func Infos

func Infos(a interface{})

func Trace

func Trace(a ...interface{})

func Tracec

func Tracec(fn func() string)

func Tracef

func Tracef(format string, a ...interface{})

func Traces

func Traces(a interface{})

func Warn

func Warn(a ...interface{})

func Warnc

func Warnc(fn func() string)

func Warnf

func Warnf(format string, a ...interface{})

func Warns

func Warns(a interface{})

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
t or T : Toggle theme light dark auto
y or Y : Canonical URL