postgres

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: AGPL-3.0 Imports: 12 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 postgres owns all groups SQL. Use a dedicated groups database role.

Index

Constants

This section is empty.

Variables

View Source
var Schema string

Functions

This section is empty.

Types

type Repository

type Repository struct {
	Pool *pgxpool.Pool
	Now  func() time.Time
}

func (*Repository) ConfirmOutbox

func (r *Repository) ConfirmOutbox(ctx context.Context, id string) error

func (*Repository) Failed

func (r *Repository) Failed(ctx context.Context, id string, now time.Time) error

func (*Repository) Migrate

func (r *Repository) Migrate(ctx context.Context) error

func (*Repository) PendingOutbox

func (r *Repository) PendingOutbox(ctx context.Context, limit int, excludeSubjects []string) ([]g.Event, error)

PendingOutbox is a non-claiming read. Retry/held subjects are owned by the consuming relay and must be passed explicitly; no provider clock is involved.

func (*Repository) ReadAccount

func (r *Repository) ReadAccount(ctx context.Context, s aq.Selection) ([]aq.Record, error)

ReadAccount filters authoritative module facts before the stable exclusive page.

func (*Repository) Ready

func (r *Repository) Ready(ctx context.Context) error

func (*Repository) Relay

func (r *Repository) Relay(ctx context.Context, deliver func(context.Context, g.Event) error) error

Relay owns one LISTEN connection. The host restarts Relay after connection failure, with bounded backoff. Startup and reconnect immediately drain outbox. deliver must persist consumer inbox before returning nil.

func (*Repository) Retry

func (r *Repository) Retry(ctx context.Context, id string, now time.Time) error

Retry is a host-only administrative boundary; host must authorize and audit.

func (*Repository) Transaction

func (r *Repository) Transaction(ctx context.Context, fn func(g.Tx) error) error

Jump to

Keyboard shortcuts

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