Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Spec ¶ added in v1.30.0
func Spec() actionspec.Spec
Spec declares the shell action. It keeps to no guard, as it does not check what it is about to do against one, so that a guard refuses it unless it is allowed by name. It cannot run without cmd.
func StopStarted ¶
func StopStarted()
StopStarted stops the background commands this process started, with their process groups, and removes their logs. It waits for a command that is being started, and a command started afterwards is not seen; it is meant for a process that is about to end because of a signal.
Types ¶
type Req ¶
type Req struct {
Cmd string `map:"cmd" validate:"required"`
Shell string `map:"shell"`
Workdir string `map:"workdir"`
Timeout string `map:"timeout"`
Env map[string]string `map:"env"`
Background bool `map:"background"`
// Ready says when a background command is ready for the steps after
// it: its key log names text the command writes once it is.
Ready map[string]string `map:"ready"`
// contains filtered or unexported fields
}
type Res ¶
type Res struct {
Code int `map:"code"`
Stdout string `map:"stdout"`
Stderr string `map:"stderr"`
PID int `map:"pid"`
Log string `map:"log"`
// TimedOut is true when the command was stopped at the timeout. Code
// is then -1, and Stdout and Stderr hold what it wrote until then.
TimedOut bool `map:"timed_out"`
}