Bedrock.ControlPlane.Coordinator.RecoveryCapabilityTracker (bedrock v0.5.2)

View Source

Tracks recovery capabilities across the cluster.

Summary

Types

t()

@type t() :: %Bedrock.ControlPlane.Coordinator.RecoveryCapabilityTracker{
  hash: String.t() | nil
}

Functions

check_for_capability_changes(tracker, node_capabilities)

@spec check_for_capability_changes(t(), %{
  required(node()) => [Bedrock.Cluster.capability()]
}) ::
  {:changed | :unchanged, t()}

check_for_recovery_state_changes(tracker, node_capabilities, service_directory)

@spec check_for_recovery_state_changes(
  t(),
  %{required(node()) => [Bedrock.Cluster.capability()]},
  %{required(String.t()) => {atom(), {atom(), node()}}}
) :: {:changed | :unchanged, t()}

get_hash(tracker)

@spec get_hash(t()) :: String.t() | nil

new()

@spec new() :: t()

update_capability_hash(tracker, node_capabilities)

@spec update_capability_hash(t(), %{
  required(node()) => [Bedrock.Cluster.capability()]
}) :: t()

update_hash(tracker, hash)

@spec update_hash(t(), String.t()) :: t()

update_recovery_state_hash(tracker, node_capabilities, service_directory)

@spec update_recovery_state_hash(
  t(),
  %{required(node()) => [Bedrock.Cluster.capability()]},
  %{required(String.t()) => {atom(), {atom(), node()}}}
) :: t()