Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / AdmissionState

Interface: AdmissionState

Defined in: packages/core/src/admission/memory.ts:112

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

PropertyTypeDefined in
accountQueuesRecord<string, FairQueueState>packages/core/src/admission/memory.ts:134
arrivalCounternumberpackages/core/src/admission/memory.ts:135
bucketsRecord<string, { bucket?: TokenBucketState; debts: { atMs: number; wires: number; }[]; held: number; window?: SlidingWindowState; }>packages/core/src/admission/memory.ts:124
tenantQueueFairQueueStatepackages/core/src/admission/memory.ts:133
ticketsRecord<string, { accountFinishTag: number; accountStartTag: number; appliedOps: string[]; keys: Partial<Record<"tenant" | "providerAccount" | "scope", string>>; request: AdmissionRequest; ticket: AdmissionTicket; }>packages/core/src/admission/memory.ts:113