1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! **Rivet** — CLI tool to export PostgreSQL and MySQL tables to Parquet/CSV files
//! (local, S3, GCS) with tuning profiles, preflight diagnostics, chunked parallelism,
//! retry logic, and SQLite-backed state tracking.
//!
//! # Not a stable public API
//!
//! This crate (`rivet-cli` on crates.io) is a **CLI product**, not an embeddable library.
//! The library target exists solely to support Rust's integration test harness (`tests/`
//! requires a library to link against). Internal modules may change at any patch release
//! without notice. See `docs/adr/0002-cli-product-vs-library.md` for the full decision.
//!
//! **Stable for integration tests**: `config`, `format`, `pipeline`, `resource`, `state`.
//! All other modules are `pub(crate)` and not reachable from external consumers.
// Public — accessed by integration tests in tests/*.rs
// Public for the `rivet-mcp` binary in src/bin/. Not part of any external
// API contract — same "internal, may change at any patch" disclaimer applies.
// pub(crate) — internal implementation modules; not part of any external API contract
pub
/// Test-only re-exports of the otherwise `pub(crate)` `destination` module.
///
/// Integration tests in `tests/` need to construct a `Box<dyn Destination>`
/// to drive `pipeline::write_manifest` end-to-end, but the trait and factory
/// stay `pub(crate)` to keep the destination surface internal. This window
/// re-exports just the two items required (`Destination`, `create_destination`)
/// behind a clearly-marked module name so the public crate API doesn't grow.
///
/// Not part of any external API contract — same "internal, may change at any
/// patch" disclaimer as the other lib modules in this file.
pub
pub
pub
// Credential redaction invariant (ADR-0014, v0.7.2 P0.3). `pub` so the
// integration test `tests/redaction_invariant.rs` can drive it directly
// — same "internal, may change at any patch" disclaimer as the rest of
// the public-by-necessity surface.
// Test-only fault-injection hook used by `tests/live_crash_recovery.rs`.
// Activated by the `RIVET_TEST_PANIC_AT` env var; no-op otherwise. See
// module docs for details.
pub
// Preflight diagnostics. The `check` and `doctor` entry points are invoked
// from `src/cli/dispatch.rs` (binary-only) and the internal
// `get_export_diagnostic` is used by `pipeline::plan_cmd` (lib + binary).
//
// We expose this as `pub mod` rather than `pub(crate) mod` so dead-code
// analysis sees the entry points as part of the crate's public API. Without
// that, the lib compilation unit (which doesn't depend on `cli::dispatch`)
// would mark the entire transitive surface as dead and force a blanket
// `#[allow(dead_code)]` that silences genuine dead code inside the module.
// Same "no external API contract" disclaimer as the other lib modules.
pub
pub
pub