kubernetes: k8s.io/kubernetes/pkg/kubectl/cmd/exec Index | Files

package exec

import "k8s.io/kubernetes/pkg/kubectl/cmd/exec"

Index

Package Files

exec.go

func NewCmdExec Uses

func NewCmdExec(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

type DefaultRemoteExecutor Uses

type DefaultRemoteExecutor struct{}

DefaultRemoteExecutor is the standard implementation of remote command execution

func (*DefaultRemoteExecutor) Execute Uses

func (*DefaultRemoteExecutor) Execute(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool, terminalSizeQueue remotecommand.TerminalSizeQueue) error

type ExecOptions Uses

type ExecOptions struct {
    StreamOptions

    ResourceName string
    Command      []string

    ParentCommandName       string
    EnableSuggestedCmdUsage bool

    Builder         func() *resource.Builder
    ExecutablePodFn polymorphichelpers.AttachablePodForObjectFunc

    Pod           *corev1.Pod
    Executor      RemoteExecutor
    PodClient     coreclient.PodsGetter
    GetPodTimeout time.Duration
    Config        *restclient.Config
    // contains filtered or unexported fields
}

ExecOptions declare the arguments accepted by the Exec command

func (*ExecOptions) Complete Uses

func (p *ExecOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, argsIn []string, argsLenAtDash int) error

Complete verifies command line arguments and loads data from the command environment

func (*ExecOptions) Run Uses

func (p *ExecOptions) Run() error

Run executes a validated remote execution against a pod.

func (*ExecOptions) Validate Uses

func (p *ExecOptions) Validate() error

Validate checks that the provided exec options are specified.

type RemoteExecutor Uses

type RemoteExecutor interface {
    Execute(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool, terminalSizeQueue remotecommand.TerminalSizeQueue) error
}

RemoteExecutor defines the interface accepted by the Exec command - provided for test stubbing

type StreamOptions Uses

type StreamOptions struct {
    Namespace     string
    PodName       string
    ContainerName string
    Stdin         bool
    TTY           bool
    // minimize unnecessary output
    Quiet bool
    // InterruptParent, if set, is used to handle interrupts while attached
    InterruptParent *interrupt.Handler

    genericclioptions.IOStreams
    // contains filtered or unexported fields
}

func (*StreamOptions) SetupTTY Uses

func (o *StreamOptions) SetupTTY() term.TTY

Package exec imports 20 packages (graph) and is imported by 40 packages. Updated 2019-06-29. Refresh now. Tools for package owners.