Skip to main content

Crate zerodds_durability_store_file

Crate zerodds_durability_store_file 

Source
Expand description

File-per-sample cold adapter for the Durability-Service (ADR 0009).

Crate zerodds-durability-store-file. Safety classification: STANDARD.

Dependency-free PERSISTENT backend on a directory hierarchy:

<root>/<hex(topic)>/<hex(instance_key)>/<sequence>.bin   # [8B created_at_nanos LE][payload]
<root>/<hex(topic)>/<hex(instance_key)>/.unregistered    # unregister wall-clock (unix nanos, ASCII)

The topic and instance components are hex-encoded so the mapping is lossless and filesystem-safe (unlike a lossy sanitizer). The per-sample header persists created_at, so the store survives a process restart with full fidelity — that is exactly the PERSISTENT guarantee.

Retention follows the topic Contract (set via DurabilityStore::set_contract, or persisted along with the topic’s type name/keyedness via DurabilityStore::set_topic_meta — a .meta sidecar file per topic directory, so the daemon does not need to re-register it on every restart, only on a topic it serves for the very first time).

Structs§

FileStore
File-per-sample durability store rooted at a directory.