Documentation
¶
Overview ¶
Package execute
Package execute
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor interface {
// ClearTask 清除已有任务
ClearTask() error
// AddTask 添加需要执行的任务,函数必须为:executorFunc
AddTask(f executorFunc, param ...interface{}) Executor
// AddSimpleTask 推荐此方法,
// 添加任务,函数格式必须为:taskfunc(param ...interface{}) (interface{}, error) or 自定义参数 taskfunc(i int, s string, arr []int) (interface{}, error)
AddSimpleTask(f interface{}, param ...interface{}) Executor
// ExecuteTask 执行任务,返回任务结果,不返回任务error以及执行error
ExecuteTask() ([]interface{}, error)
// ExecuteTaskWithErr 执行任务,返回任务结果和任务error以及执行error
ExecuteTaskWithErr() ([]interface{}, []error, error)
}
func NewExecutor ¶
Click to show internal directories.
Click to hide internal directories.