cmdexecutor

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 6 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// StatusFileFormat is the format specifier used to generate the status file path
	StatusFileFormat = "/tmp/stork-cmd-done-%s"
	// KillFileFormat is the format specifier used to generate the kill file path
	KillFileFormat = "/tmp/killme-%s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	// Start starts the command in the pod asynchronously
	Start(chan error) error
	// Wait checks if the command started in pod completed successfully
	//	timeout is the time after which the check should timeout.
	Wait(timeout time.Duration) error
	// GetPod returns the pod namespace and name for the executor instance
	GetPod() (string, string)
	// GetContainer returns the container inside the pod for the executor instance
	GetContainer() string
	// GetCommand returns the pod command for the executor instance
	GetCommand() string
}

Executor is an interface to start and wait for async commands in pods

func Init

func Init(podNamespace, podName, container, command, taskID string) Executor

Init creates an instance of a command executor to run the given command

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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