async fn mark_missing_nodes(&self, live_nodes: &[Node]) {
        let mut registry = self.nodes.lock().await;
        for (name, node) in registry.iter_mut() {
            let found = live_nodes.iter().find(|n| &n.id == name);
            // if a node from the registry is not found then mark it as missing
            if found.is_none() {
                node.set_state(NodeState::Unknown);
            }
        }
    }
/// Mark nodes as missing if they are no longer discoverable by the node
/// service
Mark nodes as missing if they are no longer discoverable by the node
service
Mark nodes as missing if they are no longer discoverable by the node service
async fn mark_missing_nodes(&self, live_nodes: &[Node]) {
        let mut registry = self.nodes.lock().await;
        for (name, node) in registry.iter_mut() {
            let found = live_nodes.iter().find(|n| &n.id == name);
            // if a node from the registry is not found then mark it as missing
            if found.is_none() {
                node.set_state(NodeState::Unknown);
            }
        }
    }
async fn mark_missing_nodes ( & self , live_nodes : & [ Node ] ) { let mut registry = self . nodes . lock ( ) . await ; for ( name , node ) in registry . iter_mut ( ) { let found = live_nodes . iter ( ) . find ( | n | & n . id == name ) ; // if a node from the registry is not found then mark it as missing if found . is_none ( ) { node . set_state ( NodeState :: Unknown ) ; } } }
Mark nodes as missing if they are no longer discoverable by the node
service
Mark nodes as missing if they are no longer discoverable by the node service
&self
live_nodes
&[Node]