shell

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewShellPlugin

func NewShellPlugin(scope *scope.Scope, params manifest.RawParams, log log.Logger) (plugins.Plugin, error)

NewShellPlugin creates a new shell plugin instance

Types

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

type Plugin

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

Plugin represents Gilbert's plugin

func (*Plugin) Call

func (p *Plugin) Call(tx *job.RunContext, r plugins.JobRunner) (err error)

Call calls a plugin

func (*Plugin) Cancel added in v0.4.0

func (p *Plugin) Cancel(ctx *job.RunContext) error

Cancel cancels shell command execution

Jump to

Keyboard shortcuts

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