kubexec

package
v1.0.43 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxStdoutLen = 3072
	MaxStderrLen = 3072
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	KubeClient *kubernetes.Clientset
	KubeConfig *rest.Config
}

Executor implements the remote execution in pods.

func NewExecutor

func NewExecutor(kubeConfig *rest.Config) Executor

NewExecutor creates a new executor from a kube config.

func (*Executor) Exec

func (e *Executor) Exec(ctx context.Context, pod types.NamespacedName, containerID string, command []string, blocking bool) (Result, error)

Exec runs an exec call on the container without a shell.

type Result

type Result struct {
	Stdout string
	Stderr string
}

Result contains the outputs of the execution.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL