contracts/job.go
2024-05-09 13:15:24 +08:00

25 lines
358 B
Go

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