Compare commits
3 Commits
v1.1.0
...
4bc900f387
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bc900f387 | ||
|
|
e7a1db2c16 | ||
|
|
c8cf318faa |
@@ -1,15 +1,22 @@
|
||||
package contracts
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/riverqueue/river"
|
||||
)
|
||||
|
||||
type CronJob interface {
|
||||
Description() string
|
||||
Periodic() time.Duration
|
||||
JobArgs() []river.JobArgs
|
||||
InsertOpts() *river.InsertOpts
|
||||
RunOnStart() bool
|
||||
Args() []CronJobArg
|
||||
}
|
||||
|
||||
type CronJobArgInterface interface {
|
||||
river.JobArgs
|
||||
river.JobArgsWithInsertOpts
|
||||
}
|
||||
|
||||
type CronJobArg struct {
|
||||
Kind string
|
||||
RunOnStart bool
|
||||
PeriodicInterval river.PeriodicSchedule
|
||||
|
||||
Arg CronJobArgInterface
|
||||
}
|
||||
|
||||
@@ -7,3 +7,8 @@ type EventHandler interface {
|
||||
PublishToTopic() string
|
||||
Handler(msg *message.Message) ([]*message.Message, error)
|
||||
}
|
||||
|
||||
type EventPublisher interface {
|
||||
Topic() string
|
||||
Marshal() ([]byte, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user