Documentation ¶
Index ¶
- Variables
- func Add(desc string, cmd *exec.Cmd) int64
- func Exec(desc, cmdName string, args ...string) (string, string, error)
- func ExecDir(timeout time.Duration, dir, desc, cmdName string, args ...string) (string, string, error)
- func ExecTimeout(timeout time.Duration, desc, cmdName string, args ...string) (string, string, error)
- func Kill(pid int64) error
- func Remove(pid int64)
- type Process
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // NOTE: could be custom in config file for default. DEFAULT = 60 * time.Second )
Common timeout.
View Source
var (
ErrExecTimeout = errors.New("Process execution timeout")
)
View Source
var (
Processes []*Process
)
List of existing processes.
Functions ¶
func ExecDir ¶
func ExecDir(timeout time.Duration, dir, desc, cmdName string, args ...string) (string, string, error)
Exec starts executing a command in given path, it records its process and timeout.
Types ¶
Click to show internal directories.
Click to hide internal directories.