Trait dataflow::source::SimpleSource [−][src]
pub trait SimpleSource {
fn start<'life0, 'async_trait>(
self,
timestamper: &'life0 Timestamper
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Simple sources must implement this trait. Sources will then get created as part of the
create_source_simple
function.
Each simple source is given access to a timestamper instance that can be used to insert or retract rows for this source. See the API of the Timestamper for more details.
Required methods
fn start<'life0, 'async_trait>(
self,
timestamper: &'life0 Timestamper
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn start<'life0, 'async_trait>(
self,
timestamper: &'life0 Timestamper
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Consumes the instance of this SimpleSource and converts it into an async state machine that submits rows using the provided timestamper.
Implementors should return an Err(_) if an unrecoverable error is encountered or Ok(()) when they have finished consuming the upstream data.