Documentation
¶
Index ¶
- Constants
- func RunCommand(ctx context.Context, cmd string, runOpts *RunOpts, args ...string) (string, *localErrs.Error)
- type RunOpts
- func (opts *RunOpts) DirExists() bool
- func (opts *RunOpts) EnvExists() bool
- func (opts *RunOpts) PrintLogEnabled() bool
- func (opts *RunOpts) SetDir(dir string) *RunOpts
- func (opts *RunOpts) SetEnv(env []string) *RunOpts
- func (opts *RunOpts) SetNice(nice int) *RunOpts
- func (opts *RunOpts) SetPrintLog(printLog bool) *RunOpts
- func (opts *RunOpts) SetTimeOut(timeOut time.Duration) *RunOpts
- func (opts *RunOpts) TimeOutValid() bool
Constants ¶
View Source
const (
TopicRunStarted = "run.started"
)
View Source
const (
TopicRunTimeout = "run_timeout"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RunOpts ¶ added in v1.0.8
type RunOpts struct {
Dir string
Env []string
PrintLog bool
TimeOut time.Duration
Nice int // default nice value is 5, range is -20 to 19
}
func (*RunOpts) PrintLogEnabled ¶ added in v1.0.8
func (*RunOpts) SetPrintLog ¶ added in v1.0.8
func (*RunOpts) SetTimeOut ¶ added in v1.0.8
func (*RunOpts) TimeOutValid ¶ added in v1.0.8
Click to show internal directories.
Click to hide internal directories.