MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / sync_node_last_seen

Method sync_node_last_seen

gateway/src/kv/mod.rs:624–629  ·  view source on GitHub ↗

Sync node last_seen (as observed by this node)

(&self, node_id: NodeId, timestamp: u64)

Source from the content-addressed store, hash-verified

622
623 /// Sync node last_seen (as observed by this node)
624 pub fn sync_node_last_seen(&self, node_id: NodeId, timestamp: u64) -> Result<()> {
625 self.ephemeral
626 .write()
627 .put_encoded(keys::last_seen_node(node_id, self.my_node_id), &timestamp)?;
628 Ok(())
629 }
630
631 /// Get all observations of a node's last_seen
632 pub fn get_node_last_seen_by_all(&self, node_id: NodeId) -> BTreeMap<NodeId, u64> {

Callers 1

refresh_stateMethod · 0.80

Calls 3

last_seen_nodeFunction · 0.85
put_encodedMethod · 0.80
writeMethod · 0.80

Tested by

no test coverage detected