View Source ProcessHub.Strategy.PartitionTolerance.Base protocol (ProcessHub v0.5.0-beta)
The partition tolerance strategy protocol defines the behavior for handling
node up and down events in the ProcessHub cluster.
Summary
Functions
Triggered when coordinator is initialized.
Determines if a quorum failure should be triggered when a node leaves the cluster.
Determines if a quorum recovery should be triggered when a node joins the cluster.
Types
@type t() :: term()
All the types that implement this protocol.
Functions
@spec init( struct(), ProcessHub.Hub.t() ) :: struct()
Triggered when coordinator is initialized.
Could be used to perform initialization.
@spec toggle_lock?(t(), ProcessHub.Hub.t(), node()) :: boolean()
Determines if a quorum failure should be triggered when a node leaves the cluster.
@spec toggle_unlock?(t(), ProcessHub.Hub.t(), node()) :: boolean()
Determines if a quorum recovery should be triggered when a node joins the cluster.