[feat] 定时任务支持
This commit is contained in:
parent
00f65c347a
commit
78beb12fd5
6
cron.go
6
cron.go
@ -1,7 +1,5 @@
|
||||
package contracts
|
||||
|
||||
import "time"
|
||||
|
||||
type CronService interface {
|
||||
Start() error
|
||||
Stop() error
|
||||
@ -11,13 +9,13 @@ type CronService interface {
|
||||
type Cron interface {
|
||||
Controller
|
||||
// 任务处理
|
||||
Run(time.Time) error
|
||||
Run(User) error
|
||||
}
|
||||
|
||||
type CronBase struct {
|
||||
Controller
|
||||
}
|
||||
|
||||
func (CronBase) Run(t time.Time) error {
|
||||
func (CronBase) Run(User) error {
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user