sui_indexer_alt_framework::pipeline

Trait Processor

Source
pub trait Processor {
    type Value: Send + Sync + 'static;

    const NAME: &'static str;
    const FANOUT: usize = 10usize;

    // Required method
    fn process(
        &self,
        checkpoint: &Arc<CheckpointData>,
    ) -> Result<Vec<Self::Value>>;
}
Expand description

Implementors of this trait are responsible for transforming checkpoint into rows for their table. The FANOUT associated value controls how many concurrent workers will be used to process checkpoint information.

Required Associated Constants§

Source

const NAME: &'static str

Used to identify the pipeline in logs and metrics.

Provided Associated Constants§

Source

const FANOUT: usize = 10usize

How much concurrency to use when processing checkpoint data.

Required Associated Types§

Source

type Value: Send + Sync + 'static

The type of value being inserted by the handler.

Required Methods§

Source

fn process(&self, checkpoint: &Arc<CheckpointData>) -> Result<Vec<Self::Value>>

The processing logic for turning a checkpoint into rows of the table.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§