pub trait SplitReader: Sized + Send {
type Properties;
type Split: SplitMetaData;
// Required methods
fn new<'async_trait>(
properties: Self::Properties,
state: Vec<Self::Split>,
parser_config: ParserConfig,
source_ctx: SourceContextRef,
columns: Option<Vec<Column>>,
) -> Pin<Box<dyn Future<Output = ConnectorResult<Self>> + Send + 'async_trait>>
where Self: 'async_trait;
fn into_stream(self) -> BoxChunkSourceStream;
// Provided methods
fn backfill_info(&self) -> HashMap<SplitId, BackfillInfo> { ... }
fn seek_to_latest<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SplitImpl>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
SplitReader
is a new abstraction of the external connector read interface which is
responsible for parsing, it is used to read messages from the outside and transform them into a
stream of parsed StreamChunk
Required Associated Types§
type Properties
type Split: SplitMetaData
Required Methods§
fn new<'async_trait>(
properties: Self::Properties,
state: Vec<Self::Split>,
parser_config: ParserConfig,
source_ctx: SourceContextRef,
columns: Option<Vec<Column>>,
) -> Pin<Box<dyn Future<Output = ConnectorResult<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
fn into_stream(self) -> BoxChunkSourceStream
Provided Methods§
fn backfill_info(&self) -> HashMap<SplitId, BackfillInfo>
fn seek_to_latest<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SplitImpl>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Object Safety§
This trait is not object safe.