Skip to main content

SourceFactory

Type Alias SourceFactory 

Source
pub type SourceFactory = Arc<dyn Fn(Option<&Arc<Registry>>) -> Result<Box<dyn SourceConnector>, ConnectorError> + Send + Sync>;
Expand description

Factory function type for creating source connectors.

The optional shared Prometheus registry allows connectors to register metrics and retain stable registry identity when one is available. Construction failures, including metrics registration errors, are returned to the caller.

Aliased Typeยง

pub struct SourceFactory { /* private fields */ }