Skip to main content

Backends

Trait Backends 

Source
pub trait Backends:
    Debug
    + Send
    + Sync {
    // Required methods
    fn source<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: Arc<Config>,
        options: &'life1 DaemonOptions,
    ) -> Pin<Box<dyn Future<Output = Result<SourceParts>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn sink<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        config: &'life1 Config,
        options: &'life2 DaemonOptions,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Sink>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Builds the concrete pipeline backends from a validated Config.

The daemon depends only on this trait; the composition root (the CLI) is the single place that names concrete backends. Connection and credentials are resolved by the implementation, in the environment that runs the pipeline — so a compiled flusso.lock carries no secret it wasn’t given literally.

Required Methods§

Source

fn source<'life0, 'life1, 'async_trait>( &'life0 self, config: Arc<Config>, options: &'life1 DaemonOptions, ) -> Pin<Box<dyn Future<Output = Result<SourceParts>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn sink<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, config: &'life1 Config, options: &'life2 DaemonOptions, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Sink>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Build the sink the engine writes to — a single configured sink, a fan-out over several, or a stdout fallback when none are configured.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§