Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/workflow / checkpoint-store-memory / InMemoryCheckpointStore
Class: InMemoryCheckpointStore
Defined in: packages/workflow/src/checkpoint-store-memory.ts:33
Pure in-memory CheckpointStore implementation. Thread-safe within a single Node.js event loop because every mutation is synchronous; concurrent runs that share the same instance will see a consistent view.
Stable
Implements
Constructors
Constructor
new InMemoryCheckpointStore(): InMemoryCheckpointStore;Returns
InMemoryCheckpointStore
Methods
deleteThread()
deleteThread(threadId): Promise<void>;Defined in: packages/workflow/src/checkpoint-store-memory.ts:141
Parameters
| Parameter | Type |
|---|---|
threadId | string |
Returns
Promise<void>
Implementation of
getTuple()
getTuple(
threadId,
namespace,
checkpointId?): Promise<
| CheckpointTuple
| null>;Defined in: packages/workflow/src/checkpoint-store-memory.ts:81
Parameters
| Parameter | Type |
|---|---|
threadId | string |
namespace | string |
checkpointId? | string |
Returns
Promise< | CheckpointTuple | null>
Implementation of
list()
list(
threadId,
namespace,
opts?): AsyncIterable<CheckpointTuple>;Defined in: packages/workflow/src/checkpoint-store-memory.ts:105
Parameters
| Parameter | Type |
|---|---|
threadId | string |
namespace | string |
opts? | ListOptions |
Returns
AsyncIterable<CheckpointTuple>
Implementation of
put()
put(
threadId,
namespace,
checkpoint,
metadata): Promise<string>;Defined in: packages/workflow/src/checkpoint-store-memory.ts:37
Parameters
| Parameter | Type |
|---|---|
threadId | string |
namespace | string |
checkpoint | Checkpoint |
metadata | CheckpointMetadata |
Returns
Promise<string>
Implementation of
putWrites()
putWrites(
threadId,
namespace,
checkpointId,
writes,
taskId): Promise<void>;Defined in: packages/workflow/src/checkpoint-store-memory.ts:59
Parameters
| Parameter | Type |
|---|---|
threadId | string |
namespace | string |
checkpointId | string |
writes | readonly PendingWrite[] |
taskId | string |
Returns
Promise<void>
Implementation of
size()
size(): number;Defined in: packages/workflow/src/checkpoint-store-memory.ts:159
Test-only helper that exposes the raw count of stored checkpoints — handy for assertions like "the runtime wrote exactly N checkpoints across the run".
Returns
number