executor

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

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) (*Result, error)

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

type Result

type Result struct {
	Stdout bytes.Buffer
	Stderr bytes.Buffer
}

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