process

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProcessRunning = errors.New("process is still running")
)

Functions

This section is empty.

Types

type OutOptions

type OutOptions struct {
	Stdin  string
	Stdout string
	Stderr string
}

func NewOutOptions

func NewOutOptions(outDirectory string, id string) OutOptions

type Process

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

func Start

func Start(options StartOptions) (*Process, <-chan int, error)

Start starts a process with given options.

func (*Process) Close

func (p *Process) Close() error

Close kills the process and releases all associated resources.

func (*Process) GetExitState

func (p *Process) GetExitState() (int, time.Time, error)

func (*Process) Inner

func (p *Process) Inner() *os.Process

func (*Process) Options

func (p *Process) Options() *StartOptions

func (*Process) StartedAt

func (p *Process) StartedAt() time.Time

func (*Process) StoppedAt

func (p *Process) StoppedAt() (time.Time, error)

type StartOptions

type StartOptions struct {
	Out              OutOptions
	Command          string
	Arguments        []string
	Environment      map[string]string
	WorkingDirectory string
}

Jump to

Keyboard shortcuts

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