Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,17 @@ var resolver = mod_cueball.resolverForIpOrDomain({
In these examples, the `input` string is assumed to come from a user
cueball does the expected thing when given an IP address or DNS name.

### `DNSResolver.getBootstrapResolver([host])`

Returns the `DNSResolver` created for the input host when
`resolverForIpOrDomain` is used to create a bootstrap resolver, i.e. a
resolver for the DNS service itself. If no resolver has yet been created,
returns `undefined`.

Parameters

- `host` -- String, hostname of the host for which the resolver is being
requested.

## Connection interface

Expand Down
5 changes: 5 additions & 0 deletions lib/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,11 @@ CueBallDNSResolver.bootstrapResolvers = {};

CueBallDNSResolver.globalNSClients = {};

CueBallDNSResolver.getBootstrapResolver = function (host) {
mod_assert.string(host, 'hostname');
return (CueBallDNSResolver.bootstrapResolvers[host]);
};

CueBallDNSResolver.prototype.start = function () {
this.emit('startAsserted');
};
Expand Down