Rulvar API reference / @rulvar/store-postgres / PostgresQuotaLimiterOptions
Interface: PostgresQuotaLimiterOptions
Defined in: packages/store-postgres/src/quota.ts:204
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
acceptRulesUpdate? | boolean | Rules rotation opt-in: rewrite the schema's recorded rules fingerprint with this instance's own at boot instead of refusing on a mismatch. Procedure: enable on the NEW deployment, roll every host to the new rule set, then remove the flag so drift is refused again. Default false. | packages/store-postgres/src/quota.ts:243 |
admissionDeadlineMs? | number | Bound on one whole admission path (bootstrap, pool checkout, and the admission transaction together); default QUOTA_ADMISSION_DEADLINE_MS (5000). Must be an integer strictly greater than QUOTA_LOCK_TIMEOUT_MS, which bounds only the lock-wait stage inside it. Expiry throws QuotaDeadlineError into the engine's onLimiterError policy and destroys the connection the refused call held. | packages/store-postgres/src/quota.ts:235 |
max? | number | Pool size ceiling; default 10. Admissions are short transactions. | packages/store-postgres/src/quota.ts:225 |
now? | () => number | Injectable clock for window tests. | packages/store-postgres/src/quota.ts:245 |
rules | readonly QuotaRule[] | The shared rule set; must be identical across hosts. Enforced: the schema records quotaRulesFingerprint(rules) on first boot, and an instance whose fingerprint differs is refused with a typed ConfigError naming both hashes. | packages/store-postgres/src/quota.ts:223 |
schema? | string | Schema holding the two quota tables; default public. A non-public schema is created on boot. Must be a plain SQL identifier. | packages/store-postgres/src/quota.ts:216 |
url | string | A postgres connection string shared by every coordinating process and host (the database may also hold a PostgresStore; the tables do not collide). | packages/store-postgres/src/quota.ts:210 |