RaftEx (raft_ex v0.1.0)

View Source

Primary module for interacting with RaftEx servers and clusters.

Summary

Functions

Look up the current leader for a cluster from the local Leaderboard.

Form a distributed Raft cluster across multiple nodes. Delegates to RaftEx.Cluster.form_cluster/4.

Get overview of all clusters from the Leaderboard.

Get the local server ID for a cluster.

Start distributed Erlang and connect to seed nodes.

Start node discovery for automatic topology management.

Types

cluster_name()

@type cluster_name() :: binary() | String.t() | atom()

cmd_ret()

@type cmd_ret() ::
  {:ok, reply :: term(), leader :: server_id()}
  | {:error, term()}
  | {:timeout, server_id()}

idxterm()

@type idxterm() :: {index(), non_neg_integer()}

index()

@type index() :: non_neg_integer()

membership()

@type membership() :: :voter | :promotable | :non_voter | :unknown

server_id()

@type server_id() :: {atom(), node()}

uid()

@type uid() :: binary()

Functions

add_member(server_loc, server_id, timeout \\ 5000)

aux_command(server_ref, cmd, timeout \\ 5000)

cast_aux_command(server_ref, cmd)

cluster_status(system \\ :default)

Get cluster status. Delegates to RaftEx.Cluster.status/1.

consistent_aux(server_id, aux_cmd, timeout \\ 5000)

consistent_query(server_id, query_mfa, timeout \\ 5000)

delete_cluster(server_ids, timeout \\ 5000)

find_leader(cluster_name)

Look up the current leader for a cluster from the local Leaderboard.

force_delete_server(system, server_id)

form_cluster(cluster_name, machine, nodes, opts \\ [])

Form a distributed Raft cluster across multiple nodes. Delegates to RaftEx.Cluster.form_cluster/4.

initial_members(server_id, timeout \\ 5000)

join_cluster(cluster_name, machine, nodes, seed_node, opts \\ [])

Join an existing Raft cluster. Delegates to RaftEx.Cluster.join_cluster/5.

key_metrics(server_id, timeout \\ 5000)

leader_query(server_id, query_mfa, timeout_or_opts \\ 5000)

leaderboard_overview()

Get overview of all clusters from the Leaderboard.

leave_and_delete_server(system, server_ref, server_id, timeout \\ 5000)

leave_and_terminate(system, server_ref, server_id, timeout \\ 5000)

local_query(server_id, query_fun, timeout_or_opts \\ 5000)

local_server_id(cluster_name)

Get the local server ID for a cluster.

member_overview(server_id, timeout \\ 5000)

members(server_id, timeout \\ 5000)

members_info(server_id, timeout \\ 5000)

new_uid(source)

overview(system)

ping(server_id, timeout \\ 5000)

pipeline_command(server_id, command, correlation \\ :no_correlation, priority \\ :low)

process_command(server_id, command, timeout_or_opts \\ 5000)

remove_member(server_ref, server_id, timeout \\ 5000)

restart_server(system, server_id)

start(params \\ [])

start_cluster(system, configs, timeout)

start_cluster(system, cluster_name, machine, server_ids, timeout \\ 5000)

start_distribution(opts \\ [])

Start distributed Erlang and connect to seed nodes.

start_in(data_dir)

start_node_discovery(opts)

Start node discovery for automatic topology management.

start_or_restart_cluster(system, cluster_name, machine, server_ids, timeout \\ 5000)

start_server(system, config)

start_server(system, cluster_name, conf0, machine, server_ids)

stop_server(system, server_id)

transfer_leadership(server_id, target, timeout \\ 5000)

trigger_compaction(server_ref)

trigger_election(server_id, timeout \\ 5000)