[feat] 定时任务支持
This commit is contained in:
parent
252fa41b65
commit
00f65c347a
4
cron.go
4
cron.go
@ -11,13 +11,13 @@ type CronService interface {
|
|||||||
type Cron interface {
|
type Cron interface {
|
||||||
Controller
|
Controller
|
||||||
// 任务处理
|
// 任务处理
|
||||||
Handle(time.Time) error
|
Run(time.Time) error
|
||||||
}
|
}
|
||||||
|
|
||||||
type CronBase struct {
|
type CronBase struct {
|
||||||
Controller
|
Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
func (CronBase) Handle(t time.Time) error {
|
func (CronBase) Run(t time.Time) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user