Skip to main content

Module session

Module session 

Source

Structs§

Exit
Exported
Imported
PeerRefused
The peer’s daemon refused the sync and the peer said why on the stream.
Watermark
How far a run of import chunks got. Each chunk’s max_seq is already its own watermark: the seq before its first failed record, if any.

Enums§

Merged

Traits§

Local
This machine’s store: sb reaches it through the daemon’s API, the daemon directly. Records cross it as sealed wire lines, so only the daemon holds a key and the session only carries lines between it and the peer.
Remote
One running sb sync-export or sb sync-import on a peer.
Transport

Functions§

pull
push
push_start
The receiver’s report is authoritative: the pusher resumes from the higher of its cursor and the report, unless the report fell below the last one, which means the receiver was restored and gets everything after what it still holds again.
read_checked_header
serve_push
The receiving end of push, run by sb sync-import: answers the pusher’s hello with this store’s, imports the rest of input, then reports the highest seq it applied without a gap. header is the stream’s, which the caller reads with read_checked_header before it reaches the store, so a refused stream never does.
sync
A full pull then push with one peer, recorded as a success for health only once both have finished.
sync_with
sync with a peer whose machine id the caller already asked for.