Path: blob/main/third_party/closure-compiler/node-externs/dns.js
6172 views
/*1* Copyright 2012 The Closure Compiler Authors.2*3* Licensed under the Apache License, Version 2.0 (the "License");4* you may not use this file except in compliance with the License.5* You may obtain a copy of the License at6*7* http://www.apache.org/licenses/LICENSE-2.08*9* Unless required by applicable law or agreed to in writing, software10* distributed under the License is distributed on an "AS IS" BASIS,11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12* See the License for the specific language governing permissions and13* limitations under the License.14*/1516/**17* @fileoverview Definitions for node's dns module.18* @see http://nodejs.org/api/dns.html19* @see https://github.com/joyent/node/blob/master/lib/dns.js20* @externs21* @author Daniel Wirtz <[email protected]>22*/2324/**25BEGIN_NODE_INCLUDE26var dns = require('dns');27END_NODE_INCLUDE28*/2930/**31* @type {Object.<string,*>}32*/33var dns = {};3435/**36* @param {string} domain37* @param {string|function(Error,string,string)} family38* @param {function(?Error,string,string)=} callback39*/40dns.lookup = function(domain, family, callback) {};4142/**43* @param {string} domain44* @param {string|function(?Error,Array)} rrtype45* @param {function(?Error,Array)=}callback46*/47dns.resolve = function(domain, rrtype, callback) {};4849/**50* @param {string} domain51* @param {function(?Error,Array)}callback52*/53dns.resolve4 = function(domain, callback) {};5455/**56* @param {string} domain57* @param {function(?Error,Array)}callback58*/59dns.resolve6 = function(domain, callback) {};6061/**62* @param {string} domain63* @param {function(?Error,Array)}callback64*/65dns.resolveMx = function(domain, callback) {};6667/**68* @param {string} domain69* @param {function(?Error,Array)}callback70*/71dns.resolveTxt = function(domain, callback) {};7273/**74* @param {string} domain75* @param {function(?Error,Array)}callback76*/77dns.resolveSrv = function(domain, callback) {};7879/**80* @param {string} domain81* @param {function(?Error,Array)}callback82*/83dns.resolveNs = function(domain, callback) {};8485/**86* @param {string} domain87* @param {function(?Error,Array)}callback88*/89dns.resolveCname = function(domain, callback) {};9091/**92* @param {string} ip93* @param {function(?Error,Array)}callback94*/95dns.reverse = function(ip, callback) {};9697/**98* @type {string}99* @const100*/101dns.NODATA = 'ENODATA';102103/**104* @type {string}105* @const106*/107dns.FORMERR = 'EFORMERR';108109/**110* @type {string}111* @const112*/113dns.SERVFAIL = 'ESERVFAIL';114115/**116* @type {string}117* @const118*/119dns.NOTFOUND = 'ENOTFOUND';120121/**122* @type {string}123* @const124*/125dns.NOTIMP = 'ENOTIMP';126127/**128* @type {string}129* @const130*/131dns.REFUSED = 'EREFUSED';132133/**134* @type {string}135* @const136*/137dns.BADQUERY = 'EBADQUERY';138139/**140* @type {string}141* @const142*/143dns.BADNAME = 'EBADNAME';144145/**146* @type {string}147* @const148*/149dns.BADFAMILY = 'EBADFAMILY';150151/**152* @type {string}153* @const154*/155dns.BADRESP = 'EBADRESP';156157/**158* @type {string}159* @const160*/161dns.CONNREFUSED = 'ECONNREFUSED';162163/**164* @type {string}165* @const166*/167dns.TIMEOUT = 'ETIMEOUT';168169/**170* @type {string}171* @const172*/173dns.EOF = 'EOF';174175/**176* @type {string}177* @const178*/179dns.FILE = 'EFILE';180181/**182* @type {string}183* @const184*/185dns.NOMEM = 'ENOMEM';186187/**188* @type {string}189* @const190*/191dns.DESTRUCTION = 'EDESTRUCTION';192193/**194* @type {string}195* @const196*/197dns.BADSTR = 'EBADSTR';198199/**200* @type {string}201* @const202*/203dns.BADFLAGS = 'EBADFLAGS';204205/**206* @type {string}207* @const208*/209dns.NONAME = 'ENONAME';210211/**212* @type {string}213* @const214*/215dns.BADHINTS = 'EBADHINTS';216217/**218* @type {string}219* @const220*/221dns.NOTINITIALIZED = 'ENOTINITIALIZED';222223/**224* @type {string}225* @const226*/227dns.LOADIPHLPAPI = 'ELOADIPHLPAPI';228229/**230* @type {string}231* @const232*/233dns.ADDRGETNETWORKPARAMS = 'EADDRGETNETWORKPARAMS';234235/**236* @type {string}237* @const238*/239dns.CANCELLED = 'ECANCELLED';240241242