commands

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StopGracefulPeriod = 5 * time.Second
	CheckProcessEvery  = 50 * time.Millisecond
)
View Source
const (
	SignalInterrupt = syscall.SIGTERM
	SignalKill      = syscall.SIGKILL
)

Variables

Functions

This section is empty.

Types

type Command

type Command interface {
	Pid() int
	Start(context.Context) error
	Wait() ExecutionResult
}

func New

func New(
	command string,
	args, environ []string,
	stdin io.Reader,
	stdout, stderr io.Writer,
) Command

type ExecutionResult

type ExecutionResult struct {
	ExitCode    int
	UserTime    time.Duration
	SystemTime  time.Duration
	ElapsedTime time.Duration
}

Jump to

Keyboard shortcuts

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