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

Method get_buffer

nodedb/src/event/cdc/router.rs:247–251  ·  view source on GitHub ↗

Get a buffer for a stream (if it exists). Used by consumers to poll events.

(&self, tenant_id: u64, stream_name: &str)

Source from the content-addressed store, hash-verified

245
246 /// Get a buffer for a stream (if it exists). Used by consumers to poll events.
247 pub fn get_buffer(&self, tenant_id: u64, stream_name: &str) -> Option<Arc<StreamBuffer>> {
248 let key = (tenant_id, stream_name.to_string());
249 let buffers = self.buffers.read().unwrap_or_else(|p| p.into_inner());
250 buffers.get(&key).cloned()
251 }
252
253 /// Remove a buffer when a stream is dropped.
254 pub fn remove_buffer(&self, tenant_id: u64, stream_name: &str) {

Callers 14

create_streaming_mvFunction · 0.80
show_topicsFunction · 0.80
show_partitionsFunction · 0.80
commit_offsetFunction · 0.80
consume_localFunction · 0.80
spawn_compaction_taskFunction · 0.80
wildcard_catches_allFunction · 0.80

Calls 3

to_stringMethod · 0.80
readMethod · 0.45
getMethod · 0.45