Skip to main content

Crate daemon

Crate daemon 

Source
Expand description

The flusso daemon — the supervisor around the engine.

It builds the pluggable parts from a validated Config, wires a StatusObserver that updates a shared Status, runs the engine, and polls source lag out of band.

It owns the domain: the pipeline and its observable state, and it is telemetry-agnostic — it depends only on the engine’s Observer trait, not on any metrics backend. It does not own transport: the HTTP surface, process signals, the telemetry exporter, and the metrics recording itself live in the binary (the CLI), which installs a meter provider, attaches its own metrics observer via Daemon::with_observer, reads the Status handle this exposes, serves it, and drives shutdown:

  CLI ── install meter provider ─▶ Daemon::start ──▶ RunningDaemon
   │                                                   │  .status() ─▶ Arc<Status>  (CLI serves it)
   └── shutdown future (signals) ─▶ RunningDaemon::run(shutdown)

Re-exports§

pub use status::IndexState;
pub use status::Phase;
pub use status::Status;
pub use status::StatusSnapshot;

Modules§

status
The live operational state of a running daemon.

Structs§

BatchStats
What one committed batch did — reported to Observer::on_batch_committed.
Daemon
A configured-but-not-yet-running sync daemon over one Config.
DaemonOptions
How a Daemon run is parameterized — the pipeline knobs the CLI exposes as flags. Transport settings (HTTP address, …) are the binary’s concern, not the daemon’s, so they are not here.
IndexName
RunningDaemon
A built sync daemon, ready to run. Exposes its live Status so a transport the binary owns can serve it concurrently with the run.
SourceParts
A source capture paired with the document builder over the same source.
StatusObserver
Updates the shared Status as the engine reports lifecycle and progress. Cheap and non-blocking, per the Observer hot-path contract.

Traits§

Backends
Builds the concrete pipeline backends from a validated Config.
Observer
A sink for the engine’s lifecycle and progress events.