Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IReport ¶
type IReport interface {
// Phase 上报运行阶段,bool表示finished/failed是否删除任务记录
Phase() (RunPhase, bool)
// Context 上报上下文
Context() string
}
IReport 任务上报interface,注意goroutine safe
type ITask ¶
type ITask interface {
// Running 任务执行,任务接收到stop消息后,须主动Report,之后退出即可
Running(ctx context.Context, taskCtx string, stop <-chan struct{}) <-chan IReport
// Deleting 删除任务
Deleting(ctx context.Context, taskCtx string, stop <-chan struct{}) <-chan IReport
}
ITask 异步任务interface
Click to show internal directories.
Click to hide internal directories.