Skip to main content

Module sync_ops

Module sync_ops 

Source
Expand description

sync.hello, sync.pull, sync.push, sync.members, sync.join and sync.keys: the transport’s thin handlers over the sync layer’s op bodies (backend::user_sync::ops, SPEC_USER_DATA_SYNC_LAYER). Each is a write op, so the transport has already required a certificate from an install this machine trusts. The caller the layer sees is that install’s id: the member of a collection is the install that holds this computer’s sync lock, so a request is answered only while this install holds it, and only for a caller that is a current member of the collection it names. Nothing here sends anything or reaches the relay. A join waits for a person unless the collection allows it; the collection’s keys reach a member sealed to its box key and never otherwise.

Structs§

HelloAns 🔒
HelloReq 🔒
LanProof 🔒
What the transport proved about the caller, as the layer’s join check needs it.

Constants§

MIN_PIN_AGE_MS 🔒
How long a peer’s pin must have been held here before a join may go ahead without a person.

Functions§

adapter_for 🔒
The adapter for a collection’s kind, or none for a kind this build does not merge.
exec 🔒
failed 🔒
hello 🔒
join 🔒
keys 🔒
members 🔒
parse 🔒
pull 🔒
push 🔒
refusal 🔒
run 🔒
with_ctx 🔒
Everything an op needs from this machine, then f: this install’s identity, the computer’s lock, the chains read back from the store and the caller’s proof. The store stays locked for as long as f runs and no longer, so f never waits on another machine (that one may be asking this one for the same store).