sync15

Module clients_engine

source
Expand description

The client engine is a crate::engine(Sync Engine) used to manage the “clients” collection. The clients engine manages the client record for “this device, and also manages “commands”. In short, commands target one or more engines and instruct them to perform various operations - such as wiping all local data. These commands are used very rarely - currently the only command used in practice is for bookmarks to wipe all their data, which is sent when a desktop device restores all bookmarks from a backup. In this scenario, desktop will delete all local bookmarks then replace them with the backed up set, which without a “wipe” command would almost certainly cause other connected devices to “resurrect” the deleted bookmarks.

Structs§

  • Information about this device to include in its client record. This should be persisted across syncs, as part of the sync manager state.

Enums§

  • Indicates if a command was applied successfully, ignored, or not supported. Applied and ignored commands are removed from our client record, and never retried. Unsupported commands are put back into our record, and retried on subsequent syncs. This is to handle clients adding support for new data types.

Traits§

  • A command processor applies incoming commands like wipes and resets for all stores, and returns commands to send to other clients. It also manages settings like the device name and type, which is stored in the special clients collection.