Help us shape the future of Go! Take the 2026 Go Developer Survey

process

package
v1.20.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutputWriter

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

func NewOutputWriter

func NewOutputWriter(typ contractsprocess.OutputType, key string, handler OutputWriterHandler) *OutputWriter

func (*OutputWriter) Write

func (w *OutputWriter) Write(p []byte) (n int, err error)

type OutputWriterHandler

type OutputWriterHandler func(typ contractsprocess.OutputType, line []byte, key string)

type Pipe

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

func (*Pipe) Command

func (r *Pipe) Command(name string, args ...string) contractsprocess.PipeCommand

type PipeCommand

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

func NewPipeCommand

func NewPipeCommand(key, name string, args []string) *PipeCommand

func (*PipeCommand) As

func (*PipeCommand) WithSpinner

func (r *PipeCommand) WithSpinner(message ...string) contractsprocess.PipeCommand

type Pipeline

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

func NewPipe

func NewPipe() *Pipeline

func (*Pipeline) DisableBuffering

func (r *Pipeline) DisableBuffering() contractsprocess.Pipeline

func (*Pipeline) Env

func (r *Pipeline) Env(vars map[string]string) contractsprocess.Pipeline

func (*Pipeline) Input

func (*Pipeline) OnOutput

func (*Pipeline) Path

func (r *Pipeline) Path(path string) contractsprocess.Pipeline

func (*Pipeline) Pipe

func (r *Pipeline) Pipe(configurer func(pipe contractsprocess.Pipe)) contractsprocess.Pipeline

func (*Pipeline) Quietly

func (r *Pipeline) Quietly() contractsprocess.Pipeline

func (*Pipeline) Run

func (r *Pipeline) Run() contractsprocess.Result

func (*Pipeline) Start

func (*Pipeline) Timeout

func (r *Pipeline) Timeout(timeout time.Duration) contractsprocess.Pipeline

func (*Pipeline) WithContext

func (r *Pipeline) WithContext(ctx context.Context) contractsprocess.Pipeline

func (*Pipeline) WithSpinner

func (r *Pipeline) WithSpinner(message ...string) contractsprocess.Pipeline

type Pool

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

func (*Pool) Command

func (r *Pool) Command(name string, args ...string) contractsprocess.PoolCommand

type PoolBuilder

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

func NewPool

func NewPool() *PoolBuilder

func (*PoolBuilder) Concurrency

func (r *PoolBuilder) Concurrency(n int) contractsprocess.PoolBuilder

func (*PoolBuilder) OnOutput

func (*PoolBuilder) Pool

func (r *PoolBuilder) Pool(configurer func(pool contractsprocess.Pool)) contractsprocess.PoolBuilder

func (*PoolBuilder) Run

func (*PoolBuilder) Start

func (*PoolBuilder) Timeout

func (*PoolBuilder) WithContext

func (*PoolBuilder) WithSpinner

func (r *PoolBuilder) WithSpinner(message ...string) contractsprocess.PoolBuilder

type PoolCommand

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

func NewPoolCommand

func NewPoolCommand(key, name string, args []string) *PoolCommand

func (*PoolCommand) As

func (*PoolCommand) DisableBuffering

func (r *PoolCommand) DisableBuffering() contractsprocess.PoolCommand

func (*PoolCommand) Env

func (*PoolCommand) Input

func (*PoolCommand) Path

func (*PoolCommand) Quietly

func (*PoolCommand) Timeout

func (*PoolCommand) WithContext

type Process

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

func New

func New() *Process

func (*Process) DisableBuffering

func (r *Process) DisableBuffering() contractsprocess.Process

func (*Process) Env

func (r *Process) Env(vars map[string]string) contractsprocess.Process

func (*Process) Input

func (r *Process) Input(in io.Reader) contractsprocess.Process

func (*Process) OnOutput

func (*Process) Path

func (r *Process) Path(path string) contractsprocess.Process

func (*Process) Pipe

func (r *Process) Pipe(configurer func(pipe contractsprocess.Pipe)) contractsprocess.Pipeline

func (*Process) Pool

func (r *Process) Pool(configurer func(pool contractsprocess.Pool)) contractsprocess.PoolBuilder

func (*Process) Quietly

func (r *Process) Quietly() contractsprocess.Process

