Expand description
PostgreSQL event notification target.
Persists S3 events into a user-provided PostgreSQL table using the
Target trait. Two output formats are supported:
namespace(default): single row per object key, UPSERT on each event.access: append-only audit log with one row per delivered event.
TLS is provided via tokio-postgres-rustls with rustls + aws-lc-rs.
When tls_ca is empty the connector loads native OS trust roots.
Connection pooling is delegated to deadpool-postgres; the pool itself
is Clone, so no Mutex is required around it.
Structs§
- Postgres
Args - PostgreSQL target configuration.
- Postgres
Dsn - Parsed representation of a PostgreSQL DSN string.
- Postgres
Target - PostgreSQL notification target.
Enums§
- Postgres
Format - Output format selection for the PostgreSQL target.
Functions§
- access_
insert_ sql - SQL for the
accessformat. Append-only withevent_idas PK so that store-replay scenarios silently skip duplicates while distinct events still land as separate rows. - build_
pool - Builds the deadpool-postgres
Poolused by the target. - build_
tls_ config - Builds a rustls
ClientConfigfor the PostgreSQL connection. - map_
pg_ error - Maps a
tokio_postgres::Errorto the properTargetErrorvariant. - map_
pool_ error - Maps a
deadpool_postgres::PoolErrorto the properTargetErrorvariant. - namespace_
delete_ sql - SQL for the
namespaceformat on object removal. Deletes the row keyed on the object key so thenamespacetable stays consistent with the object lifecycle instead of retaining stale state after a delete. - namespace_
upsert_ sql - SQL for the
namespaceformat. Performs UPSERT keyed on the object key. - parse_
postgres_ format - Parses the
formatconfiguration value. - qualified_
table - Returns the qualified
"schema"."table"SQL identifier forargs. - table_
probe_ sql - SQL used by both
init()and the connectivity probe to verify the table exists and is readable without producing rows or triggering side effects. - validate_
pg_ identifier - Validates a PostgreSQL identifier (schema or table name).