runner

package
v0.0.0-...-0a34fb1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Name        string               // Name holds the name of the command to run (should be the command itself)
	Args        []string             // Args holds the arguments to the command to run
	Dir         string               // Dir is the directory the command should run from (cwd for the command)
	Env         []string             // Env holds the environment variables to pass to the command.
	Stderr      io.Writer            // The standard error pipe to be used for the process
	Stdin       io.Reader            // The standard input pipe to be used for the process
	Stdout      io.Writer            // The standard out pipe to be used for the process
	ExtraFiles  []*os.File           // ExtraFiles specifies additional open files to be inherited by the new process.
	SysProcAttr *syscall.SysProcAttr // SysProcAttr holds optional, operating system-specific attributes.
}

Options holds the options for a runner

This is a partial implementation of os.exec.Cmd{} See os.exec.Cmd{} for more details.

type Runner

type Runner interface {
	Run() error // Run runs the command specified
}

Runner is the interface that implements a run routine

func New

func New(opts Options) Runner

New returns a enw runner interface

Jump to

Keyboard shortcuts

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