Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
type Command struct { // ID allows reconnecting commands that have a TTY. ID string Command string Args []string TTY bool Stdin bool UID uint32 GID uint32 Env []string WorkingDir string }
Command represents an external command to be run
type Execer ¶
Execer starts commands.
func RemoteExecer ¶
RemoteExecer creates an execution interface from a WebSocket connection.
type LocalExecer ¶
type LocalExecer struct { // ChildProcessPriority overrides the default niceness of all child processes launch by LocalExecer. ChildProcessPriority *int }
LocalExecer executes command on the local system.
type Process ¶
type Process interface { // Pid is populated immediately during a successful start with the process ID. Pid() int // Stdout returns an io.WriteCloser that will pipe writes to the remote command. // Closure of stdin sends the corresponding close message. Stdin() io.WriteCloser // Stdout returns an io.Reader that is connected to the command's standard output. Stdout() io.Reader // Stderr returns an io.Reader that is connected to the command's standard error. Stderr() io.Reader // Resize resizes the TTY if a TTY is enabled. Resize(ctx context.Context, rows, cols uint16) error // Wait returns ExitError when the command terminates with a non-zero exit code. Wait() error // Close terminates the process and underlying connection(s). // It must be called otherwise a connection or process may leak. Close() error }
Process represents a started command.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.