Skip to content

Class: SequencerDoSimulator

Defined in: server/src/multi-region.ts:89

In-memory SequencerDO simulator. Faithful to the DO API surface for unit tests: reserve(n) allocates N contiguous ids, snapshot() is the persisted counter for crash-restore assertions.

new SequencerDoSimulator(): SequencerDoSimulator

SequencerDoSimulator

reserve(n): { start: bigint; end: bigint; }

Defined in: server/src/multi-region.ts:91

number

{ start: bigint; end: bigint; }

readonly start: bigint

readonly end: bigint


snapshot(): bigint

Defined in: server/src/multi-region.ts:97

bigint


discardPending(n): void

Defined in: server/src/multi-region.ts:105

Simulate a crash by discarding N pending reservations — the counter is not rewound (holes are allowed by design), so downstream apply queues must be robust to gaps.

number

void