Documentation
¶
Index ¶
- Variables
- type Decoder
- type DecoderFunc
- type Event
- type ExitError
- type MultiSink
- type Option
- func WithCleanEnv() Option
- func WithDecodeFunc(fn func([]byte) (string, error)) Option
- func WithDecoder(decoder Decoder) Option
- func WithDir(dir string) Option
- func WithEnv(env []string) Option
- func WithInputString(s string) Option
- func WithKillProcessGroup() Option
- func WithLineBufferSize(n int) Option
- func WithMergeStderr() Option
- func WithOutputLimit(n int64) Option
- func WithRingBuffer(n int) Option
- func WithShell(name string, args ...string) Option
- func WithSink(sink Sink) Option
- func WithSplitMode(mode SplitMode) Option
- func WithStdin(r io.Reader) Option
- func WithStopTimeout(d time.Duration) Option
- func WithStrictDecode() Option
- func WithWaitDelay(d time.Duration) Option
- type OutputResult
- type Process
- func (p *Process) Done() <-chan Result
- func (p *Process) Kill() error
- func (p *Process) PID() int
- func (p *Process) RecentEvents() []Event
- func (p *Process) Running() bool
- func (p *Process) Signal(sig os.Signal) error
- func (p *Process) Stop(ctx context.Context) error
- func (p *Process) Wait() (Result, error)
- type Result
- func Run(ctx context.Context, name string, args []string, opts ...Option) (Result, error)
- func RunShell(ctx context.Context, script string, opts ...Option) (Result, error)
- func RunShellStream(ctx context.Context, script string, sink Sink, opts ...Option) (Result, error)
- func RunStream(ctx context.Context, name string, args []string, sink Sink, opts ...Option) (Result, error)
- type RingSink
- type Sink
- type SinkFunc
- type SplitMode
- type Stream
- type WriterSink
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DecoderFunc ¶
type Option ¶
type Option func(*config)
func WithCleanEnv ¶
func WithCleanEnv() Option
func WithDecoder ¶
func WithInputString ¶
func WithKillProcessGroup ¶
func WithKillProcessGroup() Option
func WithLineBufferSize ¶
func WithMergeStderr ¶
func WithMergeStderr() Option
func WithOutputLimit ¶
func WithRingBuffer ¶
func WithSplitMode ¶
func WithStopTimeout ¶
func WithStrictDecode ¶
func WithStrictDecode() Option
func WithWaitDelay ¶
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
func StartShell ¶
func (*Process) RecentEvents ¶
type Result ¶
type Result struct {
Command string
Args []string
Dir string
PID int
ExitCode int
StartedAt time.Time
FinishedAt time.Time
}
func RunShellStream ¶
type RingSink ¶
type RingSink struct {
// contains filtered or unexported fields
}
func NewRingSink ¶
type WriterSink ¶
func NewWriterSink ¶
func NewWriterSink(w io.Writer) WriterSink
func (WriterSink) WriteCommandEvent ¶
func (s WriterSink) WriteCommandEvent(ctx context.Context, event Event) error
Click to show internal directories.
Click to hide internal directories.