Documentation
¶
Overview ¶
Package exec contains helper abstractions for working with external commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Streaming ¶
type Streaming struct { Command string Args []string Env []string Output io.Writer Timeout time.Duration // contains filtered or unexported fields }
Streaming models a generic command execution that consumers can use to execute commands and stream their output to an io.Writer. For example compute commands can use this to standardize the flow control for each compiler toolchain.
func (Streaming) Exec ¶
Exec executes the compiler command and pipes the child process stdout and stderr output to the supplied io.Writer, it waits for the command to exit cleanly or returns an error.
func (*Streaming) MonitorSignals ¶ added in v0.34.0
func (s *Streaming) MonitorSignals()
MonitorSignals spawns a goroutine that configures signal handling so that the long running subprocess can be killed using SIGINT/SIGTERM.
Click to show internal directories.
Click to hide internal directories.