durable
lib/durable.vklib/durable.vk
Umbrella module combining Durable Objects (durable/object) and Durable Workflows (durable/workflow)
backed by db/kv's CRC-32 crash-safe WAL.
open-store = fn [path str] kv/KvStore
Opens a durable fsync-backed db/kv backing store for Durable Objects and Workflows.
open-store-fast = fn [path str] kv/KvStore
Opens a high-throughput WAL-backed db/kv store (for tests and ephemeral workloads).
object = fn [mut db kv/KvStore, ns str, id str] dobj/ObjectRef
Opens or creates a Durable Object (ns, id).
workflow = fn [mut db kv/KvStore, id str, name str, input any] dwf/WorkflowRun
Starts or idempotently resumes a Durable Workflow run id.
poll-workflows = fn [db kv/KvStore] block[str]
Scans db for runnable or timer-due Durable Workflows.
claim-workflow = fn [mut db kv/KvStore, id str, worker_id str, lease_dur dur] bool
Claims a distributed worker lease on workflow id.
workflow-dead-letters = fn [db kv/KvStore] block[map]
Lists all Dead-Letter Queue workflow entries in db.