mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-11-29 15:36:36 -05:00
rework public address detection timing
This commit is contained in:
parent
c357a7499e
commit
f59c4509ea
3 changed files with 23 additions and 5 deletions
|
|
@ -71,12 +71,14 @@ pub type SerializedBucketMap = BTreeMap<CryptoKind, SerializedBuckets>;
|
|||
|
||||
#[derive(Clone, Debug, Default, Eq, PartialEq)]
|
||||
pub struct RoutingTableHealth {
|
||||
/// Number of reliable (responsive) entries in the routing table
|
||||
/// Number of reliable (long-term responsive) entries in the routing table
|
||||
pub reliable_entry_count: usize,
|
||||
/// Number of unreliable (occasionally unresponsive) entries in the routing table
|
||||
pub unreliable_entry_count: usize,
|
||||
/// Number of dead (always unresponsive) entries in the routing table
|
||||
pub dead_entry_count: usize,
|
||||
/// Number of live (responsive) entries in the routing table per RoutingDomain and CryptoKind
|
||||
pub live_entry_counts: BTreeMap<(RoutingDomain, CryptoKind), usize>,
|
||||
/// If PublicInternet network class is valid yet
|
||||
pub public_internet_ready: bool,
|
||||
/// If LocalNetwork network class is valid yet
|
||||
|
|
|
|||
|
|
@ -925,10 +925,13 @@ impl RoutingTableInner {
|
|||
NetworkClass::Invalid
|
||||
);
|
||||
|
||||
let live_entry_counts = self.cached_entry_counts();
|
||||
|
||||
RoutingTableHealth {
|
||||
reliable_entry_count,
|
||||
unreliable_entry_count,
|
||||
dead_entry_count,
|
||||
live_entry_counts,
|
||||
public_internet_ready,
|
||||
local_network_ready,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue