erldns (erldns v11.0.0)
View SourceConvenience API to start erldns directly.
Summary
Types
-type keyset() :: #keyset{key_signing_key :: dynamic(), key_signing_key_tag :: non_neg_integer(), key_signing_alg :: non_neg_integer(), zone_signing_key :: dynamic(), zone_signing_key_tag :: non_neg_integer(), zone_signing_alg :: non_neg_integer(), inception :: integer(), valid_until :: integer()}.
-type zone() :: #zone{labels :: dns:labels(), reversed_labels :: dns:labels(), name :: dns:dname(), version :: erldns_zones:version(), authority :: dns:authority(), record_count :: non_neg_integer(), records :: [dns:rr()], keysets :: [erldns:keyset()]}.
Functions
-spec start() -> term().
-spec start_listeners() -> supervisor:startchild_ret().
Start the DNS listeners if they were not started at boot.
When erldns is configured with the autostart_listeners application environment set to
false, the listeners (and the sockets they bind) are not started during boot. An embedding
application can then call this once its own resources are ready, so no query is served before
they exist.
Returns the supervisor child start result. Idempotent: returns {error, {already_started, _}}
when the listeners are already running.