erldns_zones (erldns v9.0.0)
View SourceThe system responsible for loading and caching zone data.
Zones are loaded by default from JSON files in the priv/zones/ directory.
The path is configured in erldns.config using the zones.path setting.
For more details about zone file format and configuration, see ZONES.
For more details about its subsections, see:
Configuration
{erldns, [
{zones, #{
path => "zones.json",
strict => true,
codecs => [sample_custom_zone_codec],
context_options => #{match_empty => true, allow => [<<"anycast">>, <<"AMS">>, <<"TKO">>],
rfc_compliant_ent => true}
}},
]}See the type config/0 for details.
Summary
Types
-type config() :: #{path => undefined | file:name(), strict => boolean(), codecs => [module()], context_options => #{match_empty => boolean(), allow => [binary()]}, rfc_compliant_ent => boolean()}.
Zone configuration.
Path can be a directory, and strict declares whether load failure should crash or be ignored.
If a path is configured and strict is true, and the path is not resolvable, it will fail.
See erldns_zone_loader for more details.
Codecs are a list of modules that implement the erldns_zone_codec behaviour.
Context options allow you to filter loading certain records in a zone depending on configuration
details. See ZONES for more details.
rfc_compliant_ent updates the handling of empty non-terminals ENTs to be complaint with RFC 4592.
When set to true, ENTs will be used as the source of wildcard synthesis if applicable. Defaults to
false in order to keep the old behaviour.
-type version() :: binary().
Functions
-spec rfc_compliant_ent_enabled() -> boolean().