Documentation ¶
Overview ¶
Package datastore maintains all the datastorage implementation.
Package datastore contains datastore implementation for outbox.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoEvents = errors.New("no events")
ErrNoEvents is an error returned when no ready outbox rows available after mining from DB.
Functions ¶
This section is empty.
Types ¶
type MineSweeper ¶
type MineSweeper interface { // Mine mines the ready to dispatch outbox rows from DB. // Implementor should marks the fetched rows Status to InProcess so as to avoid being same records re-fetched in another // iteration by Worker. Mine(ctx context.Context) ([]event.OutboxRow, error) // Sweep delete or mark as Failed on publish occur or fails respectively. Sweep(context.Context, []int, []int) error io.Closer }
MineSweeper should be implemented by Datastore.
func NewPostgres ¶
NewPostgres constructs Postgres with all dependencies.
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
MySQL represents mysql implementation for MineSweeper.
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
Postgres represents postgres implementation for MineSweeper.
Click to show internal directories.
Click to hide internal directories.