Skip to content
English

ObjectStorageSnapshotStoreOptionsType

ObjectStorageSnapshotStoreOptionsType = StoreSerializerOptionsBase & object

Defined in: src/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.ts:11

readonly backend: ObjectStorageBackend

The underlying storage layer (S3 / Filesystem / …).

readonly optional compression?: CompressionConfig | CompressionResolver

Compression — flat config or per-pid resolver. Default: { algorithm: 'gzip' }.

readonly optional encryption?: EncryptionConfig | EncryptionResolver

Encryption — flat config or per-pid resolver. Default: { mode: 'none' }.

readonly optional keepN?: number

Keep this many snapshots per persistenceId; older ones are deleted on save. Default: 3.

readonly optional maxDecompressedBytes?: number

Cap on the decompressed size of a stored body in bytes — the decompression-bomb guard on read (security audit #3). Default 512 MiB (DEFAULT_MAX_DECOMPRESSED_BYTES); Infinity opts out. Raise it to restore a legitimately large snapshot, or lower it for a tighter bound.

readonly optional ownsBackend?: boolean

Whether close() should also close the injected backend. Default true — a standalone store owns the backend it was given. Set false when the same backend is shared with another store (as registerObjectStoragePlugins does across the snapshot + durable-state stores) so one store’s close() can’t tear the backend out from under the other; the owner closes it once.

readonly optional prefix?: string

Prepended to every key before the persistenceId. Default: ”.