type

Store

type Store struct { client *mongo.Client database *mongo.Database now func() time.Time closeMu sync.Mutex closed bool closeErr error indexLifecycleMu sync.Mutex indexesMu sync.RWMutex verifiedIndexes map[schema.StableID]mongoVerifiedIndexPlan verifiedVersionIndexes map[schema.StableID]bool verifiedReferenceIndexes bool verifiedPreferenceIndexes bool verifiedDocumentLockIndexes bool verifiedTaskIndexes bool verifiedAuthIndexes bool verifiedUploadLockIndexes bool uploadLockRetry time.Duration uploadLockWait time.Duration uploadLockLifecycleMu sync.Mutex uploadLockLifecycleCtx context.Context uploadLockLifecycleCancel context.CancelFunc uploadLockOperations sync.WaitGroup }

A replica-set implementation of Ridu’s document, snapshot, auth, preference, task, lock, upload, readiness, and migration contracts.

Source adapters/mongodb/mongodb.go:50

@param store.Store
Begins majority-committed snapshot-isolated write transactions.
@param store.SnapshotStore
Begins stable read-only adapter snapshots.
@param store.HealthStore
Checks the writable replica-set primary.
@param store.ReadinessStore
Checks manifest-ledger and managed-index readiness.
@param store.MigrationReadinessStore
Checks the complete ledger against the release-binary fingerprint.
@param store.PreferenceStore
Persists per-user settings.
@param store.DocumentLockStore
Coordinates authoring leases.
@param store.AuthStore
Persists credentials, sessions, tokens, API keys, and rate limits.
@param store.AuthMaintenanceStore
Prunes expired auth records in bounded batches.
@param store.AuthUnlockStore
Clears authorized persisted lockout state.
@param store.TaskStore
Persists and leases durable work.
@param store.UploadObjectLocker
Coordinates upload object changes across processes.

Use the application and Local API for content operations; the adapter exposes no raw BSON filter, database handle, ObjectID contract, or second Mongo-specific content API.

Transactions add auth/bootstrap/unlock, versions, distinct, windows, upload-reference lookup, and transaction-level upload locking to store.Transaction.

Production support is limited to generated starter and blank applications on Linux x86-64 with MongoDB Community 8.2.9, SCRAM-SHA-256, verified TLS, and a writable three-member replica set. Atlas, DocumentDB, Cosmos DB, standalone or sharded deployments, and other versions, topologies, and platforms are not supported.

Methods

Related types

  • StableID

    A deterministic identifier for schema evolution.