View Source partisan_peer_discovery_list (partisan v5.0.0-rc.8)
An implementation of the partisan_peer_discovery_agent
behaviour that uses a static list of node names for service discovery.
It is enabled by using the following options in the sys.conf file
bash
{partisan, [
{peer_discovery, [
{type, partisan_peer_discovery_list},
{config, #{
name => mynode
addresses => [
<<"192.168.40.1:9000">>,
<<"192.168.40.10:9000">>,
<<"mynode@192.168.40.100:9000">>,
]
}}
]}
]}
Summary
Types
-type name() :: atom() | binary() | string().
-type options() :: #{addresses := [name() | {name(), inet:port_number()}]}.
-type state() :: #state{}.
Functions
-spec lookup(State :: state(), timeout()) -> {ok, [partisan:node_spec()], NewState :: state()} | {error, Reason :: any(), NewState :: state()}.