Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultExecutor ¶
type DefaultExecutor struct {
Clientset kubernetes.Interface
RestConfig *rest.Config
}
DefaultExecutor implements Executor.
func (*DefaultExecutor) Exec ¶
func (e *DefaultExecutor) Exec( ctx context.Context, namespace string, podName string, containerName string, cmd []string, stdin io.Reader, stdout io.Writer, stderr io.Writer, ) error
Exec executes a command in a specific container of a pod.
func (*DefaultExecutor) PortForward ¶
func (e *DefaultExecutor) PortForward( namespace string, podName string, remotePort int, outStream, errStream io.Writer, ) (int, chan struct{}, error)
PortForward establishes a port forwarding session to a pod. It returns the local port, a stop channel to close the connection, and an error.
type Executor ¶
type Executor interface {
PortForward(namespace, podName string, remotePort int, out, errOut io.Writer) (int, chan struct{}, error)
Exec(
ctx context.Context,
namespace, podName, container string,
cmd []string,
stdin io.Reader,
out, errOut io.Writer,
) error
}
Executor abstracts Kubernetes operations.
Click to show internal directories.
Click to hide internal directories.