proc

package
v0.0.0-...-fd2add7 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSignal

func ParseSignal(sig string) (s syscall.Signal, ok bool)

Types

type Cmd

type Cmd struct {
	Env   []string `json:"env"`
	Dir   string   `json:"dir"`
	Path  string   `json:"path"`
	Args  []string `json:"args"`
	Scrub bool     `json:"scrub"`
}

Cmd …

func ParseCmd

func ParseCmd(src string) (*Cmd, error)

func (Cmd) String

func (x Cmd) String() string

type Phase

type Phase int
const (
	NotStarted Phase = iota
	Running
	Exited
	Stopped
	Signaled
	Continued
)

func (Phase) String

func (ph Phase) String() string

type Proc

type Proc interface {
	Scrub()
	Wait() (Stat, error)
	Signal(sig string) error
	GetEnv() []string
	GetCmd() Cmd
	IsDone() bool
	Peek() Stat
	Stdin() io.WriteCloser
	Stdout() io.ReadCloser
	Stderr() io.ReadCloser
	X() circuit.X
}

func MakeProc

func MakeProc(cmd Cmd) Proc

type Stat

type Stat struct {
	Cmd   Cmd    `json:"cmd"`
	Exit  error  `json:"exit"`
	Phase string `json:"phase"`
}

func (Stat) String

func (s Stat) String() string

type XProc

type XProc struct {
	Proc
}

func (XProc) Peek

func (x XProc) Peek() Stat

func (XProc) Signal

func (x XProc) Signal(sig string) error

func (XProc) Stderr

func (x XProc) Stderr() circuit.X

func (XProc) Stdin

func (x XProc) Stdin() circuit.X

func (XProc) Stdout

func (x XProc) Stdout() circuit.X

func (XProc) Wait

func (x XProc) Wait() (Stat, error)

type YProc

type YProc struct {
	X circuit.X
}

func (YProc) GetCmd

func (y YProc) GetCmd() Cmd

func (YProc) GetEnv

func (y YProc) GetEnv() []string

func (YProc) IsDone

func (y YProc) IsDone() bool

func (YProc) Peek

func (y YProc) Peek() Stat

func (YProc) Scrub

func (y YProc) Scrub()

func (YProc) Signal

func (y YProc) Signal(sig string) error

func (YProc) Stderr

func (y YProc) Stderr() io.ReadCloser

func (YProc) Stdin

func (y YProc) Stdin() io.WriteCloser

func (YProc) Stdout

func (y YProc) Stdout() io.ReadCloser

func (YProc) Wait

func (y YProc) Wait() (Stat, error)

Jump to

Keyboard shortcuts

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