Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DispatcherConfig ¶
type DispatcherConfig struct {
//任务超时秒数
Timeout int
// 预处理任务
Prepare []string
// 编排任务
Tasks []TaskWrapper
}
多任务配置 每个元素都是独立的执行命令
func (DispatcherConfig) DispatchTask ¶
func (c DispatcherConfig) DispatchTask() error
type ParallelTask ¶
type ParallelTask struct {
// contains filtered or unexported fields
}
并行任务
func NewParallelTask ¶
func NewParallelTask(timeoutSecond int) *ParallelTask
func (*ParallelTask) AddTaskOperator ¶
func (t *ParallelTask) AddTaskOperator(operators ...TaskOperator)
type SyncTask ¶
type SyncTask struct {
// contains filtered or unexported fields
}
同步任务
func NewSyncTask ¶
func (*SyncTask) AddTaskOperator ¶
func (t *SyncTask) AddTaskOperator(operators ...TaskOperator)
type TaskOperator ¶
type TaskOperator interface {
AddTask(tasks ...Task)
AddTaskOperator(operators ...TaskOperator)
Start() error
}
任务操作接口
type TaskWrapper ¶
任务
Click to show internal directories.
Click to hide internal directories.