func (*Process) Run

func (r *Process) Run(name string, args ...string) contractsprocess.Result

func (*Process) Start

func (r *Process) Start(name string, args ...string) (contractsprocess.Running, error)

func (*Process) TTY

func (r *Process) TTY() contractsprocess.Process

func (*Process) Timeout

func (r *Process) Timeout(timeout time.Duration) contractsprocess.Process

func (*Process) WithContext

func (r *Process) WithContext(ctx context.Context) contractsprocess.Process

func (*Process) WithSpinner

func (r *Process) WithSpinner(message ...string) contractsprocess.Process

type Result

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

func NewResult

func NewResult(err error, exitCode int, command, stdout, stderr string) *Result

func (*Result) Command

func (r *Result) Command() string

func (*Result) Error

func (r *Result) Error() error

func (*Result) ErrorOutput

func (r *Result) ErrorOutput() string

func (*Result) ExitCode

func (r *Result) ExitCode() int

func (*Result) Failed

func (r *Result) Failed() bool

func (*Result) Output

func (r *Result) Output() string

func (*Result) SeeInErrorOutput

func (r *Result) SeeInErrorOutput(needle string) bool

func (*Result) SeeInOutput

func (r *Result) SeeInOutput(needle string) bool

func (*Result) Successful

func (r *Result) Successful() bool

type Running

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

func NewRunning

func NewRunning(ctx context.Context, cmd *exec.Cmd, cancel context.CancelFunc, stdout, stderr *bytes.Buffer, loading bool, loadingMessage string) *Running

func (*Running) Command

func (r *Running) Command() string

func (*Running) Done

func (r *Running) Done() <-chan struct{}

func (*Running) ErrorOutput

func (r *Running) ErrorOutput() string

func (*Running) Kill

func (r *Running) Kill() error

func (*Running) Output

func (r *Running) Output() string

func (*Running) PID

func (r *Running) PID() int

func (*Running) Running

func (r *Running) Running() bool

func (*Running) Signal

func (r *Running) Signal(sig os.Signal) error

func (*Running) Stop

func (r *Running) Stop(timeout time.Duration, sig ...os.Signal) error

func (*Running) Wait

func (r *Running) Wait() contractsprocess.Result

type RunningPipe

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

func NewRunningPipe

func NewRunningPipe(
	ctx context.Context,
	commands []*exec.Cmd,
	pipeCommands []*PipeCommand,
	cancel context.CancelFunc,
	interReaders []*io.PipeReader,
	interWriters []*io.PipeWriter,
	stdout, stderr []*bytes.Buffer,
	loading bool,
	loadingMessage string,
) *RunningPipe

func (*RunningPipe) Done

func (r *RunningPipe) Done() <-chan struct{}

func (*RunningPipe) PIDs

func (r *RunningPipe) PIDs() map[string]int

func (*RunningPipe) Running

func (r *RunningPipe) Running() bool

func (*RunningPipe) Signal

func (r *RunningPipe) Signal(sig os.Signal) error

func (*RunningPipe) Stop

func (r *RunningPipe) Stop(timeout time.Duration, sig ...os.Signal) error

func (*RunningPipe) Wait

type RunningPool

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

func NewRunningPool

func NewRunningPool(
	ctx context.Context,
	cancel context.CancelFunc,
	keys []string,
	done chan struct{},
	loading bool,
	loadingMessage string,
) *RunningPool

func (*RunningPool) Done

func (r *RunningPool) Done() <-chan struct{}

func (*RunningPool) PIDs

func (r *RunningPool) PIDs() map[string]int

func (*RunningPool) Running

func (r *RunningPool) Running() bool

func (*RunningPool) Signal

func (r *RunningPool) Signal(sig os.Signal) error

func (*RunningPool) Stop

func (r *RunningPool) Stop(timeout time.Duration, sig ...os.Signal) error

func (*RunningPool) Wait

func (r *RunningPool) Wait() map[string]contractsprocess.Result

type ServiceProvider

type ServiceProvider struct {
}

func (*ServiceProvider) Boot

func (*ServiceProvider) Register

func (r *ServiceProvider) Register(app foundation.Application)

func (*ServiceProvider) Relationship

func (r *ServiceProvider) Relationship() binding.Relationship

Jump to

Keyboard shortcuts

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