@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";Functions
Section titled “Functions”| Name | Summary |
|---|---|
createMongoCounterStore |
Create a MongoDB-backed counter store. Connection (and the TTL index) is lazy — set up on the first operation. |
Interfaces
Section titled “Interfaces”| Name | Summary |
|---|---|
MongoCounterStore |
A MongoDB CounterStore with keys and close(). |
MongoCounterStoreOptions |
Options for createMongoCounterStore. |