Documentation
¶
Overview ¶
foony-sync is the customer-run Database Sync agent: it connects to the customer's own Postgres (credentials never leave their infrastructure), captures row changes over logical replication, recomputes registered live queries, and publishes the resulting docs to foony's reserved db: channels.
Configuration is the environment plus one local file, matching the docker run in the dashboard:
FOONY_SYNC_KEY the source credential from the dashboard (appSlug.keyId:secret) DATABASE_URL the Postgres DSN (needs REPLICATION + SELECT on watched tables) FOONY_SYNC_CONFIG path to the definitions file (default ./foony-sync.json) FOONY_URL optional data-plane override (default https://realtime.foony.io)
The definitions file holds the live queries and never leaves this machine; the dashboard only ever sees name-and-tables summaries from heartbeats.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
agent
Package agent is foony-sync: the customer-run Database Sync agent.
|
Package agent is foony-sync: the customer-run Database Sync agent. |
|
cdc
Package cdc reads PostgreSQL logical replication (WAL) events and surfaces them as a stream of row-level change events.
|
Package cdc reads PostgreSQL logical replication (WAL) events and surfaces them as a stream of row-level change events. |
|
engine
Package engine turns customer-database change events into recomputed Database Sync docs.
|
Package engine turns customer-database change events into recomputed Database Sync docs. |
|
spec
Package spec defines the Database Sync live-query shape shared by the control plane (which validates and stores definitions) and the foony-sync agent (which executes them against the customer's database).
|
Package spec defines the Database Sync live-query shape shared by the control plane (which validates and stores definitions) and the foony-sync agent (which executes them against the customer's database). |
Click to show internal directories.
Click to hide internal directories.