native-dns-composer
Composer over the awesome native-dns library
Last updated 6 years ago by asbjornenge .
BSD · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install native-dns-composer 
SYNC missed versions from official npm registry.

Native-DNS Componser

A tiny little composing wrapper around the awesome native-dns library for node.

require('native-dns-composer')('api.domain.com').at('8.8.8.8').query(function(resp) {
	console.log(resp.answer)
})

Layers

.at('8.8.8.8')                - sets the DNS server to query
.type('SRV')                  - sets the DNS record type to query
.timeout(1000)                - sets the timeout in ms
.on('timeout', function() {}) - register timeout event listener
.on('err', function(err)  {}) - register error event listener
.on('end', function(time) {}) - register end event listener
.query(function(resp) {})     - will trigger the query

enjoy.

Current Tags

  • 1.0.0                                ...           latest (6 years ago)

1 Versions

  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |