MCPcopy
hub / github.com/mongodb/node-mongodb-native / eventHandler

Function eventHandler

src/cmap/wire_protocol/on_data.ts:110–114  ·  view source on GitHub ↗
(value: Uint8Array)

Source from the content-addressed store, hash-verified

108 return iterator;
109
110 function eventHandler(value: Uint8Array) {
111 const promise = unconsumedPromises.shift();
112 if (promise != null) promise.resolve({ value, done: false });
113 else unconsumedEvents.push(value);
114 }
115
116 function errorHandler(err: Error) {
117 const promise = unconsumedPromises.shift();

Callers

nothing calls this directly

Calls 2

shiftMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected