feature_gated_executor_mod

Macro feature_gated_executor_mod 

Source
macro_rules! feature_gated_executor_mod {
    (
        $mod_name:ident,
        $executor_name:ident <S: StateStore>,
        $source_name:literal,
        ( $( $param_name:ident : $param_type:ty ),* $(,)? )
    ) => { ... };
}
Expand description

Define a stream executor module that is gated by a feature.

This is similar to feature_gated_source_mod in the connector crate, allowing heavy or unpopular source implementations (and their dependencies) to be disabled at compile time to decrease compilation time and binary size.

When the feature is disabled, this macro generates a dummy executor implementation that returns an error indicating the feature is not enabled.

§Example

feature_gated_executor_mod!(
    batch_adbc_snowflake_list,
    BatchAdbcSnowflakeListExecutor<S: StateStore>,
    "adbc_snowflake",
    (
        _actor_ctx: ActorContextRef,
        _stream_source_core: StreamSourceCore<S>,
        _metrics: Arc<StreamingMetrics>,
        _barrier_receiver: UnboundedReceiver<Barrier>,
        _barrier_manager: LocalBarrierManager,
        _associated_table_id: Option<TableId>,
    )
);