laminar_connectors/lib.rs
1//! `LaminarDB` connector framework.
2
3#![deny(missing_docs)]
4#![warn(clippy::all, clippy::pedantic)]
5#![allow(clippy::duration_suboptimal_units)] // MSRV 1.85; from_mins/from_hours are 1.91+
6#![allow(clippy::module_name_repetitions)]
7#![allow(clippy::too_many_arguments, clippy::too_many_lines)]
8// Connector protocols keep explicit inputs and contiguous state transitions.
9// Connectors are Ring 1 (cold path): std HashMap/HashSet are acceptable
10// throughout config, registry, schema, checkpoint, and CDC modules.
11#![allow(clippy::disallowed_types)]
12// Common test patterns that are acceptable
13#![cfg_attr(
14 test,
15 allow(
16 clippy::assert_is_empty, // Assert cardinality without requiring equality on fixture elements.
17 clippy::field_reassign_with_default,
18 clippy::float_cmp,
19 clippy::manual_let_else,
20 clippy::needless_return,
21 clippy::unreadable_literal,
22 clippy::approx_constant,
23 clippy::cast_possible_truncation,
24 clippy::cast_possible_wrap,
25 clippy::cast_sign_loss,
26 clippy::cast_precision_loss,
27 clippy::no_effect_underscore_binding,
28 unused_mut
29 )
30)]
31
32// ── Connector SDK ──
33
34/// Connector error types.
35pub mod error;
36
37#[macro_use]
38mod macros;
39
40/// Connector configuration types.
41pub mod config;
42
43/// Secret classification and durable connector-identity sanitization.
44pub mod security;
45
46/// Core connector traits (`SourceConnector`, `SinkConnector`).
47pub mod connector;
48pub mod generator;
49
50/// Connector checkpoint types.
51pub mod checkpoint;
52
53/// Reconnect/backoff helper shared across source connectors.
54pub mod retry;
55
56/// Shared Prometheus registry/counter helpers used by per-connector
57/// metric structs.
58pub mod prom;
59
60/// Record serialization and deserialization framework.
61pub mod serde;
62
63/// Schema inference, resolution, and evolution framework.
64pub mod schema;
65
66/// Connector registry with factory pattern.
67pub mod registry;
68
69/// Testing utilities (mock connectors, helpers).
70#[cfg(any(test, feature = "testing"))]
71pub mod testing;
72
73// ── Existing Modules ──
74
75/// Kafka source and sink connectors.
76#[cfg(feature = "kafka")]
77pub mod kafka;
78
79/// PostgreSQL connector-specific configuration and implementations.
80#[cfg(any(feature = "postgres-cdc", feature = "postgres-sink"))]
81pub mod postgres;
82
83/// Lakehouse connectors (Delta Lake, Iceberg).
84pub mod lakehouse;
85
86/// Sink-agnostic changelog collapse for upsert sinks (Z-set / CDC → key-unique
87/// `_op` batch). Pulled in by upsert-capable sink features (e.g. `delta-lake`).
88#[cfg(feature = "changelog-collapse")]
89pub mod changelog;
90
91/// Cloud storage infrastructure (credential resolution, validation, secret masking).
92pub mod storage;
93
94/// Finite startup snapshot sources for reference tables.
95pub mod reference;
96
97/// WebSocket source and sink connectors.
98#[cfg(feature = "websocket")]
99pub mod websocket;
100
101/// MongoDB CDC source and sink connectors.
102#[cfg(feature = "mongodb-cdc")]
103pub mod mongodb;
104
105/// OpenTelemetry OTLP/gRPC source connector.
106#[cfg(feature = "otel")]
107pub mod otel;
108
109/// NATS core and JetStream source and sink connectors.
110#[cfg(feature = "nats")]
111pub mod nats;
112
113/// RabbitMQ AMQP 0-9-1 source and sink.
114#[cfg(feature = "rabbitmq")]
115pub mod rabbitmq;
116
117/// IBM MQ source and sink over MQI (client library loaded at run time).
118#[cfg(feature = "ibmmq")]
119pub mod ibmmq;
120
121/// FIX TagValue session source connector.
122#[cfg(feature = "fix")]
123pub mod fix;
124
125/// FpML document decoder: pinned XML Schema validation and configured typed projection.
126#[cfg(feature = "fpml")]
127pub mod fpml;
128
129/// AutoLoader-style file source and sink connectors.
130#[cfg(feature = "files")]
131#[allow(
132 clippy::similar_names,
133 clippy::cast_possible_truncation,
134 clippy::must_use_candidate,
135 clippy::items_after_statements,
136 clippy::manual_let_else,
137 clippy::missing_fields_in_debug,
138 clippy::unnecessary_wraps,
139 clippy::case_sensitive_file_extension_comparisons,
140 clippy::map_unwrap_or,
141 clippy::unnecessary_literal_bound,
142 clippy::too_many_lines
143)]
144pub mod files;