Skip to main content

Module sync_loop

Module sync_loop 

Source
Expand description

Sync loop handle: runs the background sync loop on a prepared OS thread.

Owns the sync infrastructure (storage client, HLC, the owned Database handle, etc.) and runs sync cycles on a timer or manual trigger. Setup prepares that thread and its current-thread Tokio runtime before Store publication, so installing a connected Store does not construct a runtime or depend on a host-provided one. Publishes the current SyncLoopStatus through a watch channel the host handle owns — so a subscription survives a loop restart, and the loop only ever sends.

Structs§

PreparedSyncLoopRuntime
A sync-loop OS thread whose Tokio runtime is ready but has not received a Store session yet.
SyncLoopHandle
Manages the background sync loop and provides access to sync components.
SystemSyncLoopRuntimeFactory
The production sync-loop runtime factory.

Enums§

BlockedOperation
One durable operation a successful cycle left waiting on a person.
BlockedOperationId
Names one blocked operation for a retry, whichever kind it is.
RetryStuckReclaimError
Why the sync loop could not return a stuck reclaim operation to its journal.
SyncLoopError
Why preparing the background sync loop failed.
SyncLoopFailure
SyncLoopStatus
A sync-loop status the host renders. The loop reports provider reachability, publication, and one terminal status. Blocked is a successful storage cycle with durable operations waiting on a person; Synchronized has none, while Failed means the cycle itself failed. The in-progress marker is the variant itself, so there is no separate “syncing” flag.

Traits§

SyncLoopRuntimeFactory
Creates a ready sync-loop thread and runtime before Store publication.