Documentation ¶
Index ¶
- func ExecBuffered(ctx context.Context, kubeConfig *rest.Config, namespace, pod, container string, ...) ([]byte, []byte, error)
- func ExecStream(ctx context.Context, kubeConfig *rest.Config, options *ExecStreamOptions) error
- func ExecStreamWithTransport(ctx context.Context, client kubernetes.Interface, ...) error
- func GetUpgraderWrapper(restConfig *rest.Config) (http.RoundTripper, clientspdy.Upgrader, error)
- func SetupTTY(stdin io.Reader, stdout io.Writer) (bool, term.TTY)
- type ExecStreamOptions
- type ExecStreamWithTransportOptions
- type SubResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecBuffered ¶
func ExecBuffered(ctx context.Context, kubeConfig *rest.Config, namespace, pod, container string, command []string, stdin io.Reader) ([]byte, []byte, error)
ExecBuffered executes a command for kubernetes and returns the output and error buffers
func ExecStream ¶
ExecStream executes a command and streams the output to the given streams
func ExecStreamWithTransport ¶
func ExecStreamWithTransport(ctx context.Context, client kubernetes.Interface, options *ExecStreamWithTransportOptions) error
ExecStreamWithTransport executes a kubectl exec with given transport round tripper and upgrader
func GetUpgraderWrapper ¶
func GetUpgraderWrapper(restConfig *rest.Config) (http.RoundTripper, clientspdy.Upgrader, error)
GetUpgraderWrapper returns an upgrade wrapper for the given config @Factory
Types ¶
type ExecStreamOptions ¶
type ExecStreamOptions struct { Pod string Namespace string Container string Command []string ForceTTY bool TTY bool TerminalSizeQueue remotecommand.TerminalSizeQueue Stdin io.Reader Stdout io.Writer Stderr io.Writer }
ExecStreamOptions are the options for ExecStream
type ExecStreamWithTransportOptions ¶
type ExecStreamWithTransportOptions struct { ExecStreamOptions Transport http.RoundTripper Upgrader clientspdy.Upgrader SubResource SubResource }
ExecStreamWithTransportOptions are the options used for executing a stream
type SubResource ¶
type SubResource string
SubResource specifies with sub resources should be used for the container connection (exec or attach)
const ( // SubResourceExec creates a new process in the container and attaches to that SubResourceExec SubResource = "exec" // SubResourceAttach attaches to the top process of the container SubResourceAttach SubResource = "attach" )
Click to show internal directories.
Click to hide internal directories.