pub struct Holding<'a> {
pub program: &'a str,
pub network: Options,
pub known: Vec<([u8; 32], Vec<SocketAddr>)>,
pub quiet: Duration,
pub appear_wait: Duration,
pub check: Pace,
pub stop: &'a AtomicBool,
pub now: &'a (dyn Fn() -> u64 + Sync),
}Expand description
How the holder of the sync role runs.
Fields§
§program: &'a strThe program that holds the role, as the records name it, such as nib sync --serve.
network: OptionsHow its endpoint starts: it takes connections on the first free port from
Options::port, within ten, then on any.
known: Vec<([u8; 32], Vec<SocketAddr>)>Where other replicas are, found other than on the network, as in tests.
quiet: DurationHow long it waits after new changes before it syncs them, so that the changes of a burst travel together.
appear_wait: DurationHow long it waits at most after another replica appears before it connects, unless that one connects meanwhile: a random wait up to this, so that two holders that see each other at once seldom connect to each other at once.
check: PaceHow it paces its checks of the replica’s copies.
stop: &'a AtomicBoolSet, it lets go of the role, once the syncs under way end.
now: &'a (dyn Fn() -> u64 + Sync)The wall clock.