process

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 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 NewOutputWriterForPipe added in v1.17.0

func NewOutputWriterForProcess added in v1.17.0

func NewOutputWriterForProcess(typ contractsprocess.OutputType, handler contractsprocess.OnOutputFunc) *OutputWriter

func (*OutputWriter) Write

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

type OutputWriterHandler added in v1.17.0

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

type Pipe added in v1.17.0

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

func (*Pipe) Command added in v1.17.0

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

type PipeCommand added in v1.17.0

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

func NewPipeCommand added in v1.17.0

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

func (*PipeCommand) As added in v1.17.0

func (*PipeCommand) WithSpinner added in v1.17.0

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

type Pipeline added in v1.17.0

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

func NewPipe added in v1.17.0

func NewPipe() *Pipeline

func (*Pipeline) DisableBuffering added in v1.17.0

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

func (*Pipeline) Env added in v1.17.0

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

func (*Pipeline) Input added in v1.17.0

func (*Pipeline) OnOutput added in v1.17.0

func (*Pipeline) Path added in v1.17.0

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

func (*Pipeline) Pipe added in v1.17.0

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

func (*Pipeline) Quietly added in v1.17.0

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

func (*Pipeline) Run added in v1.17.0

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

func (*Pipeline) Start added in v1.17.0

func (*Pipeline) Timeout added in v1.17.0

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

func (*Pipeline) WithContext added in v1.17.0

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

func (*Pipeline) WithSpinner added in v1.17.0

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

type Pool added in v1.17.0

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

func (*Pool) Command added in v1.17.0

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

type PoolBuilder added in v1.17.0

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

func NewPool added in v1.17.0

func NewPool() *PoolBuilder

func (*PoolBuilder) Concurrency added in v1.17.0

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

func (*PoolBuilder) OnOutput added in v1.17.0

func (*PoolBuilder) Pool added in v1.17.0

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

func (*PoolBuilder) Run added in v1.17.0

func (*PoolBuilder) Start added in v1.17.0

func (*PoolBuilder) Timeout added in v1.17.0

func (*PoolBuilder) WithContext added in v1.17.0

func (*PoolBuilder) WithSpinner added in v1.17.0

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

type PoolCommand added in v1.17.0

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

func NewPoolCommand added in v1.17.0

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

func (*PoolCommand) As added in v1.17.0

func (*PoolCommand) DisableBuffering added in v1.17.0

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

func (*PoolCommand) Env added in v1.17.0

func (*PoolCommand) Input added in v1.17.0

func (*PoolCommand) Path added in v1.17.0

func (*PoolCommand) Quietly added in v1.17.0

func (*PoolCommand) Timeout added in v1.17.0

func (*PoolCommand) WithContext added in v1.17.0

type Process

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

func New

func New() *Process

func (*Process) DisableBuffering added in v1.17.0

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 added in v1.17.0

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

func (*Process) Pool added in v1.17.0

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 added in v1.17.0

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 added in v1.17.0

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 added in v1.17.0

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 added in v1.17.0

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

func NewRunningPipe added in v1.17.0

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 added in v1.17.0

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

func (*RunningPipe) PIDs added in v1.17.0

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

func (*RunningPipe) Running added in v1.17.0

func (r *RunningPipe) Running() bool

func (*RunningPipe) Signal added in v1.17.0

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

func (*RunningPipe) Stop added in v1.17.0

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

func (*RunningPipe) Wait added in v1.17.0

type RunningPool added in v1.17.0

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

func NewRunningPool added in v1.17.0

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

func (*RunningPool) Done added in v1.17.0

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

func (*RunningPool) PIDs added in v1.17.0

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

func (*RunningPool) Running added in v1.17.0

func (r *RunningPool) Running() bool

func (*RunningPool) Signal added in v1.17.0

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

func (*RunningPool) Stop added in v1.17.0

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

func (*RunningPool) Wait added in v1.17.0

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

type ServiceProvider added in v1.17.0

type ServiceProvider struct {
}

func (*ServiceProvider) Boot added in v1.17.0

func (*ServiceProvider) Register added in v1.17.0

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

func (*ServiceProvider) Relationship added in v1.17.0

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

Jump to

Keyboard shortcuts

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