pub trait BatchSink: Send {
// Required methods
fn push<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
batch: &'life1 RecordBatch,
span: &'life2 OffsetSpan,
) -> Pin<Box<dyn Future<Output = Result<(), SinkError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn finish<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(CommitInfo, OffsetSpan), SinkError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
The RecordBatch-level write substrate a concrete sink implements.
push maps and submits a batch fire-and-forget; finish closes the current
window and returns (CommitInfo, submitted_span). The submitted span is the
ingest high-water, not a durable watermark — recovery reads delivered
coverage, never this (ADR-0038/0053).
Required Methods§
Sourcefn push<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
batch: &'life1 RecordBatch,
span: &'life2 OffsetSpan,
) -> Pin<Box<dyn Future<Output = Result<(), SinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn push<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
batch: &'life1 RecordBatch,
span: &'life2 OffsetSpan,
) -> Pin<Box<dyn Future<Output = Result<(), SinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Submit batch (covering source positions span) fire-and-forget.
§Errors
[SinkError] if the batch is rejected at the write boundary or the
transport fails to accept it.
Sourcefn finish<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(CommitInfo, OffsetSpan), SinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn finish<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(CommitInfo, OffsetSpan), SinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close the current batching window; return what was submitted and the submitted high-water span. Does not block on durability.
§Errors
[SinkError] if the window cannot be closed.