Documentation
¶
Overview ¶
Package postgres owns the resources schema and data access identity.
Index ¶
- Variables
- func Migrate(ctx context.Context, db *sql.DB) error
- type Repository
- func (r *Repository) AcknowledgeEvent(ctx context.Context, id string) error
- func (r *Repository) CheckRuntime(ctx context.Context) error
- func (r *Repository) Claim(ctx context.Context, worker string, now time.Time, lease time.Duration) (resources.Job, error)
- func (r *Repository) PendingEvents(ctx context.Context, n int) ([]resources.Event, error)
- func (r *Repository) PrunePackages(ctx context.Context, now time.Time, n int) error
- func (r *Repository) Transaction(ctx context.Context, run func(resources.Transaction) error) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Schema string
Functions ¶
Types ¶
type Repository ¶
func (*Repository) AcknowledgeEvent ¶
func (r *Repository) AcknowledgeEvent(ctx context.Context, id string) error
func (*Repository) CheckRuntime ¶
func (r *Repository) CheckRuntime(ctx context.Context) error
CheckRuntime rejects migration credentials and cross-module access at startup.
func (*Repository) PendingEvents ¶
func (*Repository) PrunePackages ¶
PrunePackages removes only expired selection snapshots, never business records or idempotency receipts.
func (*Repository) Transaction ¶
func (r *Repository) Transaction(ctx context.Context, run func(resources.Transaction) error) error
Click to show internal directories.
Click to hide internal directories.