rigatoni_destinations/
lib.rs

1// Copyright 2025 Rigatoni Contributors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// SPDX-License-Identifier: Apache-2.0
16
17//! Rigatoni Destinations - ETL Destination Implementations
18//!
19//! This crate provides production-ready destination implementations for the Rigatoni ETL framework.
20//! Destinations are the final stage in the ETL pipeline where processed events are written
21//! to external systems.
22//!
23//! # Available Destinations
24//!
25//! - **S3**: AWS S3 and S3-compatible storage (MinIO, LocalStack)
26//!
27//! # Features
28//!
29//! Destinations and formats are enabled via Cargo features:
30//!
31//! - `s3` - AWS S3 destination (default)
32//! - `json` - JSON serialization support (default)
33//! - `csv` - CSV serialization support (default)
34//! - `parquet` - Apache Parquet serialization support
35//! - `avro` - Apache Avro serialization support
36//! - `gzip` - Gzip compression support
37//! - `zstandard` - Zstandard compression support
38//!
39//! # Quick Start
40//!
41//! ```rust,ignore
42//! use rigatoni_destinations::s3::{S3Destination, S3Config};
43//! use rigatoni_core::Destination;
44//!
45//! #[tokio::main]
46//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
47//!     let config = S3Config::builder()
48//!         .bucket("my-data-lake")
49//!         .region("us-east-1")
50//!         .prefix("mongodb/events")
51//!         .build()?;
52//!
53//!     let mut destination = S3Destination::new(config).await?;
54//!
55//!     // Use with change stream listener
56//!     // listener.pipe_to(destination).await?;
57//!
58//!     destination.close().await?;
59//!     Ok(())
60//! }
61//! ```
62
63// S3 destination module (enabled with "s3" feature)
64#[cfg(feature = "s3")]
65pub mod s3;