22 lines
254 B
Go
22 lines
254 B
Go
package contracts
|
|
|
|
type CronService interface {
|
|
Start() error
|
|
Stop() error
|
|
Restart() error
|
|
}
|
|
|
|
type Cron interface {
|
|
Controller
|
|
// 任务处理
|
|
Run(User) error
|
|
}
|
|
|
|
type CronBase struct {
|
|
Controller
|
|
}
|
|
|
|
func (CronBase) Run(User) error {
|
|
return nil
|
|
}
|