Documentation
¶
Index ¶
- type OutputWriter
- func NewOutputWriter(typ contractsprocess.OutputType, key string, handler OutputWriterHandler) *OutputWriter
- func NewOutputWriterForPipe(typ contractsprocess.OutputType, key string, ...) *OutputWriter
- func NewOutputWriterForProcess(typ contractsprocess.OutputType, handler contractsprocess.OnOutputFunc) *OutputWriter
- type OutputWriterHandler
- type Pipe
- type PipeCommand
- type Pipeline
- func (r *Pipeline) DisableBuffering() contractsprocess.Pipeline
- func (r *Pipeline) Env(vars map[string]string) contractsprocess.Pipeline
- func (r *Pipeline) Input(in io.Reader) contractsprocess.Pipeline
- func (r *Pipeline) OnOutput(onOutput contractsprocess.OnPipeOutputFunc) contractsprocess.Pipeline
- func (r *Pipeline) Path(path string) contractsprocess.Pipeline
- func (r *Pipeline) Pipe(configurer func(pipe contractsprocess.Pipe)) contractsprocess.Pipeline
- func (r *Pipeline) Quietly() contractsprocess.Pipeline
- func (r *Pipeline) Run() contractsprocess.Result
- func (r *Pipeline) Start() (contractsprocess.RunningPipe, error)
- func (r *Pipeline) Timeout(timeout time.Duration) contractsprocess.Pipeline
- func (r *Pipeline) WithContext(ctx context.Context) contractsprocess.Pipeline
- func (r *Pipeline) WithSpinner(message ...string) contractsprocess.Pipeline
- type Pool
- type PoolBuilder
- func (r *PoolBuilder) Concurrency(n int) contractsprocess.PoolBuilder
- func (r *PoolBuilder) OnOutput(handler contractsprocess.OnPoolOutputFunc) contractsprocess.PoolBuilder
- func (r *PoolBuilder) Pool(configurer func(pool contractsprocess.Pool)) contractsprocess.PoolBuilder
- func (r *PoolBuilder) Run() (map[string]contractsprocess.Result, error)
- func (r *PoolBuilder) Start() (contractsprocess.RunningPool, error)
- func (r *PoolBuilder) Timeout(timeout time.Duration) contractsprocess.PoolBuilder
- func (r *PoolBuilder) WithContext(ctx context.Context) contractsprocess.PoolBuilder
- func (r *PoolBuilder) WithSpinner(message ...string) contractsprocess.PoolBuilder
- type PoolCommand
- func (r *PoolCommand) As(key string) contractsprocess.PoolCommand
- func (r *PoolCommand) DisableBuffering() contractsprocess.PoolCommand
- func (r *PoolCommand) Env(vars map[string]string) contractsprocess.PoolCommand
- func (r *PoolCommand) Input(in io.Reader) contractsprocess.PoolCommand
- func (r *PoolCommand) Path(path string) contractsprocess.PoolCommand
- func (r *PoolCommand) Quietly() contractsprocess.PoolCommand
- func (r *PoolCommand) Timeout(timeout time.Duration) contractsprocess.PoolCommand
- func (r *PoolCommand) WithContext(ctx context.Context) contractsprocess.PoolCommand
- type Process
- func (r *Process) DisableBuffering() contractsprocess.Process
- func (r *Process) Env(vars map[string]string) contractsprocess.Process
- func (r *Process) Input(in io.Reader) contractsprocess.Process
- func (r *Process) OnOutput(handler contractsprocess.OnOutputFunc) contractsprocess.Process
- func (r *Process) Path(path string) contractsprocess.Process
- func (r *Process) Pipe(configurer func(pipe contractsprocess.Pipe)) contractsprocess.Pipeline
- func (r *Process) Pool(configurer func(pool contractsprocess.Pool)) contractsprocess.PoolBuilder
- func (r *Process) Quietly() contractsprocess.Process
- func (r *Process) Run(name string, args ...string) contractsprocess.Result
- func (r *Process) Start(name string, args ...string) (contractsprocess.Running, error)
- func (r *Process) TTY() contractsprocess.Process
- func (r *Process) Timeout(timeout time.Duration) contractsprocess.Process
- func (r *Process) WithContext(ctx context.Context) contractsprocess.Process
- func (r *Process) WithSpinner(message ...string) contractsprocess.Process
- type Result
- func (r *Result) Command() string
- func (r *Result) Error() error
- func (r *Result) ErrorOutput() string
- func (r *Result) ExitCode() int
- func (r *Result) Failed() bool
- func (r *Result) Output() string
- func (r *Result) SeeInErrorOutput(needle string) bool
- func (r *Result) SeeInOutput(needle string) bool
- func (r *Result) Successful() bool
- type Running
- func (r *Running) Command() string
- func (r *Running) Done() <-chan struct{}
- func (r *Running) ErrorOutput() string
- func (r *Running) Kill() error
- func (r *Running) Output() string
- func (r *Running) PID() int
- func (r *Running) Running() bool
- func (r *Running) Signal(sig os.Signal) error
- func (r *Running) Stop(timeout time.Duration, sig ...os.Signal) error
- func (r *Running) Wait() contractsprocess.Result
- type RunningPipe
- func (r *RunningPipe) Done() <-chan struct{}
- func (r *RunningPipe) PIDs() map[string]int
- func (r *RunningPipe) Running() bool
- func (r *RunningPipe) Signal(sig os.Signal) error
- func (r *RunningPipe) Stop(timeout time.Duration, sig ...os.Signal) error
- func (r *RunningPipe) Wait() contractsprocess.Result
- type RunningPool
- func (r *RunningPool) Done() <-chan struct{}
- func (r *RunningPool) PIDs() map[string]int
- func (r *RunningPool) Running() bool
- func (r *RunningPool) Signal(sig os.Signal) error
- func (r *RunningPool) Stop(timeout time.Duration, sig ...os.Signal) error
- func (r *RunningPool) Wait() map[string]contractsprocess.Result
- type ServiceProvider
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 NewOutputWriterForPipe(typ contractsprocess.OutputType, key string, h contractsprocess.OnPipeOutputFunc) *OutputWriter
func NewOutputWriterForProcess ¶ added in v1.17.0
func NewOutputWriterForProcess(typ contractsprocess.OutputType, handler contractsprocess.OnOutputFunc) *OutputWriter
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 (r *PipeCommand) As(key string) contractsprocess.PipeCommand
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 (*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 (r *Pipeline) Input(in io.Reader) contractsprocess.Pipeline
func (*Pipeline) OnOutput ¶ added in v1.17.0
func (r *Pipeline) OnOutput(onOutput contractsprocess.OnPipeOutputFunc) contractsprocess.Pipeline
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 (r *Pipeline) Start() (contractsprocess.RunningPipe, error)
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 (r *PoolBuilder) OnOutput(handler contractsprocess.OnPoolOutputFunc) contractsprocess.PoolBuilder
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 (r *PoolBuilder) Run() (map[string]contractsprocess.Result, error)
func (*PoolBuilder) Start ¶ added in v1.17.0
func (r *PoolBuilder) Start() (contractsprocess.RunningPool, error)
func (*PoolBuilder) Timeout ¶ added in v1.17.0
func (r *PoolBuilder) Timeout(timeout time.Duration) contractsprocess.PoolBuilder
func (*PoolBuilder) WithContext ¶ added in v1.17.0
func (r *PoolBuilder) WithContext(ctx context.Context) contractsprocess.PoolBuilder
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 (r *PoolCommand) As(key string) contractsprocess.PoolCommand
func (*PoolCommand) DisableBuffering ¶ added in v1.17.0
func (r *PoolCommand) DisableBuffering() contractsprocess.PoolCommand
func (*PoolCommand) Env ¶ added in v1.17.0
func (r *PoolCommand) Env(vars map[string]string) contractsprocess.PoolCommand
func (*PoolCommand) Input ¶ added in v1.17.0
func (r *PoolCommand) Input(in io.Reader) contractsprocess.PoolCommand
func (*PoolCommand) Path ¶ added in v1.17.0
func (r *PoolCommand) Path(path string) contractsprocess.PoolCommand
func (*PoolCommand) Quietly ¶ added in v1.17.0
func (r *PoolCommand) Quietly() contractsprocess.PoolCommand
func (*PoolCommand) Timeout ¶ added in v1.17.0
func (r *PoolCommand) Timeout(timeout time.Duration) contractsprocess.PoolCommand
func (*PoolCommand) WithContext ¶ added in v1.17.0
func (r *PoolCommand) WithContext(ctx context.Context) contractsprocess.PoolCommand
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
func (*Process) DisableBuffering ¶ added in v1.17.0
func (r *Process) DisableBuffering() contractsprocess.Process
func (*Process) OnOutput ¶
func (r *Process) OnOutput(handler contractsprocess.OnOutputFunc) 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) TTY ¶
func (r *Process) TTY() 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 (*Result) ErrorOutput ¶
func (*Result) SeeInErrorOutput ¶
func (*Result) SeeInOutput ¶
func (*Result) Successful ¶
type Running ¶
type Running struct {
// contains filtered or unexported fields
}
func NewRunning ¶
func (*Running) ErrorOutput ¶
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) Wait ¶ added in v1.17.0
func (r *RunningPipe) Wait() contractsprocess.Result
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) 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 (r *ServiceProvider) Boot(_ foundation.Application)
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
Click to show internal directories.
Click to hide internal directories.