MCPcopy Index your code
hub / github.com/nodejs/node / subscribe

Method subscribe

lib/diagnostics_channel.js:461–482  ·  view source on GitHub ↗
(handlers)

Source from the content-addressed store, hash-verified

459 }
460
461 subscribe(handlers) {
462 // Subscribe to call window (start/end)
463 if (handlers.start || handlers.end) {
464 this.#callWindow.subscribe({
465 start: handlers.start,
466 end: handlers.end,
467 });
468 }
469
470 // Subscribe to continuation window (asyncStart/asyncEnd)
471 if (handlers.asyncStart || handlers.asyncEnd) {
472 this.#continuationWindow.subscribe({
473 start: handlers.asyncStart,
474 end: handlers.asyncEnd,
475 });
476 }
477
478 // Subscribe to error channel
479 if (handlers.error) {
480 this.error.subscribe(handlers.error);
481 }
482 }
483
484 unsubscribe(handlers) {
485 let done = true;

Callers

nothing calls this directly

Calls 1

subscribeMethod · 0.45

Tested by

no test coverage detected