Crate rigatoni_core

Crate rigatoni_core 

Source
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: event module defines MongoDB change stream events
  • Stream: stream module provides MongoDB change stream listener with auto-reconnection
  • Destination: destination module defines the destination trait for writing events
  • State: state module provides state storage for resume tokens
  • Pipeline: pipeline module 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
MongoDB Change 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
MongoDB Change Stream Wrapper