Trait FlowEngine

Source
pub trait FlowEngine {
    // Required methods
    async fn create_flow(
        &self,
        args: CreateFlowArgs,
    ) -> Result<Option<u64>, Error>;
    async fn remove_flow(&self, flow_id: u64) -> Result<(), Error>;
    async fn flush_flow(&self, flow_id: u64) -> Result<usize, Error>;
    async fn flow_exist(&self, flow_id: u64) -> Result<bool, Error>;
    async fn list_flows(&self) -> Result<impl IntoIterator<Item = u64>, Error>;
    async fn handle_flow_inserts(
        &self,
        request: InsertRequests,
    ) -> Result<(), Error>;
    async fn handle_mark_window_dirty(
        &self,
        req: DirtyWindowRequests,
    ) -> Result<(), Error>;
}

Required Methods§

Source

async fn create_flow(&self, args: CreateFlowArgs) -> Result<Option<u64>, Error>

Create a flow using the provided arguments, return previous flow id if exists and is replaced

Source

async fn remove_flow(&self, flow_id: u64) -> Result<(), Error>

Remove a flow by its ID

Source

async fn flush_flow(&self, flow_id: u64) -> Result<usize, Error>

Flush the flow, return the number of rows flushed

Source

async fn flow_exist(&self, flow_id: u64) -> Result<bool, Error>

Check if the flow exists

Source

async fn list_flows(&self) -> Result<impl IntoIterator<Item = u64>, Error>

List all flows

Source

async fn handle_flow_inserts( &self, request: InsertRequests, ) -> Result<(), Error>

Handle the insert requests for the flow

Source

async fn handle_mark_window_dirty( &self, req: DirtyWindowRequests, ) -> Result<(), Error>

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§