Skip to main content

Module sync

Module sync 

Source

Structs§

CommandsRun
Job
RulesRun

Enums§

Activity
Command
Work the daemon asks an account’s sync thread to do on its connection, on a client’s behalf.
Event
NextPass
The pass a command needs after it; when several ask, the larger wins.
SyncError

Constants§

MAX_RULE_BODY
The largest message, in bytes, a rule’s body condition downloads by itself.

Functions§

connect
Resolves the account’s password and logs in.
group_digits
n with separator between groups of three digits.
load_rules_for
offline_message
Why an offline account cannot run a command: <account> is offline (<reason>); retrying at <HH:MM>, local time.
run_loop
run_loop_with
The loop body, with connection and back-off sleeping injected so tests can drive it with the fake.
run_rules
run_rules_with
sync_all_with
Syncs every listed folder. A folder that fails is skipped and reported in the second list; the others still sync. A lost connection or a stop ends the pass with that error instead.
sync_folder
sync_folder_with

Type Aliases§

Checkpoint
Called between steps of a pass with what is happening; may run queued commands on the connection. Returns true when it used the connection, so the caller selects its folder again.
EventResults
RequestId
Names one command so the event that completes it can be matched to whoever sent it.