executor

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: AGPL-3.0 Imports: 13 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
	Interrupted       *bool
	// contains filtered or unexported fields
}

ShRunner - runs shell commands.

func NewExecutor added in v0.4.1

func NewExecutor(workingDir string, interruptPointer *bool, 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 return stdout, stderr, run error.

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

func (*ShRunner) StartSigTrap added in v0.9.3

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

type SigTrap added in v0.4.1

type SigTrap chan os.Signal

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