Skip to content

Commit 4118fd5

Browse files
tflanaganrvagg
authored andcommitted
doc: sort dns alphabetically
Reorders, with no contextual changes, the dns documentation alphabetically. PR-URL: #3662 Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent 3e046ac commit 4118fd5

File tree

1 file changed

+26
-27
lines changed

1 file changed

+26
-27
lines changed

doc/api/dns.markdown

+26-27
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ There are subtle consequences in choosing one or another, please consult the
5454
[Implementation considerations section](#dns_implementation_considerations)
5555
for more information.
5656

57+
## dns.getServers()
58+
59+
Returns an array of IP addresses as strings that are currently being used for
60+
resolution
61+
5762
## dns.lookup(hostname[, options], callback)
5863

5964
Resolves a hostname (e.g. `'google.com'`) into the first found A (IPv4) or
@@ -152,6 +157,11 @@ The same as [`dns.resolve()`](#dns_dns_resolve_hostname_rrtype_callback), but on
152157

153158
The same as [`dns.resolve4()`](#dns_dns_resolve4_hostname_callback) except for IPv6 queries (an `AAAA` query).
154159

160+
## dns.resolveCname(hostname, callback)
161+
162+
The same as [`dns.resolve()`](#dns_dns_resolve_hostname_rrtype_callback), but only for canonical name records (`CNAME`
163+
records). `addresses` is an array of the canonical name records available for
164+
`hostname` (e.g., `['bar.example.com']`).
155165

156166
## dns.resolveMx(hostname, callback)
157167

@@ -160,20 +170,11 @@ The same as [`dns.resolve()`](#dns_dns_resolve_hostname_rrtype_callback), but on
160170
`addresses` is an array of MX records, each with a priority and an exchange
161171
attribute (e.g. `[{'priority': 10, 'exchange': 'mx.example.com'},...]`).
162172

163-
## dns.resolveTxt(hostname, callback)
164-
165-
The same as [`dns.resolve()`](#dns_dns_resolve_hostname_rrtype_callback), but only for text queries (`TXT` records).
166-
`addresses` is a 2-d array of the text records available for `hostname` (e.g.,
167-
`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
168-
one record. Depending on the use case, the could be either joined together or
169-
treated separately.
170-
171-
## dns.resolveSrv(hostname, callback)
173+
## dns.resolveNs(hostname, callback)
172174

173-
The same as [`dns.resolve()`](#dns_dns_resolve_hostname_rrtype_callback), but only for service records (`SRV` records).
174-
`addresses` is an array of the SRV records available for `hostname`. Properties
175-
of SRV records are priority, weight, port, and name (e.g.,
176-
`[{'priority': 10, 'weight': 5, 'port': 21223, 'name': 'service.example.com'}, ...]`).
175+
The same as [`dns.resolve()`](#dns_dns_resolve_hostname_rrtype_callback), but only for name server records (`NS` records).
176+
`addresses` is an array of the name server records available for `hostname`
177+
(e.g., `['ns1.example.com', 'ns2.example.com']`).
177178

178179
## dns.resolveSoa(hostname, callback)
179180

@@ -194,17 +195,20 @@ The same as [`dns.resolve()`](#dns_dns_resolve_hostname_rrtype_callback), but on
194195
}
195196
```
196197

197-
## dns.resolveNs(hostname, callback)
198+
## dns.resolveSrv(hostname, callback)
198199

199-
The same as [`dns.resolve()`](#dns_dns_resolve_hostname_rrtype_callback), but only for name server records (`NS` records).
200-
`addresses` is an array of the name server records available for `hostname`
201-
(e.g., `['ns1.example.com', 'ns2.example.com']`).
200+
The same as [`dns.resolve()`](#dns_dns_resolve_hostname_rrtype_callback), but only for service records (`SRV` records).
201+
`addresses` is an array of the SRV records available for `hostname`. Properties
202+
of SRV records are priority, weight, port, and name (e.g.,
203+
`[{'priority': 10, 'weight': 5, 'port': 21223, 'name': 'service.example.com'}, ...]`).
202204

203-
## dns.resolveCname(hostname, callback)
205+
## dns.resolveTxt(hostname, callback)
204206

205-
The same as [`dns.resolve()`](#dns_dns_resolve_hostname_rrtype_callback), but only for canonical name records (`CNAME`
206-
records). `addresses` is an array of the canonical name records available for
207-
`hostname` (e.g., `['bar.example.com']`).
207+
The same as [`dns.resolve()`](#dns_dns_resolve_hostname_rrtype_callback), but only for text queries (`TXT` records).
208+
`addresses` is a 2-d array of the text records available for `hostname` (e.g.,
209+
`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
210+
one record. Depending on the use case, the could be either joined together or
211+
treated separately.
208212

209213
## dns.reverse(ip, callback)
210214

@@ -215,11 +219,6 @@ The callback has arguments `(err, hostnames)`.
215219
On error, `err` is an `Error` object, where `err.code` is
216220
one of the error codes listed below.
217221

218-
## dns.getServers()
219-
220-
Returns an array of IP addresses as strings that are currently being used for
221-
resolution
222-
223222
## dns.setServers(servers)
224223

225224
Given an array of IP addresses as strings, set them as the servers to use for
@@ -314,4 +313,4 @@ They do not use the same set of configuration files than what `dns.lookup()`
314313
uses. For instance, _they do not use the configuration from `/etc/hosts`_.
315314

316315

317-
[dns.lookup]: #dns_dns_lookup_hostname_options_callback
316+
[dns.lookup]: #dns_dns_lookup_hostname_options_callback

0 commit comments

Comments
 (0)