Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterExecutor ¶
Types ¶
type Interface ¶
type Interface interface {
// (async) Run will create a executor's instance to run task and return standard results after completion.
// The executor running inside the worker program recommends processing ctx.Done for gracefully exit.
Run(task *model.TaskExecParam) error
// (async) Pause a executor, the task will stop running and become suspended, and can be run again;
Pause(taskKey string) error
// (async) Resume a executor.
Resume(taskKey string) error
// (async) graceful Exit a executor. The task will stop running and become terminated, and cannot be restarted.
Stop(taskKey string) error
// (async) fore Exit.
Exit(taskKey string) error
List(ctx context.Context) ([]*model.TaskExecResult, error)
ChangeResult() <-chan *model.TaskExecResult
}
Interface is the interface of the executor.
type Manager ¶
type Manager struct{}
func (*Manager) ChangeResult ¶
func (ge *Manager) ChangeResult() <-chan *model.TaskExecResult
Click to show internal directories.
Click to hide internal directories.