sources_postgres/lib.rs
1#![doc = include_str!("../README.md")]
2// Integration/e2e tests (in `tests/`) pull dev-dependencies the unit-test build
3// doesn't touch; allow that only under `cfg(test)` — the normal build still
4// enforces unused dependencies.
5#![cfg_attr(test, allow(unused_crate_dependencies))]
6
7mod cdc;
8mod document;
9
10pub use cdc::WalChangeCapture;
11pub use document::PgDocumentBuilder;
12
13// Re-exported so callers can build a capture without depending on
14// `pgwire-replication` directly.
15pub use pgwire_replication::{Lsn, ReplicationConfig, SslMode, TlsConfig};
16
17/// Fuzzing entry point for the pgoutput decoder — feeds arbitrary bytes through
18/// it and asserts (by not panicking) that malformed input is rejected rather
19/// than crashing. Used by the `fuzz/` cargo-fuzz crate; gated behind the
20/// `fuzzing` feature and not part of the stable API.
21#[cfg(feature = "fuzzing")]
22pub fn fuzz_pgoutput_decode(data: &[u8]) {
23 cdc::fuzz_decode(data);
24}