package contracts import "time" type CronService interface { Start() error Stop() error Restart() error } type Cron interface { Controller // 任务处理 Handle(time.Time) error } type CronBase struct { Controller } func (CronBase) Handle(t time.Time) error { return nil }