faucet_core/lib.rs
1//! # faucet-core
2//!
3//! Shared types, traits, and utilities for the faucet-stream ecosystem.
4//!
5//! This crate provides the common foundation used by all faucet source and
6//! sink connectors:
7//!
8//! - [`FaucetError`] — unified error type
9//! - [`Source`] / [`Sink`] — async traits for data connectors
10//! - [`RecordTransform`] — record transformation pipeline
11//! - [`ReplicationMethod`] — incremental replication support
12//! - [`schema::infer_schema`] — JSON Schema inference from record samples
13
14pub mod config;
15pub mod error;
16pub mod pipeline;
17pub mod replication;
18pub mod schema;
19pub mod traits;
20pub mod transform;
21pub mod util;
22
23pub use error::FaucetError;
24pub use pipeline::{Pipeline, PipelineResult, run_stream};
25pub use replication::ReplicationMethod;
26pub use traits::{Sink, Source};
27pub use transform::RecordTransform;
28
29// Re-export dependencies that connector authors need, so they only depend on
30// `faucet-core` instead of adding `async-trait` and `serde_json` themselves.
31pub use async_trait::async_trait;
32pub use schemars::{self, JsonSchema, schema_for};
33pub use serde_json::{self, Value, json};