Skip to main content

sync_peer

Function sync_peer 

Source
async fn sync_peer<F, Fut>(
    store: &Arc<Store>,
    peer: &Peer,
    local: &[FleetMeta],
    call: &F,
) -> Result<(usize, BTreeMap<String, String>), String>
where F: Fn(String, &'static str, Value) -> Fut, Fut: Future<Output = RemoteOpResult>,
Expand description

List what peer holds and send it what it lacks. Returns how many entries and removals the peer applied, and which ones it answered but did not apply (an owner’s machine entry, say) with why. An entry the peer takes badly (one too big to send, say) is skipped and counted, not retried now; the peer is retried later only when the list itself failed or a send could not reach it.