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 ¶
func NewOutputWriterForPipe(typ contractsprocess.OutputType, key string, h contractsprocess.OnPipeOutputFunc) *OutputWriter
func NewOutputWriterForProcess ¶
func NewOutputWriterForProcess(typ contractsprocess.OutputType, handler contractsprocess.OnOutputFunc) *OutputWriter
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 (r *PipeCommand) As(key string) contractsprocess.PipeCommand
func (*PipeCommand) WithSpinner ¶
func (r *PipeCommand) WithSpinner(message ...string) contractsprocess.PipeCommand
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
func (*Pipeline) DisableBuffering ¶
func (r *Pipeline) DisableBuffering() contractsprocess.Pipeline
func (*Pipeline) OnOutput ¶
func (r *Pipeline) OnOutput(onOutput contractsprocess.OnPipeOutputFunc) 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 (r *Pipeline) Start() (contractsprocess.RunningPipe, error)
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 (r *PoolBuilder) OnOutput(handler contractsprocess.OnPoolOutputFunc) contractsprocess.PoolBuilder
func (*PoolBuilder) Pool ¶
func (r *PoolBuilder) Pool(configurer func(pool contractsprocess.Pool)) contractsprocess.PoolBuilder
func (*PoolBuilder) Run ¶
func (r *PoolBuilder) Run() (map[string]contractsprocess.Result, error)
func (*PoolBuilder) Start ¶
func (r *PoolBuilder) Start() (contractsprocess.RunningPool, error)
func (*PoolBuilder) Timeout ¶
func (r *PoolBuilder) Timeout(timeout time.Duration) contractsprocess.PoolBuilder
func (*PoolBuilder) WithContext ¶
func (r *PoolBuilder) WithContext(ctx context.Context) contractsprocess.PoolBuilder
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 (r *PoolCommand) As(key string) contractsprocess.PoolCommand
func (*PoolCommand) DisableBuffering ¶
func (r *PoolCommand) DisableBuffering() contractsprocess.PoolCommand
func (*PoolCommand) Env ¶
func (r *PoolCommand) Env(vars map[string]string) contractsprocess.PoolCommand
func (*PoolCommand) Input ¶
func (r *PoolCommand) Input(in io.Reader) contractsprocess.PoolCommand
func (*PoolCommand) Path ¶
func (r *PoolCommand) Path(path string) contractsprocess.PoolCommand
func (*PoolCommand) Quietly ¶
func (r *PoolCommand) Quietly() contractsprocess.PoolCommand
func (*PoolCommand) Timeout ¶
func (r *PoolCommand) Timeout(timeout time.Duration) contractsprocess.PoolCommand
func (*PoolCommand) WithContext ¶
func (r *PoolCommand) WithContext(ctx context.Context) contractsprocess.PoolCommand
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
func (*Process) DisableBuffering ¶
func (r *Process) DisableBuffering() contractsprocess.Process
func (*Process) OnOutput ¶
func (r *Process) OnOutput(handler contractsprocess.OnOutputFunc) 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) TTY ¶
func (r *Process) TTY() 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 (*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 ¶
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) Wait ¶
func (r *RunningPipe) Wait() contractsprocess.Result
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) Wait ¶
func (r *RunningPool) Wait() map[string]contractsprocess.Result
type ServiceProvider ¶
type ServiceProvider struct {
}
func (*ServiceProvider) Boot ¶
func (r *ServiceProvider) Boot(_ foundation.Application)
func (*ServiceProvider) Register ¶
func (r *ServiceProvider) Register(app foundation.Application)
func (*ServiceProvider) Relationship ¶
func (r *ServiceProvider) Relationship() binding.Relationship
Click to show internal directories.
Click to hide internal directories.