dexec

package
v0.0.0-...-3b91d86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(ctx context.Context, cli client.CommonAPIClient, containerID string, config Config) error

Exec runs a process on a container, managing I/O, exit codes, etc.

Exec will wait for the program to exit before returning. Cancel the context via a timeout/deadline/cancel to cause Exec to stop waiting and return.

Types

type Config

type Config struct {
	User       string
	Cmd        []string
	Env        []string
	WorkingDir string
	Stdin      io.Reader
	Stdout     io.Writer
	Stderr     io.Writer
	Tty        bool
}

Config configures an execution.

type ExitCodeError

type ExitCodeError int

ExitCodeError is an error which represents a non-zero exit code.

func (ExitCodeError) Error

func (e ExitCodeError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL