Created
March 30, 2021 11:57
-
-
Save rishabh-gupta2/c1750be2924db8cc77f294197424dd4e to your computer and use it in GitHub Desktop.
Outboxer interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Outboxer interface { | |
// Send expects an active gorm transaction alongwith | |
// a registered JobHandler and creates a new outbox job. | |
Send(context.Context, *gorm.DB, JobHandler) error | |
// Start initiates fetcher and processor goroutines to pick up and | |
// process persisted outbox jobs. | |
Start(context.Context) | |
// Stop gracefully terminates all the outbox goroutines. | |
Stop(context.Context) | |
// RegisterJobHandler registers JobHandler structs. | |
RegisterJobHandler(JobHandler) error | |
// RegisterMetrics expects a prometheus registerer and is used | |
// to register outbox metrics. | |
RegisterMetrics(registerer prometheus.Registerer) error | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment