Expand description
Streaming Source API.
A Source is the entry point for data into a streaming pipeline. It wraps a channel producer with a type-safe interface and supports:
- Push individual records or batches
- Push Arrow
RecordBatchdirectly - Watermark emission for event-time processing
- Automatic SPSC → MPSC upgrade on clone
§Usage
ⓘ
use laminar_core::streaming::{Source, SourceConfig};
// Create a source
let (source, sink) = streaming::create::<MyEvent>(config);
// Push records
source.push(event)?;
source.push_batch(&events)?;
// Emit watermark
source.watermark(timestamp);
// Clone for multi-producer (triggers MPSC upgrade)
let source2 = source.clone();Structs§
- Source
- A streaming data source.
Traits§
- Record
- Trait for types that can be streamed through a Source.
Functions§
- create
- Creates a new Source/Sink pair with default configuration.
- create_
with_ config - Creates a new Source/Sink pair with custom configuration.