Skip to main content

exec

成员函数函数描述/介绍
exec.CheckCrash
exec.Command
exec.CommandContext
exec.System
exec.SystemBatch
exec.SystemContext执行系统命令
exec.WatchOutput
exec.WatchStderr
exec.WatchStdout
exec.callback
exec.concurrent
exec.timeout

函数定义#

CheckCrash#

详细描述#

定义#

CheckCrash(c *exec.Cmd) (bool, error)

参数#

参数名参数类型参数解释
c*exec.Cmd

返回值#

返回值(顺序)返回值类型返回值解释
r1bool
r2error

Command#

详细描述#

定义#

Command(i string) (*exec.Cmd, error)

参数#

参数名参数类型参数解释
istring

返回值#

返回值(顺序)返回值类型返回值解释
r1*exec.Cmd
r2error

CommandContext#

详细描述#

定义#

CommandContext(ctx context.Context, s string) (*exec.Cmd, error)

参数#

参数名参数类型参数解释
ctxcontext.Context
sstring

返回值#

返回值(顺序)返回值类型返回值解释
r1*exec.Cmd
r2error

System#

详细描述#

定义#

System(i string) ([]byte, error)

参数#

参数名参数类型参数解释
istring

返回值#

返回值(顺序)返回值类型返回值解释
r1[]byte
r2error

SystemBatch#

详细描述#

定义#

SystemBatch(i string, opts ...poolOpt)

参数#

参数名参数类型参数解释
istring
opts...poolOpt

SystemContext#

详细描述#

执行系统命令

定义#

SystemContext(ctx context.Context, i string) ([]byte, error)

参数#

参数名参数类型参数解释
ctxcontext.Context
istring

返回值#

返回值(顺序)返回值类型返回值解释
r1[]byte
r2error

WatchOutput#

详细描述#

定义#

WatchOutput(i string, timeout float64, f func(raw []byte) bool) error

参数#

参数名参数类型参数解释
istring
timeoutfloat64
ffunc(raw []byte) bool

返回值#

返回值(顺序)返回值类型返回值解释
r1error

WatchStderr#

详细描述#

定义#

WatchStderr(i string, timeout float64, f func(raw []byte) bool) error

参数#

参数名参数类型参数解释
istring
timeoutfloat64
ffunc(raw []byte) bool

返回值#

返回值(顺序)返回值类型返回值解释
r1error

WatchStdout#

详细描述#

定义#

WatchStdout(i string, timeout float64, f func(raw []byte) bool) error

参数#

参数名参数类型参数解释
istring
timeoutfloat64
ffunc(raw []byte) bool

返回值#

返回值(顺序)返回值类型返回值解释
r1error

callback#

详细描述#

定义#

callback(f func(string, []byte)) poolOpt

参数#

参数名参数类型参数解释
ffunc(string, []byte)

返回值#

返回值(顺序)返回值类型返回值解释
r1poolOpt

concurrent#

详细描述#

定义#

concurrent(i int) poolOpt

参数#

参数名参数类型参数解释
iint

返回值#

返回值(顺序)返回值类型返回值解释
r1poolOpt

timeout#

详细描述#

定义#

timeout(i float64) poolOpt

参数#

参数名参数类型参数解释
ifloat64

返回值#

返回值(顺序)返回值类型返回值解释
r1poolOpt