Skip to content

@xtandard/entitlements/counters/mongodb

MongoDB counter store: one pipeline findOneAndUpdate per atomic add, unique-_id claims, TTL-index expiry (ADR 0004).

import { … } from "@xtandard/entitlements/counters/mongodb";
Name Summary
createMongoCounterStore Create a MongoDB-backed counter store. Connection (and the TTL index) is lazy — set up on the first operation.
Name Summary
MongoCounterStore A MongoDB CounterStore with keys and close().
MongoCounterStoreOptions Options for createMongoCounterStore.