View Source partisan_peer_discovery_dns (partisan v5.0.0-rc.8)
An implementation of the partisan_peer_discovery_agent
behaviour that uses DNS for service discovery.
It is enabled by using the following options in the sys.conf file
bash
{partisan, [
{peer_discovery, [
{type, partisan_peer_discovery_dns},
{config, #{
record_type => fqdns,
name => "theDNSSearchName",
nodename => "foo"
}}
]}
]}
Summary
Types
-type options() ::
#{record_type := a | srv | fqdns,
name := binary() | string(),
nodename := binary() | string()}.
Functions
-spec init(Opts :: options()) -> {ok, State :: any()} | {error, Reason :: any()}.
-spec lookup(State :: any(), timeout()) -> {ok, [partisan:node_spec()], NewState :: any()} | {error, Reason :: any(), NewState :: any()}.