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

Method insert

nodedb-cluster/src/ghost.rs:101–109  ·  view source on GitHub ↗

Insert a ghost stub after a node is migrated away.

(&mut self, stub: GhostStub)

Source from the content-addressed store, hash-verified

99
100 /// Insert a ghost stub after a node is migrated away.
101 pub fn insert(&mut self, stub: GhostStub) {
102 debug!(
103 node = %stub.node_id,
104 target_shard = stub.target_shard,
105 refcount = stub.refcount,
106 "inserted ghost stub"
107 );
108 self.stubs.insert(stub.node_id.clone(), stub);
109 }
110
111 /// Look up a ghost stub by node ID.
112 pub fn get(&self, node_id: &str) -> Option<&GhostStub> {

Calls 1

cloneMethod · 0.45