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.
------------------------------------------------------------------ API Function Definitions ------------------------------------------------------------------
Link to this type

new_connection_handler/0

View Source
-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()}.
Link to this function

handle_call(Request, From, State)

View Source
-spec handle_call(any(), any(), state()) -> {reply, any(), state()}.
-spec handle_cast(any(), state()) -> {noreply, state()}.
Link to this function

handle_info(Info, State)

View Source
-spec handle_info(any(), state()) -> {noreply, state()}.
-spec init([]) -> {ok, state()}.
-spec master_node() -> node() | undefined.
Link to this function

on_new_connection(Action)

View Source
-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()}.