feat: support cronjob initers
This commit is contained in:
@@ -5,9 +5,18 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type CronJob interface {
|
type CronJob interface {
|
||||||
Kind() string
|
Args() []CronJobArg
|
||||||
Periodic() river.PeriodicSchedule
|
}
|
||||||
JobArgs() river.JobArgs
|
|
||||||
InsertOpts() river.InsertOpts
|
type CronJobArgInterface interface {
|
||||||
RunOnStart() bool
|
river.JobArgs
|
||||||
|
river.JobArgsWithInsertOpts
|
||||||
|
}
|
||||||
|
|
||||||
|
type CronJobArg struct {
|
||||||
|
Kind string
|
||||||
|
RunOnStart bool
|
||||||
|
PeriodicInterval river.PeriodicSchedule
|
||||||
|
|
||||||
|
Arg CronJobArgInterface
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user