Module agde::fast_forward
source · Expand description
Mechanics for reading the current data from other piers after being offline for some time.
Procedure
At agde’s startup, call crate::Manager::process_fast_forward
and send it.
Agde will not apply any events that are received and given to crate::Manager::apply_event
.
If the answer is crate::MessageKind::Cancelled
, try again.
Then, call crate::Manager::apply_fast_forward_reply
. This will create a message which
fetches the diffs. Send that and wait for the response. Then, call the methods of
crate::sync::Response
. Also call crate::Manager::apply_sync_reply
.
Now, you get back a list of crate::log::EventApplier
s, since we need to apply the events
received during the fast forward. Handle all of them.
Structs
- The metadata for all files we’re tracking.
- Returned from
crate::Manager::apply_sync_reply
. - A request to fast forward the local data.
- The metadata of a resource.
- A fast forward response. This contains the data to bring us up and running again.
Enums
- An error while handling fast forwarding.
- A single change between sets of metadata.