pub trait SourceFactory: Send + Sync {
// Required method
fn build(
&self,
id: &str,
config: Value,
retry: Option<RetryPolicy>,
) -> Result<Box<dyn Source>>;
}Expand description
Builds a Box<dyn Source> from a JSON spec. Polling sources receive an
optional RetryPolicy extracted from SourceSpec; push-based sources
(kafka, http_webhook) reject it at factory time so users don’t think
retry is doing something it isn’t.