Skip to main content

Crate faucet_source_dynamodb

Crate faucet_source_dynamodb 

Source
Expand description

§faucet-source-dynamodb

Amazon DynamoDB source connector for faucet-stream:

  • mode: scan — parallel Scan (segments → Segment/TotalSegments, also exposed as cluster shards), resumable per-segment cursors;
  • mode: query — Query by key condition, optionally on an index;
  • mode: streams — DynamoDB Streams CDC: parent-before-child shard ordering, cumulative per-shard sequence bookmarks, cdc_unwrap-compatible {op, before, after, key} envelopes, trim-horizon gap detection with on_gap: fail | resnapshot, and capture_resume_position for faucet mirror.

Items are converted to plain JSON without precision loss (numbers that are not exactly representable stay strings; sets become arrays; binary becomes base64). Delivery is at-least-once.

Structs§

DynamoDbSource
Amazon DynamoDB source. See the crate README for semantics.
DynamoDbSourceConfig
Configuration for DynamoDbSource.
RetryPolicy
Retry/backoff settings exposed on both connector configs.
ScanBookmark
Scan / query bookmark.
StreamBookmark
Streams bookmark.

Enums§

DynamoDbCredentials
How to authenticate with AWS DynamoDB (and DynamoDB Streams).
OnGap
What to do when the bookmark points before the Streams trim horizon (a resume after more than 24 hours, a re-enabled stream, a shard that expired before it was read).
ReadMode
What the source reads.
SegmentCursor
Where one scan segment (or the single query cursor) stands.
StreamStart
Where a stream shard starts when no bookmark exists for it.
ValueFormat
How records carry attribute values: plain JSON (the default) or DynamoDB’s typed attribute JSON ({"pk": {"S": "a"}, "tags": {"SS": [..]}}). typed keeps sets, binaries and numbers of any precision exactly, so a DynamoDB-to-DynamoDB copy round-trips every attribute type.

Constants§

DESCRIPTOR
The connector’s static descriptor (RFC 0013): its capabilities, answered from config alone.
MAX_SEGMENTS
DynamoDB’s TotalSegments ceiling.

Functions§

build_client
Build an aws_sdk_dynamodb::Client. endpoint_url overrides the endpoint for DynamoDB Local / LocalStack / VPC endpoints. No network I/O.
build_envelope
Assemble the envelope object.
build_streams_client
Build an aws_sdk_dynamodbstreams::Client with the same settings as build_client (DynamoDB Local serves Streams on the same endpoint).
op_for_event
Map a Streams eventName to the envelope op.
snapshot_envelope
Snapshot-read envelope (op: "r") for an item read by a resnapshot scan.