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