Documentation ¶
Index ¶
Constants ¶
View Source
const ( StateStopped int32 = iota // 0 StateRunning // 1 StateClosed // 2 )
定义状态常量
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { LoggingEnabled bool // 是否启用日志记录 Interval time.Duration // 任务执行间隔 Timeout time.Duration // 单次任务的超时时间 TaskFunc func(ctx context.Context) // 任务函数 }
Config 定义了任务的基础配置。
type Task ¶ added in v0.6.3
type Task struct {
// contains filtered or unexported fields
}
Task 结构体包含任务的配置和状态。
Click to show internal directories.
Click to hide internal directories.