Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface { // Run is like Output, but without the stdout Run() error // Output executes the command, and returns the stdout Output() ([]byte, error) // SetDir sets the command's working directory SetDir(dir string) // SetEnv sets the environment variables for the command's execution environment SetEnv(env map[string]string) SetStdin(in io.Reader) SetStdout(out io.Writer) SetStderr(out io.Writer) }
type Commander ¶
type Commander interface { // Command returns a Cmd instance which can be used to run a single command. Command(logger logr.Logger, executable string, args ...string) Command // CommandContext returns a Cmd instance which can be used to run a single command. // // The provided context is used to kill the process if the context becomes done // before the command completes on its own. For example, a timeout can be set in // the context. CommandContext(ctx context.Context, logger logr.Logger, executable string, args ...string) Command }
Commander is an interface for creating Commands it can be used for mocking out os command executions for testing
Click to show internal directories.
Click to hide internal directories.