Documentation
¶
Index ¶
- func IsSignaled(err error) bool
- func KillGroup(cmd *exec.Cmd) error
- func MustStop(ctx context.Context, cmd *exec.Cmd, singleSigWaitExitSec int, ...) error
- func MustStopGroup(ctx context.Context, cmd *exec.Cmd, singleSigWaitExitSec int, ...) error
- func Stop(cmd *exec.Cmd) error
- func StopGroup(cmd *exec.Cmd) error
- type Cfg
- type 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() error.
func MustStopGroup ¶ added in v0.11.11
Types ¶
type Cfg ¶
type Cfg struct {
Command []string `json:"command" yaml:"command" validate:"required"`
Env map[string]string `json:"env" yaml:"env"`
RunAsUser string `json:"runAsUser" yaml:"runAsUser"`
WorkingDir string `json:"workingDir" yaml:"workingDir"`
SetPgid bool `json:"setPgid" yaml:"setPgid"`
WaitSecBetweenKillSignals int `json:"waitSecBetweenKillSignals" yaml:"waitSecBetweenKillSignals"`
}
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.