Documentation
¶
Overview ¶
Package sqlstore owns durable notification event receipts and delivery rows.
Index ¶
- func SchemaStatements(dialect db.Dialect) ([]string, error)
- type Store
- func (s *Store) Accept(ctx context.Context, tenant contract.TenantID, id notifications.NotificationID, ...) error
- func (s *Store) Claim(ctx context.Context, tenant contract.TenantID, owner string, ...) ([]notifications.Delivery, error)
- func (s *Store) HasEvent(ctx context.Context, tenant contract.TenantID, eventID string) (bool, error)
- func (s *Store) RecordEvent(ctx context.Context, tenant contract.TenantID, eventID string, ...) (bool, error)
- func (s *Store) Retry(ctx context.Context, tenant contract.TenantID, id notifications.NotificationID, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) Accept ¶
func (s *Store) Accept(ctx context.Context, tenant contract.TenantID, id notifications.NotificationID, owner string, token int64, result notifications.DeliveryResult, at time.Time) error
func (*Store) RecordEvent ¶
func (s *Store) RecordEvent(ctx context.Context, tenant contract.TenantID, eventID string, deliveries []notifications.Delivery, at time.Time) (bool, error)
RecordEvent commits the consumer receipt and all planned deliveries together. A duplicate event is a no-op even when the outer outbox receipt was lost.