MongoSnapshotStoreOptionsType
此内容尚不支持你的语言。
Defined in: src/persistence/snapshot-stores/MongoSnapshotStoreOptions.ts:6
Connection options shared by all three MongoDB stores.
Extends
Section titled “Extends”MongoConnection.StoreSerializerOptionsBase
Properties
Section titled “Properties”autoCreateIndexes?
Section titled “autoCreateIndexes?”
readonlyoptionalautoCreateIndexes?:boolean
Defined in: src/persistence/snapshot-stores/MongoSnapshotStoreOptions.ts:12
Create the indexes on first use. Default: true.
client?
Section titled “client?”
readonlyoptionalclient?:MongoClientLike
Defined in: src/persistence/journals/MongoClient.ts:109
Pre-built client — bypasses the lazy mongodb import entirely. Use to
share ONE client across the journal, snapshot and durable-state stores (see
registerMongoPlugins), or to inject a fake in tests. A MongoClient is
itself a connection pool, so sharing it is the normal case.
Inherited from
Section titled “Inherited from”MongoConnection.client
clientOptions?
Section titled “clientOptions?”
readonlyoptionalclientOptions?:Record<string,unknown>
Defined in: src/persistence/journals/MongoClient.ts:102
Extra MongoClient options — { tls, authSource, maxPoolSize, … }.
Inherited from
Section titled “Inherited from”MongoConnection.clientOptions
databaseName?
Section titled “databaseName?”
readonlyoptionaldatabaseName?:string
Defined in: src/persistence/journals/MongoClient.ts:100
Database name. Default actor_ts. A database in the URL path is only
used by the driver for auth, so the name is stated separately.
Inherited from
Section titled “Inherited from”MongoConnection.databaseName
keepN?
Section titled “keepN?”
readonlyoptionalkeepN?:number
Defined in: src/persistence/snapshot-stores/MongoSnapshotStoreOptions.ts:10
How many snapshots to keep per persistence id. Default: 3; <= 0 keeps all.
serializer?
Section titled “serializer?”
readonlyoptionalserializer?:Serializer<unknown>
Defined in: src/persistence/storage/StoreSerializerOptions.ts:23
Custom payload serializer. When set, the store writes rows in the
self-describing __serialized__ framing (see PayloadCodec) instead
of the default tagged JSON; rows of both formats can coexist in one
stream, but reading a framed row back requires a serializer with the
same id to be configured.
Inherited from
Section titled “Inherited from”StoreSerializerOptionsBase.serializer
snapshotsCollection?
Section titled “snapshotsCollection?”
readonlyoptionalsnapshotsCollection?:string
Defined in: src/persistence/snapshot-stores/MongoSnapshotStoreOptions.ts:8
Snapshots collection name. Default: snapshots.
readonlyoptionalurl?:string
Defined in: src/persistence/journals/MongoClient.ts:95
Connection string, e.g. mongodb://user:pass@host:27017 or
mongodb+srv://cluster.example.mongodb.net. Required unless client is
supplied.
Inherited from
Section titled “Inherited from”MongoConnection.url
