View Source cets_join (cets v0.3.0)
Cluster join logic.
Join is called for each table by the discovery process.
Checkpoints are used for testing and do not affect the joining logic.
Summary
Types
Critical events during the joining procedure.
Checkpoint function for debugging.
Joining options.
An unique ID assigned during the table join attempt.
Key for global:trans/4
.
Pid of CETS gen_server.
Types
-type checkpoint() :: join_start | before_retry | before_get_pids | before_check_fully_connected | before_unpause | {before_send_dump, server_pid()} | {after_send_dump, server_pid(), Result :: term()}.
Critical events during the joining procedure.
-type checkpoint_handler() :: fun((checkpoint()) -> ok).
Checkpoint function for debugging.
-type join_opts() :: #{checkpoint_handler => checkpoint_handler(), join_ref => reference()}.
Joining options.
-type join_ref() :: reference().
An unique ID assigned during the table join attempt.
-type lock_key() :: term().
Key for global:trans/4
.
-type rpc_result() :: {Class :: throw | exit | error, Reason :: term()} | {ok, ok}.
Pid of CETS gen_server.
-type server_pid() :: cets:server_pid().
Functions
-spec join(lock_key(), cets_long:log_info(), server_pid(), server_pid()) -> ok | {error, term()}.
Join two clusters with default options.
Join two clusters.
Writes would wait for join completion.