pub struct StreamingProcessor { /* private fields */ }Expand description
Production streaming processor with bounded memory
Implementations§
Source§impl StreamingProcessor
impl StreamingProcessor
Sourcepub fn new(threshold_bps: u32) -> Result<Self, ProcessingError>
pub fn new(threshold_bps: u32) -> Result<Self, ProcessingError>
Create new production streaming processor
Sourcepub fn with_config(
threshold_bps: u32,
config: StreamingProcessorConfig,
) -> Result<Self, ProcessingError>
pub fn with_config( threshold_bps: u32, config: StreamingProcessorConfig, ) -> Result<Self, ProcessingError>
Create with custom configuration
Sourcepub fn trade_sender(&mut self) -> Option<Sender<AggTrade>>
pub fn trade_sender(&mut self) -> Option<Sender<AggTrade>>
Get trade sender for external components
Sourcepub fn bar_receiver(&mut self) -> Option<Receiver<RangeBar>>
pub fn bar_receiver(&mut self) -> Option<Receiver<RangeBar>>
Get bar receiver for external components
Sourcepub async fn start_processing(&mut self) -> Result<(), StreamingError>
pub async fn start_processing(&mut self) -> Result<(), StreamingError>
Start processing loop (bounded memory, infinite capability)
Sourcepub fn metrics(&self) -> &StreamingMetrics
pub fn metrics(&self) -> &StreamingMetrics
Get current metrics
Sourcepub fn get_final_incomplete_bar(&mut self) -> Option<RangeBar>
pub fn get_final_incomplete_bar(&mut self) -> Option<RangeBar>
Extract final incomplete bar when stream ends (for algorithmic consistency)
Sourcepub fn check_memory_usage(&self) -> bool
pub fn check_memory_usage(&self) -> bool
Check memory usage against threshold
Auto Trait Implementations§
impl Freeze for StreamingProcessor
impl RefUnwindSafe for StreamingProcessor
impl Send for StreamingProcessor
impl Sync for StreamingProcessor
impl Unpin for StreamingProcessor
impl UnwindSafe for StreamingProcessor
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