MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / session_info

Method session_info

nodedb/src/control/server/sync/shape/registry.rs:168–174  ·  view source on GitHub ↗

Get the session ID for a session's shape state.

(&self, session_id: &str)

Source from the content-addressed store, hash-verified

166
167 /// Get the session ID for a session's shape state.
168 pub fn session_info(&self, session_id: &str) -> Option<(u64, usize)> {
169 let sessions =
170 crate::control::lock_utils::read_or_recover(self.sessions.read(), "shape_sessions");
171 sessions
172 .get(session_id)
173 .map(|c| (c.tenant_id, c.shapes.len()))
174 }
175
176 /// Total active shape subscriptions across all sessions.
177 pub fn total_shapes(&self) -> usize {

Callers

nothing calls this directly

Calls 4

read_or_recoverFunction · 0.85
readMethod · 0.45
getMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected