View Source ProcessHub.Strategy.PartitionTolerance.Base protocol (ProcessHub v0.2.0-alpha)
The partition tolerance strategy protocol defines the behavior for handling
node up and down events in the ProcessHub
cluster.
Summary
Functions
This function is called when a new node leaves the ProcessHub
cluster.
This function is called when a new node joins the ProcessHub
cluster.
Triggered when coordinator is initialized.
Types
@type t() :: term()
All the types that implement this protocol.
Functions
@spec handle_node_down(t(), ProcessHub.hub_id(), node()) :: :ok
This function is called when a new node leaves the ProcessHub
cluster.
@spec handle_node_up(t(), ProcessHub.hub_id(), node()) :: :ok
This function is called when a new node joins the ProcessHub
cluster.
@spec init( struct(), ProcessHub.hub_id() ) :: any()
Triggered when coordinator is initialized.
Could be used to perform initialization.