faucet_source_dynamodb/lib.rs
1#![cfg_attr(docsrs, feature(doc_cfg))]
2
3//! # faucet-source-dynamodb
4//!
5//! Amazon DynamoDB source connector for
6//! [faucet-stream](https://github.com/faucet-hq/faucet-stream):
7//!
8//! - `mode: scan` — parallel `Scan` (`segments` → `Segment`/`TotalSegments`,
9//! also exposed as cluster shards), resumable per-segment cursors;
10//! - `mode: query` — `Query` by key condition, optionally on an index;
11//! - `mode: streams` — DynamoDB Streams CDC: parent-before-child shard
12//! ordering, cumulative per-shard sequence bookmarks, `cdc_unwrap`-compatible
13//! `{op, before, after, key}` envelopes, trim-horizon gap detection with
14//! `on_gap: fail | resnapshot`, and `capture_resume_position` for
15//! `faucet mirror`.
16//!
17//! Items are converted to plain JSON without precision loss (numbers that
18//! are not exactly representable stay strings; sets become arrays; binary
19//! becomes base64). Delivery is at-least-once.
20
21mod config;
22mod discover;
23mod envelope;
24mod lag;
25mod lineage;
26mod scan;
27mod sched;
28mod state;
29mod stream;
30mod streams;
31#[cfg(test)]
32mod test_support;
33
34pub use config::{DynamoDbSourceConfig, MAX_SEGMENTS, OnGap, ReadMode, StreamStart};
35pub use envelope::{build_envelope, op_for_event, snapshot_envelope};
36pub use state::{ScanBookmark, SegmentCursor, StreamBookmark};
37pub use stream::DynamoDbSource;
38
39pub use faucet_common_dynamodb::{
40 DynamoDbCredentials, RetryPolicy, ValueFormat, build_client, build_streams_client,
41};
42
43mod descriptor;
44pub use descriptor::DESCRIPTOR;