1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use crateRaftTypeConfig;
use crateIoProgressSender;
use crateRaftDataMetrics;
use crateRaftMetrics;
use crateRaftServerMetrics;
use crateWatchSenderOf;
/// The channels [`RaftCore`] publishes its own state on, for observers to read.
///
/// The fields are senders that [`RaftCore`] owns. [`RaftCore::flush_metrics()`] is the routine
/// publisher: it publishes the IO progress first, and then `report_metrics()` updates `data` and
/// `server` when they changed, and sends `all` last, so a reader that sees `all` change finds the
/// other two updated. `RaftCore::main()` is the terminal publisher: when it stops, after its last
/// `flush_metrics()`, it publishes the shutdown state. Each channel holds a consistent snapshot of
/// its own values; the channels are not updated as one.
///
/// [`RaftCore`]: crate::core::RaftCore
/// [`RaftCore::flush_metrics()`]: crate::core::RaftCore::flush_metrics
pub