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

Method get_backlog

nodedb/src/control/pubsub.rs:116–126  ·  view source on GitHub ↗

Get backlog of messages since a given sequence number.

(&self, since_seq: u64)

Source from the content-addressed store, hash-verified

114
115 /// Get backlog of messages since a given sequence number.
116 fn get_backlog(&self, since_seq: u64) -> Vec<PubSubMessage> {
117 if since_seq > 0 {
118 self.messages
119 .iter()
120 .filter(|m| m.seq >= since_seq)
121 .cloned()
122 .collect()
123 } else {
124 Vec::new()
125 }
126 }
127}
128
129/// Topic registry managing all pub/sub topics.

Callers 2

subscribeMethod · 0.80
subscribe_groupMethod · 0.80

Calls 2

collectMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected