executor

package
v0.4.0-1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLogWriter io.Writer

DefaultLogWriter default logging driver to write stdout.

View Source
var Env []string

Env - global list of environment variables.

Functions

This section is empty.

Types

type BashRunner

type BashRunner struct {
	Env               []string
	Timeout           time.Duration
	LogLabels         []string
	ShowResultMessage bool
	// contains filtered or unexported fields
}

BashRunner - runs shell commands.

func NewBashRunner

func NewBashRunner(workingDir string, envVariables ...string) (*BashRunner, error)

NewBashRunner - create new bash runner.

func (*BashRunner) Run

func (b *BashRunner) Run(command string) ([]byte, []byte, error)

Run - exec command and hide secrets in log output.

func (*BashRunner) RunMutely

func (b *BashRunner) RunMutely(command string, secrets ...string) (string, string, error)

RunMutely - exec command and hide secrets in output. Return command output and errors output.

func (*BashRunner) RunWithTty

func (b *BashRunner) RunWithTty(command string) error

type SigTrap added in v0.4.1

type SigTrap chan os.Signal

func StartSigTrap added in v0.4.1

func StartSigTrap(cmd *exec.Cmd, stop chan struct{}) SigTrap

func (*SigTrap) Close added in v0.4.1

func (signalChannel *SigTrap) Close() error

Jump to

Keyboard shortcuts

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