Skip to main content

Crate force_sync

Crate force_sync 

Source
Expand description

Correctness-first bidirectional Salesforce and Postgres sync engine.

Structs§

ChangeEnvelope
Canonical sync event stored in the journal and passed to planners.
CheckpointState
Stored checkpoint state for a capture stream.
DeadLetter
Dead-letter row captured for operator review.
DriftItem
A drift candidate discovered during reconciliation.
LaneThresholds
Transport cutovers for the planner lanes.
LeasedTask
A leased task returned from the task queue.
ObjectSync
Object-level sync configuration.
PgStore
PostgreSQL-backed store for sync engine work.
PlanDecision
The final planner decision after merge and lane selection.
PlannerContext
The pure inputs required to plan a change.
RestApplyResult
Result of applying a REST upsert to Salesforce.
SalesforceApplier
Minimal Salesforce REST applier for force-sync lanes.
SyncConflict
Conflict record stored for later review.
SyncEngine
Runtime sync engine for the explicit Postgres-to-Salesforce vertical slice.
SyncEngineBuilder
Builder for SyncEngine.
SyncKey
Canonical identity for a synced record.
SyncLink
Canonical sync link row.

Enums§

AppendResult
Result of attempting to append a journal entry when duplicates are allowed.
ApplyError
Error returned when a Salesforce apply operation fails.
ApplyLane
Apply lanes chosen by the planner.
ChangeOperation
Mutation type carried by a change envelope.
ConflictPolicy
Conflict resolution policy for an object sync definition.
ForceSyncError
Database and migration errors.
MergeOutcome
The result of merging payloads before lane selection.
Owner
Declares which system owns a field or field group.
SourceCursor
Source-specific cursor for replayable capture streams.
SourceSystem
Origin system for a captured change.

Functions§

capture_batch
Captures a batch of unprocessed PostgreSQL outbox 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.