Documentation ¶
Overview ¶
Package exec contains a utility to Docker exec into a running a container
Create an ExecHelper with NewExecHelper and then create new exec commands with Command()
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsExecError ¶
IsExecError returns true if the given error is an execError
Types ¶
type ExecCommand ¶
type ExecCommand struct {
// contains filtered or unexported fields
}
ExecCommand is a command to execute with the helper
func (*ExecCommand) CombinedOutput ¶
func (c *ExecCommand) CombinedOutput() (string, error)
CombinedOutput executes the command and returns a single output
func (*ExecCommand) Input ¶
func (c *ExecCommand) Input(in io.Reader) *ExecCommand
Input sets an input reader on the exec command
type ExecHelper ¶
type ExecHelper struct {
// contains filtered or unexported fields
}
ExecHelper allows execution of commands on a running Docker container
func NewExecHelper ¶
func NewExecHelper(client *docker.Client, container string) *ExecHelper
NewExecHelper creates a new ExecHelper
func (*ExecHelper) Command ¶
func (h *ExecHelper) Command(cmd ...string) *ExecCommand
Command creates a new command to execute
Click to show internal directories.
Click to hide internal directories.