Expand description
CDC interface boundary (Phase 1 spike).
This module intentionally does not depend on a specific CDC implementation crate. It defines the public boundary types we would accept/produce if we add CDC in Phase 2.
§Example
use rust_data_processing::cdc::{CdcEvent, CdcOp, RowImage, SourceMeta, TableRef};
use rust_data_processing::types::Value;
let ev = CdcEvent {
meta: SourceMeta { source: Some("db".to_string()), checkpoint: None },
table: TableRef::with_schema("public", "users"),
op: CdcOp::Insert,
before: None,
after: Some(RowImage::new(vec![
("id".to_string(), Value::Int64(1)),
("name".to_string(), Value::Utf8("Ada".to_string())),
])),
};
assert_eq!(ev.op, CdcOp::Insert);Structs§
- CdcCheckpoint
- A cursor/checkpoint used to resume CDC consumption.
- CdcEvent
- A single change event.
- RowImage
- A single row image.
- Source
Meta - Minimal metadata common across CDC sources.
- Table
Ref - Identifies a table in a source database.
Enums§
- CdcOp
- The operation represented by a CDC event.
Traits§
- CdcSource
- Batch-oriented CDC source boundary.