pub struct StreamNode {
pub id: String,
pub processor: Arc<dyn StreamProcessor>,
pub backpressure_config: BackpressureConfig,
pub chunk_config: Option<ChunkConfig>,
pub collect_results: bool,
}Expand description
Stream node for processing data streams
Fields§
§id: String§processor: Arc<dyn StreamProcessor>§backpressure_config: BackpressureConfig§chunk_config: Option<ChunkConfig>§collect_results: boolImplementations§
Source§impl StreamNode
impl StreamNode
Sourcepub fn new(id: impl Into<String>, processor: Arc<dyn StreamProcessor>) -> Self
pub fn new(id: impl Into<String>, processor: Arc<dyn StreamProcessor>) -> Self
Create a new stream node
Sourcepub fn with_backpressure(self, config: BackpressureConfig) -> Self
pub fn with_backpressure(self, config: BackpressureConfig) -> Self
Configure backpressure
Sourcepub fn with_chunking(self, config: ChunkConfig) -> Self
pub fn with_chunking(self, config: ChunkConfig) -> Self
Enable chunked processing for large datasets
Sourcepub fn collect_results(self, collect: bool) -> Self
pub fn collect_results(self, collect: bool) -> Self
Set whether to collect all results (default: true) If false, only the last result is stored
Sourcepub async fn process_stream(
&self,
data: Vec<Value>,
ctx: &Context,
) -> RuleResult
pub async fn process_stream( &self, data: Vec<Value>, ctx: &Context, ) -> RuleResult
Process a stream of data
Trait Implementations§
Source§impl Clone for StreamNode
impl Clone for StreamNode
Source§fn clone(&self) -> StreamNode
fn clone(&self) -> StreamNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamNode
impl Debug for StreamNode
Source§impl Node for StreamNode
impl Node for StreamNode
Auto Trait Implementations§
impl Freeze for StreamNode
impl !RefUnwindSafe for StreamNode
impl Send for StreamNode
impl Sync for StreamNode
impl Unpin for StreamNode
impl !UnwindSafe for StreamNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more