kubernetes/staging/src/k8s.io/kubectl/pkg/cmd/attach/attach.go

var attachExample

const defaultPodAttachTimeout

const defaultPodLogsTimeout

type AttachOptions

// NewAttachOptions creates the options for attach
func NewAttachOptions(streams genericiooptions.IOStreams) *AttachOptions {}

// NewCmdAttach returns the attach Cobra command
func NewCmdAttach(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command {}

type RemoteAttach

// DefaultAttachFunc is the default AttachFunc used
func DefaultAttachFunc(o *AttachOptions, containerToAttach *corev1.Container, raw bool, sizeQueue remotecommand.TerminalSizeQueue) func() error {}

type DefaultRemoteAttach

// Attach executes attach to a running container
func (*DefaultRemoteAttach) Attach(url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool, terminalSizeQueue remotecommand.TerminalSizeQueue) error {}

// createExecutor returns the Executor or an error if one occurred.
func createExecutor(url *url.URL, config *restclient.Config) (remotecommand.Executor, error) {}

// Complete verifies command line arguments and loads data from the command environment
func (o *AttachOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error {}

// Validate checks that the provided attach options are specified.
func (o *AttachOptions) Validate() error {}

// Run executes a validated remote execution against a pod.
func (o *AttachOptions) Run() error {}

func (o *AttachOptions) findAttachablePod(obj runtime.Object) (*corev1.Pod, error) {}

// containerToAttach returns a reference to the container to attach to, given by name.
// use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached
// or the first container in the pod will be chosen If name is empty.
func (o *AttachOptions) containerToAttachTo(pod *corev1.Pod) (*corev1.Container, error) {}

// GetContainerName returns the name of the container to attach to, with a fallback.
func (o *AttachOptions) GetContainerName(pod *corev1.Pod) (string, error) {}

// reattachMessage returns a message to print after attach has completed, or
// the empty string if no message should be printed.
func (o *AttachOptions) reattachMessage(containerName string, rawTTY bool) string {}