Documentation ¶
Index ¶
- func NewWriter() (*Writer, *Writer)
- func WithRedirect(c *Command)
- type Command
- func (c *Command) Kill() (*Status, error)
- func (c *Command) Running() bool
- func (c *Command) Start() (*Status, error)
- func (c *Command) Status() *Status
- func (c *Command) Stderr() *os.File
- func (c *Command) Stdout() *os.File
- func (c *Command) Stop() (*Status, error)
- func (c *Command) String() string
- func (c *Command) Terminated() bool
- func (c *Command) Wait() (*Status, error)
- type CommandOption
- type Message
- type Reader
- type Status
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithRedirect ¶
func WithRedirect(c *Command)
Types ¶
type Command ¶
type Command struct { Cmd string Args []string Env []string User string Group string Dir string Redirect bool Timeout *time.Duration // contains filtered or unexported fields }
func (*Command) Terminated ¶
type CommandOption ¶
type CommandOption func(*Command)
func WithDir ¶
func WithDir(dir string) CommandOption
func WithEnv ¶
func WithEnv(env []string) CommandOption
func WithGroup ¶
func WithGroup(group string) CommandOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) CommandOption
func WithUser ¶
func WithUser(user string) CommandOption
type Status ¶
type Status struct { Running bool `json:"running"` Terminated bool `json:"terminated"` Started *time.Time `json:"started,omitempty"` Finished *time.Time `json:"finished,omitempty"` Duration *time.Duration `json:"duration,omitempty"` Error *string `json:"error,omitempty"` ExitCode *syscall.WaitStatus `json:"exitCode,omitempty"` Signal *syscall.Signal `json:"signal,omitempty"` }
Click to show internal directories.
Click to hide internal directories.