pub trait CoverageStore: Send + Sync {
// Required methods
fn record<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sink: &'life1 SinkId,
span: &'life2 OffsetSpan,
) -> Pin<Box<dyn Future<Output = Result<(), CoverageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn covered<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sink: &'life1 SinkId,
topic: &'life2 str,
partition: i32,
) -> Pin<Box<dyn Future<Output = Result<Vec<CoveredRange>, CoverageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn gaps<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sink: &'life1 SinkId,
topic: &'life2 str,
partition: i32,
up_to: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<CoveredRange>, CoverageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}Expand description
Per-sink write coverage: record durably-written spans, read covered ranges, and compute the gaps recovery must replay.
Required Methods§
Sourcefn record<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sink: &'life1 SinkId,
span: &'life2 OffsetSpan,
) -> Pin<Box<dyn Future<Output = Result<(), CoverageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn record<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sink: &'life1 SinkId,
span: &'life2 OffsetSpan,
) -> Pin<Box<dyn Future<Output = Result<(), CoverageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Record that span was durably written by sink. Merges by union with
existing coverage; overlapping/adjacent ranges coalesce. Idempotent.
§Errors
CoverageError::Backend if the durable backing fails.
Sourcefn covered<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sink: &'life1 SinkId,
topic: &'life2 str,
partition: i32,
) -> Pin<Box<dyn Future<Output = Result<Vec<CoveredRange>, CoverageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn covered<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sink: &'life1 SinkId,
topic: &'life2 str,
partition: i32,
) -> Pin<Box<dyn Future<Output = Result<Vec<CoveredRange>, CoverageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The union-merged covered ranges for (sink, topic, partition), ordered by
start.
§Errors
CoverageError::Backend if the durable backing fails.
Provided Methods§
Sourcefn gaps<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sink: &'life1 SinkId,
topic: &'life2 str,
partition: i32,
up_to: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<CoveredRange>, CoverageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn gaps<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sink: &'life1 SinkId,
topic: &'life2 str,
partition: i32,
up_to: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<CoveredRange>, CoverageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The gaps in [0, up_to) not yet covered for (sink, topic, partition) —
the windows recovery must replay.
§Errors
CoverageError::Backend if the durable backing fails.