Documentation
¶
Overview ¶
Data residency example for Chronos.
A single logical agent that keeps EU tenant data on an EU-resident PostgreSQL and US tenant data on a US-resident PostgreSQL — routed at call time from a tenant claim. The same pattern applies to any pair of storage backends (US-Postgres + EU-Postgres, RDS + Cloud SQL, on-prem + hyperscaler, or SQLite files partitioned per region).
For a fully offline demo the example uses two SQLite files ("residency-eu.db", "residency-us.db"). The routing pattern is identical for production Postgres/DynamoDB backends — swap the factory. See ROUTING below.
Run:
go run ./examples/data_residency/main.go
Click to show internal directories.
Click to hide internal directories.