A friendly DNS client for Gleam programs targeting Erlang.
gleam add nessie
import nessie
import gleam/io
pub fn main() {
let ipv4_addrs = nessie.lookup_ipv4("gleam.run", nessie.In, [])
io.debug(ipv4_addrs)
}
Further documentation can be found at https://hexdocs.pm/nessie.
The following is a list of supported DNS record types. If nessie doesn't currently support a DNS record type you want, feel free to contribute to this project!
- A
- AAAA
- TXT
- CNAME
- MX
- SOA
- NS
- PTR
- SRV
- CERT
- DCHID
- DNAME
- DNSKEY
- DS
Due to Erlang and JavaScript's fundamentally different approaches to asynchronous programming (processes & event loops, respectively), it's not currently possible in Gleam to write a DNS client supporting both targets.
For more information, see this Discord thread.
gleam test # Run the tests
gleam shell # Run an Erlang shell