Latch.DNS (latch v0.5.0)

Copy Markdown

DNS transport boundary for atproto handle resolution.

Wraps Erlang's :inet_res so this looks more Elixiry. Stubbed via Mimic in tests, this module has no unit tests of its own.

Summary

Functions

Looks up TXT records for name, returning each record as a single string.

Functions

lookup_txt(name)

@spec lookup_txt(String.t()) :: [String.t()]

Looks up TXT records for name, returning each record as a single string.

A TXT record can arrive as multiple character-strings, they are concatenated per record. Returns an empty list when there are no records or the lookups fails, which callers treat as "no DNS answer".