Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AddressResolverOptions

Configuration options for Vert.x hostname resolver. The resolver uses the local hosts file and performs DNS A and AAAA queries.

Hierarchy

  • AddressResolverOptions

Index

Constructors

constructor

Methods

addSearchDomain

  • Set the lists of DNS search domains.

    When the search domain list is null, the effective search domain list will be populated using the system DNS search domains.

    Parameters

    • searchDomains: string

    Returns AddressResolverOptions

addServer

  • Set the list of DNS server addresses, an address is the IP of the dns server, followed by an optional colon and a port, e.g 8.8.8.8 or {code 192.168.0.1:40000}. When the list is empty, the resolver will use the list of the system DNS server addresses from the environment, if that list cannot be retrieved it will use Google's public DNS servers "8.8.8.8" and "8.8.4.4".

    Parameters

    • servers: string

    Returns AddressResolverOptions

getCacheMaxTimeToLive

  • getCacheMaxTimeToLive(): number
  • Set the cache maximum TTL value in seconds. After successful resolution IP addresses are cached with their DNS response TTL, use this to set a maximum value to all responses TTL.

    Returns number

getCacheMinTimeToLive

  • getCacheMinTimeToLive(): number
  • Set the cache minimum TTL value in seconds. After resolution successful IP addresses are cached with their DNS response TTL, use this to set a minimum value to all responses TTL.

    Returns number

getCacheNegativeTimeToLive

  • getCacheNegativeTimeToLive(): number
  • Set the negative cache TTL value in seconds. After a failed hostname resolution, DNS queries won't be retried for a period of time equals to the negative TTL. This allows to reduce the response time of negative replies and reduce the amount of messages to DNS servers.

    Returns number

getHostsPath

  • getHostsPath(): string
  • Set the path of an alternate hosts configuration file to use instead of the one provided by the os.

    The default value is null, so the operating system hosts config is used.

    Returns string

getHostsValue

  • Set an alternate hosts configuration file to use instead of the one provided by the os.

    The value should contain the hosts content literaly, for instance 127.0.0.1 localhost

    The default value is null, so the operating system hosts config is used.

    Returns Buffer

getMaxQueries

  • getMaxQueries(): number
  • Set the maximum number of queries when an hostname is resolved.

    Returns number

getNdots

  • getNdots(): number
  • Set the ndots value used when resolving using search domains, the default value is -1 which determines the value from the OS on Linux or uses the value 1.

    Returns number

getQueryTimeout

  • getQueryTimeout(): number
  • Set the query timeout in milliseconds, i.e the amount of time after a query is considered to be failed.

    Returns number

getRdFlag

  • getRdFlag(): boolean
  • Set the DNS queries Recursion Desired flag value.

    Returns boolean

getSearchDomains

  • getSearchDomains(): string[]
  • Set the lists of DNS search domains.

    When the search domain list is null, the effective search domain list will be populated using the system DNS search domains.

    Returns string[]

getServers

  • getServers(): string[]
  • Set the list of DNS server addresses, an address is the IP of the dns server, followed by an optional colon and a port, e.g 8.8.8.8 or {code 192.168.0.1:40000}. When the list is empty, the resolver will use the list of the system DNS server addresses from the environment, if that list cannot be retrieved it will use Google's public DNS servers "8.8.8.8" and "8.8.4.4".

    Returns string[]

isOptResourceEnabled

  • isOptResourceEnabled(): boolean
  • Set to true to enable the automatic inclusion in DNS queries of an optional record that hints the remote DNS server about how much data the resolver can read per response.

    Returns boolean

isRotateServers

  • isRotateServers(): boolean
  • Set to true to enable round-robin selection of the dns server to use. It spreads the query load among the servers and avoids all lookup to hit the first server of the list.

    Returns boolean

isRoundRobinInetAddress

  • isRoundRobinInetAddress(): boolean
  • Set to true to enable round-robin inet address selection of the ip address to use.

    Returns boolean

setCacheMaxTimeToLive

  • Set the cache maximum TTL value in seconds. After successful resolution IP addresses are cached with their DNS response TTL, use this to set a maximum value to all responses TTL.

    Parameters

    • cacheMaxTimeToLive: number

    Returns AddressResolverOptions

setCacheMinTimeToLive

  • Set the cache minimum TTL value in seconds. After resolution successful IP addresses are cached with their DNS response TTL, use this to set a minimum value to all responses TTL.

    Parameters

    • cacheMinTimeToLive: number

    Returns AddressResolverOptions

setCacheNegativeTimeToLive

  • Set the negative cache TTL value in seconds. After a failed hostname resolution, DNS queries won't be retried for a period of time equals to the negative TTL. This allows to reduce the response time of negative replies and reduce the amount of messages to DNS servers.

    Parameters

    • cacheNegativeTimeToLive: number

    Returns AddressResolverOptions

setHostsPath

  • Set the path of an alternate hosts configuration file to use instead of the one provided by the os.

    The default value is null, so the operating system hosts config is used.

    Parameters

    • hostsPath: string

    Returns AddressResolverOptions

setHostsValue

  • Set an alternate hosts configuration file to use instead of the one provided by the os.

    The value should contain the hosts content literaly, for instance 127.0.0.1 localhost

    The default value is null, so the operating system hosts config is used.

    Parameters

    Returns AddressResolverOptions

setMaxQueries

  • Set the maximum number of queries when an hostname is resolved.

    Parameters

    • maxQueries: number

    Returns AddressResolverOptions

setNdots

  • Set the ndots value used when resolving using search domains, the default value is -1 which determines the value from the OS on Linux or uses the value 1.

    Parameters

    • ndots: number

    Returns AddressResolverOptions

setOptResourceEnabled

  • Set to true to enable the automatic inclusion in DNS queries of an optional record that hints the remote DNS server about how much data the resolver can read per response.

    Parameters

    • optResourceEnabled: boolean

    Returns AddressResolverOptions

setQueryTimeout

  • Set the query timeout in milliseconds, i.e the amount of time after a query is considered to be failed.

    Parameters

    • queryTimeout: number

    Returns AddressResolverOptions

setRdFlag

  • Set the DNS queries Recursion Desired flag value.

    Parameters

    • rdFlag: boolean

    Returns AddressResolverOptions

setRotateServers

  • Set to true to enable round-robin selection of the dns server to use. It spreads the query load among the servers and avoids all lookup to hit the first server of the list.

    Parameters

    • rotateServers: boolean

    Returns AddressResolverOptions

setRoundRobinInetAddress

  • Set to true to enable round-robin inet address selection of the ip address to use.

    Parameters

    • roundRobinInetAddress: boolean

    Returns AddressResolverOptions

setSearchDomains

  • Set the lists of DNS search domains.

    When the search domain list is null, the effective search domain list will be populated using the system DNS search domains.

    Parameters

    • searchDomains: string[]

    Returns AddressResolverOptions

setServers

  • Set the list of DNS server addresses, an address is the IP of the dns server, followed by an optional colon and a port, e.g 8.8.8.8 or {code 192.168.0.1:40000}. When the list is empty, the resolver will use the list of the system DNS server addresses from the environment, if that list cannot be retrieved it will use Google's public DNS servers "8.8.8.8" and "8.8.4.4".

    Parameters

    • servers: string[]

    Returns AddressResolverOptions

toJson

  • toJson(): {}
  • Returns {}

    • [key: string]: any

Generated using TypeDoc