View Source erldns_zone_parser (erldns v4.2.0)

Process for parsing zone data from JSON to Erlang representations.

Summary

Functions

Register a custom parser module.

Register a list of custom parser modules.

Start the parser processor.

Takes a JSON zone and turns it into the tuple {Name, Sha, Records}.

Functions

code_change(_, State, _)

handle_call(_, From, State)

handle_cast(_, State)

handle_info(_, State)

init(_)

list_parsers()

-spec list_parsers() -> [module()].

register_parser(Module)

-spec register_parser(module()) -> ok.

Register a custom parser module.

register_parsers(Modules)

-spec register_parsers([module()]) -> ok.

Register a list of custom parser modules.

start_link()

-spec start_link() -> any().

Start the parser processor.

terminate(_, State)

zone_to_erlang(Zone)

-spec zone_to_erlang(map()) -> {binary(), binary(), [dns:rr()], [erldns:keyset()]}.

Takes a JSON zone and turns it into the tuple {Name, Sha, Records}.

The default timeout for parsing is currently 30 seconds.

zone_to_erlang(Zone, Timeout)

-spec zone_to_erlang(binary(), integer()) -> {binary(), binary(), [dns:rr()], [erldns:keyset()]}.