kubernetes: k8s.io/kubernetes/pkg/kubelet/server/remotecommand Index | Files

package remotecommand

import "k8s.io/kubernetes/pkg/kubelet/server/remotecommand"

Package remotecommand contains functions related to executing commands in and attaching to pods.

Index

Package Files

attach.go doc.go exec.go httpstream.go websocket.go

func ServeAttach Uses

func ServeAttach(w http.ResponseWriter, req *http.Request, attacher Attacher, podName string, uid types.UID, container string, streamOpts *Options, idleTimeout, streamCreationTimeout time.Duration, supportedProtocols []string)

ServeAttach handles requests to attach to a container. After creating/receiving the required streams, it delegates the actual attaching to attacher.

func ServeExec Uses

func ServeExec(w http.ResponseWriter, req *http.Request, executor Executor, 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.

type Attacher Uses

type Attacher interface {
    // AttachContainer attaches to the running container in the pod, copying data between in/out/err
    // and the container's stdin/stdout/stderr.
    AttachContainer(name string, uid types.UID, container string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error
}

Attacher knows how to attach to a running container in a pod.

type Executor Uses

type Executor 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 Options Uses

type Options struct {
    Stdin  bool
    Stdout bool
    Stderr bool
    TTY    bool
}

Options contains details about which streams are required for remote command execution.

func NewOptions Uses

func NewOptions(req *http.Request) (*Options, error)

NewOptions creates a new Options from the Request.

Package remotecommand imports 19 packages (graph) and is imported by 196 packages. Updated 2019-07-23. Refresh now. Tools for package owners.