Bedrock.Durability.Profile (bedrock v0.5.2)

View Source

Durability profile evaluation model.

The profile currently verifies:

  • desired replication factor
  • desired logs
  • persistent coordinator path
  • persistent log path
  • persistent materializer path

Summary

Functions

Evaluates durability requirements against a cluster module or config.

Types

check_name()

@type check_name() ::
  :desired_replication_factor
  | :desired_logs
  | :coordinator_persistence
  | :coordinator_path
  | :log_path
  | :materializer_path

check_result()

@type check_result() :: %{
  status: status(),
  expected: term(),
  actual: term(),
  reason: reason() | nil
}

reason()

@type reason() ::
  :desired_replication_factor_too_low
  | :desired_logs_too_low
  | :coordinator_persistence_disabled
  | :missing_coordinator_path
  | :missing_log_path
  | :missing_materializer_path

status()

@type status() :: :ok | :failed

t()

@type t() :: %Bedrock.Durability.Profile{
  checks: %{required(check_name()) => check_result()},
  evaluated_at_ms: non_neg_integer(),
  reasons: [reason()],
  status: status()
}

Functions

evaluate(target)

@spec evaluate(
  module()
  | keyword()
  | %{optional(:node_config) => keyword(), optional(:cluster_config) => map()}
) :: t()

Evaluates durability requirements against a cluster module or config.