View Source amoc_cluster (amoc v3.0.0-rc2)
Summary
Types
------------------------------------------------------------------ API Function Definitions ------------------------------------------------------------------
Types
-type merge_type() :: connected | slave | failed_to_connect | connection_lost.
-type new_connection_handler() :: fun((node()) -> ok).
-type no_retries() :: non_neg_integer().
-type state() :: #state{}.
-type to_ack() :: {node(), no_retries()}.
Functions
-spec all_nodes() -> [node()].
-spec connect_nodes([node()]) -> ok.
-spec get_status() -> #{atom() => any()}.
-spec init([]) -> {ok, state()}.
-spec master_node() -> node() | undefined.
-spec on_new_connection(new_connection_handler()) -> {ok, [node()]} | {error, any()}.
-spec ping(node()) -> pong | pang.
-spec set_master_node(node()) -> ok | {error, any()}.
-spec slave_nodes() -> [node()].
-spec start_link() -> {ok, pid()} | ignore | {error, term()}.