Rulvar API reference / @rulvar/rulvar / AdmissionState
Interface: AdmissionState
Defined in: packages/core/dist/index.d.ts
The scheduler's WHOLE state as one plain-JSON document: the durable implementations (sqlite, postgres) persist exactly this shape and CAS it atomically per lifecycle call, which is the RFC's first shipped durable form (a single scheduler over durable state; the multi-replica story beyond deterministic ordering is deferred by section 10). Per-row schemas are an optimization the SPI does not require: atomic "state moved AND buckets moved" holds trivially when the whole document commits or none of it does.
Properties
| Property | Type | Defined in |
|---|---|---|
accountQueues | Record<string, FairQueueState> | packages/core/dist/index.d.ts |
arrivalCounter | number | packages/core/dist/index.d.ts |
buckets | Record<string, { bucket?: TokenBucketState; debts: { atMs: number; wires: number; }[]; held: number; window?: SlidingWindowState; }> | packages/core/dist/index.d.ts |
tenantQueue | FairQueueState | packages/core/dist/index.d.ts |
tickets | Record<string, { accountFinishTag: number; accountStartTag: number; appliedOps: string[]; keys: Partial<Record<"tenant" | "providerAccount" | "scope", string>>; request: AdmissionRequest; ticket: AdmissionTicket; }> | packages/core/dist/index.d.ts |