Documentation
¶
Index ¶
- func IsSignaled(err error) bool
- func MustStop(ctx context.Context, cmd *exec.Cmd) error
- func Stop(cmd *exec.Cmd) error
- type Cfg
- type Result
- func Run(command ...string) *Result
- func RunCmd(ctx context.Context, cmd *exec.Cmd, cfg *Cfg, ...) *Result
- func RunCtx(ctx context.Context, command ...string) *Result
- func RunRaw(ctx context.Context, cfg *Cfg, beforeStart ...func(cmd *exec.Cmd)) *Result
- func Start(ctx context.Context, cmd *exec.Cmd, beforeRun ...func(cmd *exec.Cmd)) *Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSignaled ¶
IsSignaled check if cmd exit signaled, err is Cmd.Wait() or Cmd.Run() result error.
Types ¶
type Cfg ¶
type Result ¶
type Result struct {
Stdout []string `json:"stdout"`
Stderr []string `json:"stderr"`
ExitCode int `json:"exitCode"`
Pid int `json:"pid"`
StartTimeNano int64 `json:"startTimeNano"`
StopTimeNano int64 `json:"stopTimeNano"`
Signaled bool `json:"signaled"`
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.