Skip to main content

Module store

Module store 

Source
Expand description

Durable run records for hosts that serve many runs (an HTTP server, a job queue).

A RunStore keeps, per run: a RunRecord (status, outputs, pause reasons…), the run’s events as JSON, and the Snapshot of a paused run, so a run can be resumed by id after the client went away or the host restarted.

Nothing secret is persisted: event values serialize with secrets masked, and snapshots never contain secret plaintext (see crate::snapshot).

Structs§

RunFilter
Query for RunStore::list.
RunPage
One page of RunStore::list, newest first.
RunRecord
Persisted summary of one run.

Enums§

RunStatus
Lifecycle status of a stored run.
StoreError
Store failure.

Constants§

INTERRUPTED_BY_RESTART
Error message stored on runs interrupted by a host restart.

Traits§

RunStore
Durable storage of run records, events and snapshots.

Functions§

event_to_json
Serialize an event for storage. Secrets are masked by the value serializer; the snapshot carried by run_paused is dropped (stores keep it separately).
now_ms
Current Unix time in milliseconds (0 where no clock exists).
page_of
Apply filter to records already sorted newest first (shared by implementations).
sort_newest_first
Sort records newest first (ties broken by id, descending) for page_of.
validate_run_id
Validate a run id used as a storage key: 1–128 chars of [A-Za-z0-9_.-], not starting with ..

Type Aliases§

StoreResult
Result type of RunStore operations.