Skip to main content

PipelineHandler

Trait PipelineHandler 

Source
pub trait PipelineHandler {
    // Required methods
    fn insert<'life0, 'async_trait>(
        &'life0 self,
        input: RowInsertRequests,
        ctx: QueryContextRef,
    ) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn insert_all<'life0, 'async_trait>(
        &'life0 self,
        inputs: Vec<(QueryContextRef, RowInsertRequests)>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Output>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn check_pipeline_query_permission(
        &self,
        query_ctx: &QueryContextRef,
    ) -> Result<()>;
    fn get_pipeline<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        version: PipelineVersion,
        query_ctx: QueryContextRef,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<Pipeline>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn insert_pipeline<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        content_type: &'life2 str,
        pipeline: &'life3 str,
        query_ctx: QueryContextRef,
    ) -> Pin<Box<dyn Future<Output = Result<PipelineInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn delete_pipeline<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        version: PipelineVersion,
        query_ctx: QueryContextRef,
    ) -> Pin<Box<dyn Future<Output = Result<Option<()>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_table<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        table: &'life1 str,
        query_ctx: &'life2 QueryContext,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Arc<Table>>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn build_pipeline(&self, pipeline: &str) -> Result<Pipeline>;
    fn get_pipeline_str<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        version: PipelineVersion,
        query_ctx: QueryContextRef,
    ) -> Pin<Box<dyn Future<Output = Result<(String, TimestampNanosecond)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

PipelineHandler is responsible for handling pipeline related requests.

The “Pipeline” is a series of transformations that can be applied to unstructured data like logs. This handler is responsible to manage pipelines and accept data for processing.

The pipeline is stored in the database and can be retrieved by its name.

Required Methods§

Source

fn insert<'life0, 'async_trait>( &'life0 self, input: RowInsertRequests, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn insert_all<'life0, 'async_trait>( &'life0 self, inputs: Vec<(QueryContextRef, RowInsertRequests)>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Output>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Checks every batch before inserting any of them.

Source

fn check_pipeline_query_permission( &self, query_ctx: &QueryContextRef, ) -> Result<()>

Source

fn get_pipeline<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, version: PipelineVersion, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Arc<Pipeline>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Loads a compiled pipeline for execution.

This intentionally does not check pipeline-query permission: users with write-only permission can ingest through an existing pipeline. Inspection and preview callers must check query permission first; ingestion enforces write and table-target permissions separately.

Source

fn insert_pipeline<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, content_type: &'life2 str, pipeline: &'life3 str, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<PipelineInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn delete_pipeline<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, version: PipelineVersion, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Option<()>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_table<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, table: &'life1 str, query_ctx: &'life2 QueryContext, ) -> Pin<Box<dyn Future<Output = Result<Option<Arc<Table>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn build_pipeline(&self, pipeline: &str) -> Result<Pipeline>

Source

fn get_pipeline_str<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, version: PipelineVersion, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<(String, TimestampNanosecond)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a original pipeline by name.

Implementors§