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

Function onresolve

lib/internal/dns/callback_resolver.js:39–52  ·  view source on GitHub ↗
(err, result, ttls)

Source from the content-addressed store, hash-verified

37const kPerfHooksDnsLookupResolveContext = Symbol('kPerfHooksDnsLookupResolveContext');
38
39function onresolve(err, result, ttls) {
40 if (ttls && this.ttl)
41 result = ArrayPrototypeMap(
42 result, (address, index) => ({ address, ttl: ttls[index] }));
43
44 if (err)
45 this.callback(new DNSException(err, this.bindingName, this.hostname));
46 else {
47 this.callback(null, result);
48 if (this[kPerfHooksDnsLookupResolveContext] && hasObserver('dns')) {
49 stopPerf(this, kPerfHooksDnsLookupResolveContext, { detail: { result } });
50 }
51 }
52}
53
54function resolver(bindingName) {
55 function query(name, /* options, */ callback) {

Callers

nothing calls this directly

Calls 3

hasObserverFunction · 0.85
stopPerfFunction · 0.85
callbackMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…