outbox for gateways

This commit is contained in:
Stephan D
2026-02-18 01:35:28 +01:00
parent 974caf286c
commit 69531cee73
221 changed files with 12172 additions and 782 deletions

View File

@@ -0,0 +1,17 @@
package outbox
import (
"context"
"time"
"go.mongodb.org/mongo-driver/v2/bson"
)
// Store persists gateway outbox events.
type Store interface {
Create(ctx context.Context, event *Event) error
ListPending(ctx context.Context, limit int) ([]*Event, error)
MarkSent(ctx context.Context, eventRef bson.ObjectID, sentAt time.Time) error
MarkFailed(ctx context.Context, eventRef bson.ObjectID) error
IncrementAttempts(ctx context.Context, eventRef bson.ObjectID) error
}