process

package
v0.0.0-...-7c44c73 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogConfig

type LogConfig struct {
	Enabled bool
	Log     log.Log
}

type Options

type Options struct {
	Command string
	Dir     string
	Stdin   bool
	Stdout  bool
	Stderr  bool
}

type ProbojProcess

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

func NewProbojProcess

func NewProbojProcess(command string, dir string, logConfig LogConfig) (pp ProbojProcess, err error)

func (*ProbojProcess) AsyncRead

func (pp *ProbojProcess) AsyncRead() <-chan ReadResult

func (*ProbojProcess) AsyncWrite

func (pp *ProbojProcess) AsyncWrite(data string) <-chan error

func (*ProbojProcess) Read

func (pp *ProbojProcess) Read() (string, error)

func (*ProbojProcess) WaitForEnd

func (pp *ProbojProcess) WaitForEnd()

func (*ProbojProcess) Write

func (pp *ProbojProcess) Write(data string) error

func (*ProbojProcess) WriteLog

func (pp *ProbojProcess) WriteLog(data string) error

type Process

type Process struct {
	Stdin  io.WriteCloser
	Stdout io.ReadCloser
	Stderr io.ReadCloser

	Exit  int
	Error error
	// contains filtered or unexported fields
}

func NewProcess

func NewProcess(options Options) (p Process, err error)

func (*Process) IsPaused

func (p *Process) IsPaused() bool

func (*Process) IsRunning

func (p *Process) IsRunning() bool

func (*Process) Kill

func (p *Process) Kill() error

func (*Process) OnExit

func (p *Process) OnExit() chan struct{}

func (*Process) Pause

func (p *Process) Pause() error

func (*Process) Resume

func (p *Process) Resume() error

func (*Process) Start

func (p *Process) Start() chan struct{}

type ReadResult

type ReadResult struct {
	Data  string
	Error error
}

Jump to

Keyboard shortcuts

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