Skip to main content

SinkPlugin

Trait SinkPlugin 

Source
pub trait SinkPlugin:
    SupportsGracefulShutdown
    + Send
    + Sync {
    // Required methods
    fn initialize<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn process_batch<'life0, 'async_trait>(
        &'life0 self,
        data: RecordBatch,
    ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn process_checkpoint_marker<'life0, 'async_trait>(
        &'life0 self,
        epoch: CheckpointEpoch,
    ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn process_checkpoint_finalizer<'life0, 'async_trait>(
        &'life0 self,
        epoch: CheckpointEpoch,
    ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn labels(&self) -> Vec<PluginLabel> { ... }
}
Expand description

Optional, non-FFI trait for the plugins to implement sink support.

Required Methods§

Source

fn initialize<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn process_batch<'life0, 'async_trait>( &'life0 self, data: RecordBatch, ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn process_checkpoint_marker<'life0, 'async_trait>( &'life0 self, epoch: CheckpointEpoch, ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returning a successful result indicates that the checkpoint marker was processed successfully, and an acknowledgment should be sent back to the source.

Source

fn process_checkpoint_finalizer<'life0, 'async_trait>( &'life0 self, epoch: CheckpointEpoch, ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn labels(&self) -> Vec<PluginLabel>

See SourcePlugin::labels.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§