Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd struct {
// contains filtered or unexported fields
}
Cmd is a command with a streamline.Stream attached to it.
func Attach ¶
Run attaches a streamline.Stream to the command, returning a wrapped Cmd that can be configured with pipeline.Pipeline and run with (*Cmd).Run(...).
Output piping is handled by buffers created by streamline/pipe.NewStream(...).
func (*Cmd) Start ¶
func (c *Cmd) Start() (*streamline.Stream, error)
Start starts a command and returns an error if the command fails to start. It also starts a goroutine that waits for command completion and stops the pipe appropriately.
It always returns a valid Stream that can be used to collect output from the underlying command.
type StreamMode ¶
type StreamMode int
StreamMode indicates what output(s) to attach.
const ( Combined StreamMode = iota Stdout Stderr )
Click to show internal directories.
Click to hide internal directories.