shell

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAction

func NewAction(scope sdk.ScopeAccessor, params sdk.ActionParams) (sdk.ActionHandler, error)

NewAction creates a new shell action handler instance

Types

type Action

type Action struct {
	// contains filtered or unexported fields
}

Action represents sdk.ActionHandler

func (*Action) Call

func (a *Action) Call(ctx sdk.JobContextAccessor, r sdk.JobRunner) (err error)

Call calls a plugin

func (*Action) Cancel

func (a *Action) Cancel(ctx sdk.JobContextAccessor) error

Cancel cancels shell command execution

type Params

type Params struct {
	// Command is command to execute
	Command string

	// Silent param hides stdout and stderr from output
	Silent bool

	// RawOutput removes logging output decoration from stdout and stderr
	RawOutput bool

	// Shell is default shell to start
	Shell string

	// ShellExecParam is param used by shell to pass command.
	//
	// Example: "bash -c "your command"
	ShellExecParam string

	// WorkDir is current working directory
	WorkDir string

	// Env is set of environment variables
	Env shell.Environment
}

Params contains params for shell plugin

Jump to

Keyboard shortcuts

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