syexec

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2019 License: BSD-3-Clause Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	// Err is the Go error associated to the command execution
	Err error
	// Stdout is the messages that were displayed on stdout during the execution of the command
	Stdout string
	// Stderr is the messages that were displayed on stderr during the execution of the command
	Stderr string
}

Result represents the result of the execution of a command

type SyCmd

type SyCmd struct {
	// Cmd represents the command to execute to submit the job
	Cmd *exec.Cmd

	// Timeout is the maximum time a command can run
	Timeout time.Duration

	// BinPath is the path to the binary to execute
	BinPath string

	// CmdArgs is a slice of string representing the command's arguments
	CmdArgs []string

	// ExecDir is the directory where to execute the command
	ExecDir string

	// Env is a slice of string representing the environment to be used with the command
	Env []string

	// Ctx is the context of the command to execute to submit a job
	Ctx context.Context

	// CancelFn is the function to cancel the command to submit a job
	CancelFn context.CancelFunc

	// ManifestName is the name of the manifest, it will default to "exec.MANIFEST" if not defined
	ManifestName string

	// ManifestDir is the directory where to create the manifest related to the command execution
	ManifestDir string

	// ManifestData is extra content to add to the manifest
	ManifestData []string

	// ManifestFileHash is a list of absolute path to files for which we want a hash in the manifest
	ManifestFileHash []string
}

SyCmd represents a command to be executed

func (*SyCmd) Run

func (c *SyCmd) Run() Result

Run executes a syexec command and creates the appropriate manifest (when possible)

Jump to

Keyboard shortcuts

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