sqlstore

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sqlstore owns durable notification event receipts and delivery rows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SchemaStatements

func SchemaStatements(dialect db.Dialect) ([]string, error)

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func New

func New(database *sql.DB, dialect db.Dialect) (*Store, error)

func (*Store) Accept

func (*Store) Claim

func (s *Store) Claim(ctx context.Context, tenant contract.TenantID, owner string, now, leaseUntil time.Time, limit int) ([]notifications.Delivery, error)

func (*Store) HasEvent

func (s *Store) HasEvent(ctx context.Context, tenant contract.TenantID, eventID string) (bool, 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.

func (*Store) Retry

func (s *Store) Retry(ctx context.Context, tenant contract.TenantID, id notifications.NotificationID, owner string, token int64, next time.Time, cause string, exhausted bool, at time.Time) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL