Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTaskNotFound = errors.New("task not found")
Functions ¶
Types ¶
type Task ¶
type Task interface { Name() string FlagSet(fg *flag.FlagSet) Run(ctx context.Context) error TearDown(err error) }
Task 任务
type TaskHelper ¶
type TaskHelper struct { }
TaskHelper task 的一些辅助功能
func (*TaskHelper) DataDir ¶
func (h *TaskHelper) DataDir() string
func (*TaskHelper) ReadConf ¶
func (h *TaskHelper) ReadConf(name string, value any) error
ReadConf 从 task 自己的目录里解析配置
func (*TaskHelper) TmpDir ¶
func (h *TaskHelper) TmpDir() string
Click to show internal directories.
Click to hide internal directories.