DNS.query

You're seeing just the function query, go back to DNS module for more information.
Link to this function

query(domain, type \\ :a, dns_server \\ {"8.8.8.8", 53}, proto \\ :udp)

View Source

Specs

query(String.t(), atom(), {String.t(), :inet.port()}, :tcp | :udp) ::
  DNS.Record.t()

Queries the DNS server and returns the result.

Examples

Queries for A records:

iex> DNS.query("tungdao.com")

Queries for the MX records:

iex> DNS.query("tungdao.com", :mx)

Queries for A records, using OpenDNS:

iex> DNS.query("tungdao.com", :a, { "208.67.220.220", 53})

Queries for A records, using OpenDNS, with TCP:

iex> DNS.query("tungdao.com", :a, { "208.67.220.220", 53}, :tcp)