Skip to main content

run_disk_writer

Function run_disk_writer 

Source
pub async fn run_disk_writer(
    log: Arc<EventLog>,
    events_rx: Receiver<Event>,
    warn: WarnSink,
)
Expand description

Background task: write events to the disk file as they arrive on the broadcast bus. Rotates when the file exceeds MAX_DISK_BYTES.

Spawned once per process run. Holds a tokio broadcast receiver and the EventLog’s disk path. Failures are reported through warn and the event is dropped from the disk stream (the in-memory ring is unaffected — disk is forensics-only).