Expand description
Rigatoni Core - CDC/Data Replication Framework Core Types and Traits
This crate provides the foundational types and traits for the Rigatoni CDC/Data Replication framework.
It includes event definitions, pipeline orchestration, and MongoDB integration.
§Key Components
- Events:
eventmodule definesMongoDBchange stream events - Stream:
streammodule providesMongoDBchange stream listener with auto-reconnection - Destination:
destinationmodule defines the destination trait for writing events - State:
statemodule provides state storage for resume tokens - Pipeline:
pipelinemodule provides the core pipeline orchestration - Traits: Source and Transform traits (coming soon)
§Example
use rigatoni_core::event::{ChangeEvent, OperationType};
fn process_event(event: ChangeEvent) {
match event.operation {
OperationType::Insert => println!("New document inserted"),
OperationType::Update => println!("Document updated"),
OperationType::Delete => println!("Document deleted"),
_ => println!("Other operation"),
}
}Modules§
- destination
- Destination Trait and Error Types
- event
MongoDBChange Stream Event Representation- metrics
- Metrics instrumentation for Rigatoni pipeline observability.
- pipeline
- Pipeline orchestration for MongoDB change streams to destinations.
- state
- State storage for pipeline resume tokens.
- stream
MongoDBChange Stream Wrapper