pub type SourceFactory = Arc<dyn Fn(Value) -> CliResult<Box<dyn Source>> + Send + Sync>;Expand description
A factory that builds a Source trait object from its JSON/YAML config
(source.config). This is the extension point third-party connectors plug
into: a custom-CLI author registers one per connector type: they want
their faucet binary to understand.
The factory is synchronous — a connector that needs to connect eagerly
should do so lazily on first use (the pattern every built-in file/DB
connector already follows). Return a typed error (wrap your own error in
faucet_core::FaucetError::Custom) on invalid config.
Aliased Type§
pub struct SourceFactory { /* private fields */ }