kubexec

package
v1.0.35 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: Apache-2.0 Imports: 9 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(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