View Source AntikytheraEal.ClusterConfiguration.Behaviour behaviour (antikythera v0.5.1)
Interface for cluster membership.
See AntikytheraEal
for common information about pluggable interfaces defined in antikythera.
Summary
Callbacks
Returns the number of seconds for which the initial health check to this host is delayed to provide ample warm-up time for the host.
Lists running ErlangVM nodes for the current deployment.
Returns identifier of the data center zone in which current node is running.
Callbacks
@callback health_check_grace_period_in_seconds() :: non_neg_integer()
Returns the number of seconds for which the initial health check to this host is delayed to provide ample warm-up time for the host.
This callback is called only at startup and the return value is used to calculate the trial count for establishing connections to other nodes.
@callback running_hosts() :: Croma.Result.t(%{required(String.t()) => boolean()})
Lists running ErlangVM nodes for the current deployment.
On success this callback must return a map where
each key is hostname (String.t
) of a running node and
each value is a boolean value representing whether the node is "active" or not.
"Inactive" node is treated as during decommission process.
This callback is at the startup of each node in order to join the existing cluster. After successful startup, this callback is called periodically so that
- all running nodes in the cluster maintain connections to each other, and
- each node can notice and cleanup when it is about to be terminated.
@callback zone_of_this_host() :: String.t()
Returns identifier of the data center zone in which current node is running.
This callback is called only at startup and the return value is passed to RaftFleet.activate/1
.