executor

package
v1.16.7 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 15 Imported by: 5 modules, 8 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cmd *exec.Cmd) error

Types

type CmdUsage

type CmdUsage struct {
	Sys    time.Duration
	User   time.Duration
	MaxRss int64
}

type Executor added in v1.5.2

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

func NewExecutor added in v1.5.2

func NewExecutor(dir string, entrypoint string, args []string, envs []string) *Executor

func (*Executor) Output added in v1.5.2

func (e *Executor) Output() ([]byte, error)

func (*Executor) RunAndLogLines added in v1.5.2

func (e *Executor) RunAndLogLines(ctx context.Context, logLabels map[string]string) (*CmdUsage, error)

func (*Executor) WithCMDStderr added in v1.5.2

func (e *Executor) WithCMDStderr(w io.Writer) *Executor

func (*Executor) WithCMDStdout added in v1.5.2

func (e *Executor) WithCMDStdout(w io.Writer) *Executor

func (*Executor) WithChroot added in v1.6.0

func (e *Executor) WithChroot(path string) *Executor

func (*Executor) WithLogProxyHookJSON added in v1.5.2

func (e *Executor) WithLogProxyHookJSON(logProxyHookJSON bool) *Executor

func (*Executor) WithLogProxyHookJSONKey added in v1.5.2

func (e *Executor) WithLogProxyHookJSONKey(logProxyHookJSONKey string) *Executor

func (*Executor) WithLogger added in v1.5.2

func (e *Executor) WithLogger(logger *log.Logger) *Executor

type StderrError added in v1.16.4

type StderrError struct {
	Message string
}

StderrError is returned by RunAndLogLines when a command fails and produces output on stderr. Callers can use errors.As to access the raw stderr content.

func (*StderrError) Error added in v1.16.4

func (e *StderrError) Error() string

Jump to

Keyboard shortcuts

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