contracts/job.go

23 lines
315 B
Go

package contracts
type JobService interface {
Start() error
Stop() error
Restart() error
Dispatch(job string, payload any, u User) error
}
type Job interface {
Controller
// 任务处理
Handle(any, User) error
}
type JobBase struct {
Controller
}
func (JobBase) Handle(any, User) error {
return nil
}