Documentation
¶
Index ¶
- type Process
- func (p *Process) CountOutput(pattern string) int
- func (p *Process) Done() <-chan struct{}
- func (p *Process) ErrorOutput() string
- func (p *Process) Output() string
- func (p *Process) SetBeforeStopHandler(fn func())
- func (p *Process) Start() error
- func (p *Process) StdOutput() string
- func (p *Process) Stop() error
- func (p *Process) WaitForOutput(pattern string, count int, timeout time.Duration) error
- type SafeBuffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
func NewWithEnvs ¶ added in v0.37.1
func (*Process) CountOutput ¶ added in v0.68.0
CountOutput returns how many times pattern appears in the current accumulated output.
func (*Process) Done ¶ added in v0.68.0
func (p *Process) Done() <-chan struct{}
Done returns a channel that is closed when the process exits.
func (*Process) ErrorOutput ¶
func (*Process) SetBeforeStopHandler ¶
func (p *Process) SetBeforeStopHandler(fn func())
type SafeBuffer ¶ added in v0.68.0
type SafeBuffer struct {
// contains filtered or unexported fields
}
SafeBuffer is a thread-safe wrapper around bytes.Buffer. It is safe to call Write and String concurrently.
func (*SafeBuffer) String ¶ added in v0.68.0
func (b *SafeBuffer) String() string
Click to show internal directories.
Click to hide internal directories.