Bedrock.ControlPlane.Coordinator.State (bedrock v0.5.3)

View Source

Internal state structure for the Coordinator process.

Summary

Types

leader_startup_state()

@type leader_startup_state() :: :not_leader | :leader_ready | :recovery_failed

t()

@type t() :: %Bedrock.ControlPlane.Coordinator.State{
  cluster: module(),
  config: Bedrock.ControlPlane.Config.t() | nil,
  director: Bedrock.ControlPlane.Director.ref() | :unavailable,
  epoch: Bedrock.epoch(),
  last_durable_txn_id: Bedrock.Raft.transaction_id(),
  leader_node: node() | :undecided,
  leader_startup_state: leader_startup_state(),
  my_node: node(),
  node_capabilities: %{required(node()) => [Bedrock.Cluster.capability()]},
  otp_name: atom(),
  raft: Bedrock.Raft.t() | nil,
  recovery_tracker:
    Bedrock.ControlPlane.Coordinator.RecoveryCapabilityTracker.t(),
  service_directory: %{required(String.t()) => {atom(), {atom(), node()}}},
  supervisor_otp_name: atom(),
  transaction_system_layout:
    Bedrock.ControlPlane.Config.TransactionSystemLayout.t() | nil,
  tsl_subscribers: MapSet.t(pid()),
  waiting_list: %{required(Bedrock.Raft.transaction_id()) => pid()}
}