Expand description
The pull protocol running on a weirdnet_net::Node (/weirdnet/sync/2).
The official WeirdBrains relay must not store pages; this module only exchanges sealed envelopes between the user’s own nodes.
Structs§
- Merge
Outcome - What
SyncState::merge_backtook from the snapshot. - Pull
Outcome - The result of a pull that may have applied pages before it failed.
- Sync
Handler - Request-response handler that talks
EnvelopeonSYNC_PROFILE. - Sync
State - Mutable state a sync node answers from and applies pages into.
Functions§
- node_
config - Listen with the in-memory transport (tests) or the caller’s config, 256 KiB caps.
- observe
- Advance our clock past the newest op held, so the next local write orders after everything this node has seen (a visit after a remote clear, say).
- pull_
chunks - Pull the chunks of
typ(forcrate::Limits::eager_chunksoff, or to retry): the same session aspull_from, for the companion typechunk_type(typ). - pull_
from - Hello then pull every roster member the peer advertised, applying pages and acking.
- pull_
from_ outcome pull_from, reporting the entries applied even when the pull stops early (a later page refused, the network gone, a rotation failing).- pull_
from_ shared - Pull for a state shared with this node’s
SyncHandler, without holding its lock across the network: snapshot, pull into the snapshot, thenSyncState::merge_back(also after an error, so pages already applied are kept). - start_
node - Start a sync node on
SYNC_PROFILE.