Documentation ¶
Index ¶
- type Control
- func (c *Control) FinishRunning(cmd *exec.Cmd) error
- func (c *Control) FinishRunningParallel(cmds ...*exec.Cmd) error
- func (c *Control) InputCommand(input, cmd string, args ...string) (*exec.Cmd, error)
- func (c *Control) NoOutput(cmd *exec.Cmd) error
- func (c *Control) Output(cmd *exec.Cmd) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Control ¶
type Control struct { Timeout time.Duration Interrupt *time.Timer Terminate *time.Timer // contains filtered or unexported fields }
Control can commands until a timeout is reached, at which point it signals and then terminates them.
func NewControl ¶
NewControl constructs a Control with the specified arguments, instiating other necessary fields.
func (*Control) FinishRunning ¶
FinishRunning returns cmd.Wait() and/or times out.
func (*Control) FinishRunningParallel ¶
FinishRunningParallel executes multiple commands in parallel
func (*Control) InputCommand ¶
InputCommand returns exec.Command(cmd, args...) while calling .StdinPipe().WriteString(input)
Click to show internal directories.
Click to hide internal directories.