Skip to main content

SourceResolver

Trait SourceResolver 

Source
pub trait SourceResolver: Send + Sync {
    // Required method
    fn resolve<'life0, 'life1, 'async_trait>(
        &'life0 self,
        source: &'life1 DynamicSource,
    ) -> Pin<Box<dyn Future<Output = Result<ResolvedValue, SourceError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for resolving dynamic pipeline sources.

Implementations fetch data from external sources (files, commands, HTTP, NATS) and return it as a JSON value that can be injected into the pipeline.

Required Methods§

Source

fn resolve<'life0, 'life1, 'async_trait>( &'life0 self, source: &'life1 DynamicSource, ) -> Pin<Box<dyn Future<Output = Result<ResolvedValue, SourceError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolve a single dynamic source, returning the fetched data.

Implementors§