Skip to main content

Crate daemon

Crate daemon 

Source
Expand description

§flusso-daemon

The flusso daemon — the supervisor around the engine. Owns the domain (pipeline + observable state); owns no transport.

§Owns vs doesn’t

Owns (domain)Does not own (the binary’s)
building the pluggable parts from a Configthe HTTP surface
running the engineprocess signals
a StatusObserver → shared Statusthe telemetry exporter
polling source lag out of bandthe metrics recording itself

It is telemetry-agnostic: it depends only on the engine’s Observer trait, not on any metrics backend. The CLI 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)

ℹ️ Info — keeping transport in the binary is what lets the daemon stay a pure library: a different host (a test, an embedder) can drive the same pipeline and read the same Status without dragging in an HTTP server or a metrics exporter.

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.