Behaviour for remote Erlang RPC operations used in cluster synchronisation.
Implementations handle generation checks and full role pulls from remote
nodes. The configured adapter is resolved via ClusterHelper.Adapter.
Built-in adapters
ClusterHelper.RemoteSync.ERPC— uses:erpc.call(default)
Custom adapters
defmodule MyApp.MyRemoteSync do
@behaviour ClusterHelper.RemoteSync
@impl true
def get_remote_generation(node, scope), do: ...
@impl true
def pull_roles_from_node(scope, node, opts \ []), do: ...
@impl true
def get_remote_scopes(node), do: ...
end
Summary
Callbacks
Gets the generation counter from a remote node for a given scope.
Gets scopes from a remote node.
Performs a full role pull from a remote node.
Functions
Gets the generation counter (delegates to configured adapter).
Gets scopes from a remote node (delegates to configured adapter).
Pulls roles from a remote node (delegates to configured adapter).
Callbacks
Gets the generation counter from a remote node for a given scope.
Returns {:ok, integer} on success, {:error, reason} on failure.
Gets scopes from a remote node.
Returns {:ok, scopes} on success, {:error, reason} on failure.
Performs a full role pull from a remote node.
Returns {:ok, roles} on success, {:error, reason} on failure.
Functions
Gets the generation counter (delegates to configured adapter).
Gets scopes from a remote node (delegates to configured adapter).
Pulls roles from a remote node (delegates to configured adapter).