executor

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: AGPL-3.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 ShRunner added in v0.4.1

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

ShRunner - runs shell commands.

func NewExecutor added in v0.4.1

func NewExecutor(workingDir string, envVariables ...string) (*ShRunner, error)

NewExecutor - create new sh runner.

func (*ShRunner) Run added in v0.4.1

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

Run - exec command and hide secrets in log output.

func (*ShRunner) RunMutely added in v0.4.1

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

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

func (*ShRunner) RunWithTty added in v0.4.1

func (b *ShRunner) 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