Versions in this module Expand all Collapse all v0 v0.1.2 Sep 13, 2018 v0.1.1 Sep 12, 2018 v0.1.0 Sep 12, 2018 Changes in this version + const DEFAULT_LINE_BUFFER_SIZE + const DEFAULT_STREAM_CHAN_SIZE + const FATAL + const FINISHED + const INITIAL + const INTERRUPT + const RUNNING + const STARTING + const STOPPING + const UNKNOWN + type Backoff struct + Factor float64 + Jitter bool + Max time.Duration + Min time.Duration + func (b *Backoff) Attempt() float64 + func (b *Backoff) Duration() time.Duration + func (b *Backoff) ForAttempt(attempt float64) time.Duration + func (b *Backoff) Reset() + type Cmd struct + Args []string + DelayStart uint + Dir string + Env []string + Name string + RetryTimes uint + State CmdState + Stderr chan string + Stdout chan string + func NewCmd(name string, args ...string) *Cmd + func NewCmdOptions(options Options, name string, args ...string) *Cmd + func (c *Cmd) CloneCmd() *Cmd + func (c *Cmd) Done() <-chan struct{} + func (c *Cmd) IsFinalState() bool + func (c *Cmd) SetDelayStart(delayStart uint) + func (c *Cmd) SetDir(dir string) + func (c *Cmd) SetEnv(env []string) + func (c *Cmd) SetRetryTimes(retryTimes uint) + func (c *Cmd) Signal(sig syscall.Signal) error + func (c *Cmd) Start() <-chan Status + func (c *Cmd) Status() Status + func (c *Cmd) Stop() error + func (c *Cmd) ToJSON() JSONProcess + type CmdState uint + func (p CmdState) String() string + type ErrLineBufferOverflow struct + BufferFree int + BufferSize int + Line string + func (e ErrLineBufferOverflow) Error() string + type JSONProcess struct + Cmd string + DelayStart uint + Dir string + Env []string + Error error + ExitCode int + PID int + RetryTimes uint + RunTime float64 + StartTime time.Time + State string + type Options struct + Buffered bool + Streaming bool + type OutputBuffer struct + func NewOutputBuffer() *OutputBuffer + func (rw *OutputBuffer) Lines() []string + func (rw *OutputBuffer) Write(p []byte) (n int, err error) + type OutputStream struct + func NewOutputStream(streamChan chan string) *OutputStream + func (rw *OutputStream) Lines() <-chan string + func (rw *OutputStream) SetLineBufferSize(n int) + func (rw *OutputStream) Write(p []byte) (n int, err error) + type Overseer struct + func NewOverseer() *Overseer + func (ovr *Overseer) Add(id string, args ...string) *Cmd + func (ovr *Overseer) HasProc(id string) bool + func (ovr *Overseer) ListAll() []string + func (ovr *Overseer) Remove(id string) bool + func (ovr *Overseer) Signal(id string, sig syscall.Signal) error + func (ovr *Overseer) Status(id string) Status + func (ovr *Overseer) Stop(id string) error + func (ovr *Overseer) StopAll() + func (ovr *Overseer) Supervise(id string) + func (ovr *Overseer) SuperviseAll() + func (ovr *Overseer) ToJSON(id string) JSONProcess + type Status struct + Cmd string + Error error + Exit int + PID int + Runtime float64 + StartTs int64 + Stderr []string + Stdout []string + StopTs int64