type

Store

type Store struct { pool *pgxpool.Pool uploadLockPool *pgxpool.Pool uploadLockWait time.Duration }

A PostgreSQL implementation of Ridu’s document, snapshot, auth, preference, task, job, lock, upload-reference, and migration store contracts.

Source adapters/postgres/postgres.go:30

Implemented capabilities

store.Storedocument transactions
Begins atomic read-write operation transactions.
store.SnapshotStorestable snapshots
Begins stable read snapshots for upload reconciliation and other cross-page scans.
store.HealthStoreconnectivity
Checks PostgreSQL connectivity through Ping.
store.ReadinessStoreruntime readiness
Checks connectivity, the completed ledger head manifest, and incomplete phased work.
store.MigrationReadinessStoreexact executable history
Checks the complete ordered ledger against the fingerprint embedded in the release binary.
store.PreferenceStorepreferences
Persists per-user admin and application settings.
store.DocumentLockStoredocument locks
Acquires, renews, takes over, and releases authoring leases.
store.AuthStoreauthentication
Persists password state, sessions, tokens, API keys, and auth rate limits.
store.AuthMaintenanceStoreauth maintenance
Prunes expired sessions and API keys in bounded batches.
store.AuthUnlockStoreaccount unlocks
Clears authorized persisted account lockout state.
store.TaskStoredurable tasks
Enqueues, leases, completes, retries, cancels, inspects, and prunes durable work.
store.UploadObjectLockerupload coordination
Serializes upload object creation, adoption, and destructive deletion across processes.

Use the application and Local API for content operations. These capability interfaces are primarily useful to framework/runtime integrations. Transactions returned by Begin implement store.Transaction, AuthTransaction, AuthBootstrapTransaction, AuthUnlockTransaction, VersionTransaction, UploadReferenceTransaction, and transaction-level UploadObjectLocker.

Methods