exec

package
v0.0.0-...-841f565 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultKubernetesExecutor

func DefaultKubernetesExecutor() exec.RemoteExecutor

DefaultKubernetesExecutor is a convenience method so we don't have to import all of the k8s packages to do this

func DockerExecutor

func DockerExecutor(ctx context.Context, opts DockerExecOptions) error

DockerExecutor executes the task in a docker container

func FakeKubernetesExecutor

func FakeKubernetesExecutor() exec.RemoteExecutor

FakeKubernetesExecutor is a convenience method for testing purposes

func KubernetesExecutor

func KubernetesExecutor(k KubernetesExecOptions) error

KubernetesExecutor runs a command in a container in a pod

func LocalExecutor

func LocalExecutor(opts LocalExecOptions) *exec.Cmd

LocalExecutor executes the task locally

Types

type DockerExecOptions

type DockerExecOptions struct {
	Command          []string
	Binds            []string
	Ports            []string
	ContainerName    string
	KillTimeout      string
	Image            string
	Dir              string
	Environment      map[string]string
	NetworkMode      string
	InheritParentEnv bool
	AttachStdIn      bool
	Privileged       bool
	Detach           bool
	Stdin            io.Reader
	Stdout           io.Writer
	Stderr           io.Writer
}

DockerExecOptions for executing a command

type KubernetesExecOptions

type KubernetesExecOptions struct {
	Factory       cmdutil.Factory
	Pod           *corev1.Pod
	Executor      exec.RemoteExecutor
	ContainerName string
	Command       []string
	Stdin         bool
	TTY           bool
	Quiet         bool
	IOStreams     genericclioptions.IOStreams
	GetPodTimeout time.Duration
}

KubernetesExecOptions for executing a command in a container in a pod

type LocalExecOptions

type LocalExecOptions struct {
	Command          []string
	Dir              string
	Environment      map[string]string
	Stdin            io.Reader
	Stdout           io.Writer
	Stderr           io.Writer
	InheritParentEnv bool
}

LocalExecOptions for executing a command

Jump to

Keyboard shortcuts

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