Documentation ¶
Index ¶
Constants ¶
View Source
const ( GOENVDev = "dev" // 开发环境 GOENVProd = "prod" // 生产环境 )
Variables ¶
View Source
var App = new(Application)
View Source
var DeferTaskQueue []*DeferTask
DeferTaskQueue 延迟任务队列
Functions ¶
This section is empty.
Types ¶
type Application ¶
type PeriodTask ¶
type PeriodTask struct { Function func(...any) Params []any Time time.Duration // TaskTypeDelay => 多长时间后执行; TaskTypeDefer => 无效; TaskTypePeriod => 执行的周期 }
PeriodTask 周期任务
func NewPeriodTask ¶
func NewPeriodTask(f func(...any), t time.Duration, params []any) *PeriodTask
NewPeriodTask 创建周期任务
func (*PeriodTask) Execute ¶
func (t *PeriodTask) Execute()
Click to show internal directories.
Click to hide internal directories.