type.go 245 B

12345678910111213141516
  1. package jobs
  2. import "github.com/robfig/cron/v3"
  3. type Job interface {
  4. Run()
  5. addJob(*cron.Cron) (int, error)
  6. }
  7. type JobsExec interface {
  8. Exec(arg interface{}) error
  9. }
  10. func CallExec(e JobsExec, arg interface{}) error {
  11. return e.Exec(arg)
  12. }