Expand description
The background task that does the forwarding.
It follows the shape of the daemon’s other background workers (spawn_eviction_monitor,
spawn_liveness_monitor): spawned once, driven by a poll interval, stopped by a
CancellationToken. It additionally carries its own token so disable can stop forwarding
without touching the daemon.
The ordering within a cycle is deliberate: poll, deliver, then persist offsets. Persisting before delivery would mean a daemon killed mid-cycle had already promised never to re-read events that never left the machine. Doing it after means a crash re-reads a little, which the deterministic document ids turn into harmless duplicates that the endpoint rejects with a 409.
Structs§
- Forwarder
Handle - Handle to a running forwarder.
- Forwarder
Snapshot - Live view of what the forwarder is doing, shared with the status endpoint.
Constants§
- DEFAULT_
POLL_ INTERVAL - How often the forwarder looks for new log content.
Functions§
- classify_
nodes - Split the registry into nodes that can be forwarded and nodes that cannot.
- spawn_
log_ forwarder - Start forwarding in the background.