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

Types

t()

All the types that implement this protocol.

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

Link to this function

handle_node_down(strategy, hub_id, node)

View Source
@spec handle_node_down(t(), ProcessHub.hub_id(), node()) :: :ok

This function is called when a new node leaves the ProcessHub cluster.

Link to this function

handle_node_up(strategy, hub_id, node)

View Source
@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.