pub struct PipelineBridge { /* private fields */ }Expand description
Ring 0 side of the pipeline bridge (producer).
Sends compiled pipeline output through a lock-free SPSC queue.
The send_* methods take &self because SpscQueue::push uses
atomic internals and does not require &mut self.
Implementations§
Source§impl PipelineBridge
impl PipelineBridge
Sourcepub fn send_event(
&self,
row: &EventRow<'_>,
event_time: i64,
key_hash: u64,
) -> Result<(), PipelineBridgeError>
pub fn send_event( &self, row: &EventRow<'_>, event_time: i64, key_hash: u64, ) -> Result<(), PipelineBridgeError>
Sends a processed event row through the bridge.
Copies row.data() into a SmallVec (inline for <=256 bytes) so the
caller’s arena can be reset after this call returns.
§Errors
Returns PipelineBridgeError::Backpressure if the queue is full and
the strategy is BackpressureStrategy::DropNewest.
Sourcepub fn send_watermark(&self, timestamp: i64) -> Result<(), PipelineBridgeError>
pub fn send_watermark(&self, timestamp: i64) -> Result<(), PipelineBridgeError>
Sends a watermark advance through the bridge.
§Errors
Returns PipelineBridgeError::Backpressure if the queue is full.
Sourcepub fn send_checkpoint(&self, epoch: u64) -> Result<(), PipelineBridgeError>
pub fn send_checkpoint(&self, epoch: u64) -> Result<(), PipelineBridgeError>
Sends a checkpoint barrier through the bridge.
§Errors
Returns PipelineBridgeError::Backpressure if the queue is full.
Sourcepub fn send_eof(&self) -> Result<(), PipelineBridgeError>
pub fn send_eof(&self) -> Result<(), PipelineBridgeError>
Sends an end-of-stream marker through the bridge.
§Errors
Returns PipelineBridgeError::Backpressure if the queue is full.
Sourcepub fn has_capacity(&self) -> bool
pub fn has_capacity(&self) -> bool
Returns true if the SPSC queue has room for at least one more message.
Sourcepub fn is_backpressured(&self) -> bool
pub fn is_backpressured(&self) -> bool
Returns true if the SPSC queue is full.
Sourcepub fn stats(&self) -> &Arc<BridgeStats>
pub fn stats(&self) -> &Arc<BridgeStats>
Returns a reference to the shared statistics.
Sourcepub fn output_schema(&self) -> &Arc<RowSchema>
pub fn output_schema(&self) -> &Arc<RowSchema>
Returns the output schema.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PipelineBridge
impl !RefUnwindSafe for PipelineBridge
impl Send for PipelineBridge
impl Sync for PipelineBridge
impl Unpin for PipelineBridge
impl UnsafeUnpin for PipelineBridge
impl !UnwindSafe for PipelineBridge
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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