Name: failover-dns
Owner: node_modules
Description: Use local cache dns query result when dns query fail.
Created: 2016-09-26 11:30:34.0
Updated: 2018-05-05 21:35:03.0
Pushed: 2016-09-27 05:36:39.0
Homepage: null
Size: 10
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Use local cache dns query result when dns query fail.
options.timeout
.m install failover-dns
t dns = require('failover-dns');
ust listen `error` event to logging by yourself
on('error', err => console.error(err));
lookup('cnpmjs.org', { family: 4, timeout: 2000 }, (err, ip, family) => {
(err) throw err;
nsole.log(ip, family);
Default is 0
:
rts.defaultTimeout = 0;
Maybe you want to set global default timeout is 2000ms
:
rts.defaultTimeout = 2000;