函数定义#
CheckCrash#
详细描述#
CheckCrash(c *exec.Cmd) (bool, error)
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | bool | |
r2 | error | |
Command#
详细描述#
Command(i string) (*exec.Cmd, error)
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | *exec.Cmd | |
r2 | error | |
CommandContext#
详细描述#
CommandContext(ctx context.Context, s string) (*exec.Cmd, error)
参数名 | 参数类型 | 参数解释 |
---|
ctx | context.Context | |
s | string | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | *exec.Cmd | |
r2 | error | |
System#
详细描述#
System(i string) ([]byte, error)
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | []byte | |
r2 | error | |
SystemBatch#
详细描述#
SystemBatch(i string, opts ...poolOpt)
参数名 | 参数类型 | 参数解释 |
---|
i | string | |
opts | ...poolOpt | |
SystemContext#
详细描述#
执行系统命令
SystemContext(ctx context.Context, i string) ([]byte, error)
参数名 | 参数类型 | 参数解释 |
---|
ctx | context.Context | |
i | string | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | []byte | |
r2 | error | |
WatchOutput#
详细描述#
WatchOutput(i string, timeout float64, f func(raw []byte) bool) error
参数名 | 参数类型 | 参数解释 |
---|
i | string | |
timeout | float64 | |
f | func(raw []byte) bool | |
返回值#
WatchStderr#
详细描述#
WatchStderr(i string, timeout float64, f func(raw []byte) bool) error
参数名 | 参数类型 | 参数解释 |
---|
i | string | |
timeout | float64 | |
f | func(raw []byte) bool | |
返回值#
WatchStdout#
详细描述#
WatchStdout(i string, timeout float64, f func(raw []byte) bool) error
参数名 | 参数类型 | 参数解释 |
---|
i | string | |
timeout | float64 | |
f | func(raw []byte) bool | |
返回值#
callback#
详细描述#
callback(f func(string, []byte)) poolOpt
参数名 | 参数类型 | 参数解释 |
---|
f | func(string, []byte) | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | poolOpt | |
concurrent#
详细描述#
concurrent(i int) poolOpt
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | poolOpt | |
timeout#
详细描述#
timeout(i float64) poolOpt
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | poolOpt | |