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

Method register

nodedb/src/control/request_tracker.rs:53–57  ·  view source on GitHub ↗

Register a pending request. Returns a bounded receiver the session awaits. For non-streaming requests, exactly one response arrives. For streaming requests, multiple partial responses arrive before the final one. Channel capacity applies backpressure when the session is slow.

(&self, id: RequestId)

Source from the content-addressed store, hash-verified

51 /// For streaming requests, multiple partial responses arrive before the final one.
52 /// Channel capacity applies backpressure when the session is slow.
53 pub fn register(&self, id: RequestId) -> mpsc::Receiver<Response> {
54 let (tx, rx) = mpsc::channel(REQUEST_CHANNEL_CAPACITY);
55 self.lock_pending().insert(id, tx);
56 rx
57 }
58
59 /// Forward a response from the Data Plane to the waiting session.
60 ///

Callers 6

register_and_completeFunction · 0.45
cancel_removes_pendingFunction · 0.45
run_checkpoint_cycleFunction · 0.45
execute_plan_innerMethod · 0.45

Calls 2

lock_pendingMethod · 0.80
insertMethod · 0.45

Tested by 2

cancel_removes_pendingFunction · 0.36