Documentation ¶
Overview ¶
Package remotecommand contains functions related to executing commands in and attaching to pods.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeExec ¶
func ServeExec(w http.ResponseWriter, req *http.Request, executor RemoteExecutor, podName string, uid types.UID, container string, cmd []string, streamOpts *Options, idleTimeout, streamCreationTimeout time.Duration, supportedProtocols []string)
ServeExec handles requests to execute a command in a container. After creating/receiving the required streams, it delegates the actual execution to the executor.
Types ¶
type Options ¶
Options contains details about which streams are required for remote command execution.
type RemoteExecutor ¶
type RemoteExecutor interface { // ExecInContainer executes a command in a container in the pod, copying data // between in/out/err and the container's stdin/stdout/stderr. ExecInContainer(name string, uid types.UID, container string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error }
Executor knows how to execute a command in a container in a pod.
type TerminalSize ¶
TerminalSize represents the width and height of a terminal.
type TerminalSizeQueue ¶
type TerminalSizeQueue interface { // Next returns the new terminal size after the terminal has been resized. It returns nil when // monitoring has been stopped. Next() *TerminalSize }
TerminalSizeQueue is capable of returning terminal resize events as they occur.
Click to show internal directories.
Click to hide internal directories.