pub trait Decoder: Send + Sync {
// Required method
fn decode(
&self,
data: &[u8],
metadata: ArcEventMetadata,
) -> Result<EventBatch>;
}Expand description
A trait for components that convert a byte stream into an EventBatch.
Required Methods§
Sourcefn decode(&self, data: &[u8], metadata: ArcEventMetadata) -> Result<EventBatch>
fn decode(&self, data: &[u8], metadata: ArcEventMetadata) -> Result<EventBatch>
Decodes bytes into an EventBatch.
The caller must provide the starting metadata for the batch (e.g., source ID, ingestion time).