Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAttachFunc ¶
func DefaultAttachFunc(o *AttachOptions, containerToAttach *corev1.Container, raw bool, sizeQueue remotecommand.TerminalSizeQueue) func() error
func NewCmdAttach ¶
func NewCmdAttach(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
Types ¶
type AttachOptions ¶
type AttachOptions struct {
exec.StreamOptions
// whether to disable use of standard error when streaming output from tty
DisableStderr bool
CommandName string
SuggestedCmdUsage string
Pod *corev1.Pod
AttachFunc func(*AttachOptions, *corev1.Container, bool, remotecommand.TerminalSizeQueue) func() error
Resources []string
Builder func() *resource.Builder
AttachablePodFn polymorphichelpers.AttachableLogsForObjectFunc
Attach RemoteAttach
GetPodTimeout time.Duration
Config *restclient.Config
// contains filtered or unexported fields
}
AttachOptions declare the arguments accepted by the Exec command
func NewAttachOptions ¶
func NewAttachOptions(streams genericclioptions.IOStreams) *AttachOptions
func (*AttachOptions) Complete ¶
func (o *AttachOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete verifies command line arguments and loads data from the command environment
func (*AttachOptions) GetContainerName ¶
func (o *AttachOptions) GetContainerName(pod *corev1.Pod) (string, error)
GetContainerName returns the name of the container to attach to, with a fallback.
type DefaultRemoteAttach ¶
type DefaultRemoteAttach struct{}
DefaultRemoteAttach is the standard implementation of attaching
type RemoteAttach ¶
type RemoteAttach interface {
Attach(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool, terminalSizeQueue remotecommand.TerminalSizeQueue) error
}
RemoteAttach defines the interface accepted by the Attach command - provided for test stubbing
Click to show internal directories.
Click to hide internal directories.