Expand description
Correctness-first bidirectional Salesforce and Postgres sync engine.
Re-exports§
pub use model::ChangeEnvelope;pub use model::ChangeOperation;pub use model::SourceCursor;pub use model::SourceSystem;
Modules§
- migrate
- Embedded Postgres migration runner for force-sync.
- model
- Change envelope and cursor types for sync events. Change envelope and cursor types for sync events.
Structs§
- Checkpoint
State - Stored checkpoint state for a capture stream.
- Dead
Letter - Dead-letter row captured for operator review.
- Drift
Item - A drift candidate discovered during reconciliation.
- Lane
Thresholds - Transport cutovers for the planner lanes.
- Leased
Task - A leased task returned from the task queue.
- Object
Sync - Object-level sync configuration.
- PgStore
- PostgreSQL-backed store for sync engine work.
- Plan
Decision - The final planner decision after merge and lane selection.
- Planner
Context - The pure inputs required to plan a change.
- Rest
Apply Result - Result of applying a REST upsert to Salesforce.
- Salesforce
Applier - Minimal Salesforce REST applier for force-sync lanes.
- Sync
Conflict - Conflict record stored for later review.
- Sync
Engine - Runtime sync engine for the explicit Postgres-to-Salesforce vertical slice.
- Sync
Engine Builder - Builder for
SyncEngine. - SyncKey
- Canonical identity for a synced record.
- Sync
Link - Canonical sync link row.
Enums§
- Append
Result - Result of attempting to append a journal entry when duplicates are allowed.
- Apply
Error - Error returned when a Salesforce apply operation fails.
- Apply
Lane - Apply lanes chosen by the planner.
- Conflict
Policy - Conflict resolution policy for an object sync definition.
- Force
Sync Error - Database and migration errors.
- Merge
Outcome - The result of merging payloads before lane selection.
- Owner
- Declares which system owns a field or field group.
Functions§
- capture_
batch - Captures a batch of unprocessed
PostgreSQLoutbox rows into the sync journal. - capture_
stream - Captures a decoded CDC stream into the sync journal and checkpoints replay positions.
- detect_
drift - Detects drift by comparing the latest journal row for each record to the stored link.
- enqueue_
repair - Enqueues a repair task for a journal row.
- load_
replay_ id - Loads the stored replay cursor for a CDC stream.
- merge_
payload - Merges an incoming payload into the current payload using field ownership rules.
- migrate
- Applies the force-sync schema migrations in version order.
- plan_
change - Plans how a change should be applied after merge resolution.
- project_
sync_ link - Projects the latest sync link row after a successful apply.
- run_
reconcile_ once - Runs one reconciliation pass and enqueues repair tasks for detected drift.
- version
- Returns the crate version for smoke tests and runtime diagnostics.