Bedrock.ControlPlane.Director.State (bedrock v0.7.0)

View Source

Internal state structure for the Director process.

Summary

Types

state()

@type state() :: :starting | :recovery | :running | :stopped

t()

@type t() :: %Bedrock.ControlPlane.Director.State{
  cluster: module(),
  config: Bedrock.ControlPlane.Config.t() | nil,
  coordinator: pid(),
  distributor: pid() | nil,
  distributor_monitor: reference() | nil,
  distributor_retry_ms: pos_integer(),
  distributor_start_fn: (keyword() -> {:ok, pid()} | {:error, term()}) | nil,
  distributor_wiring: %{logs: map(), log_refs: map()} | nil,
  epoch: Bedrock.epoch(),
  lock_token: binary(),
  node_capabilities: %{required(Bedrock.Cluster.capability()) => [node()]},
  prior_core_state: Bedrock.ControlPlane.Config.CoreState.t() | nil,
  recovery_attempt: Bedrock.ControlPlane.Config.RecoveryAttempt.t() | nil,
  services: %{
    required(Bedrock.Service.Worker.id()) => {atom(), {atom(), node()}}
  },
  state: state(),
  timers: timer_registry() | nil,
  transaction_system_layout:
    Bedrock.ControlPlane.Config.TransactionSystemLayout.t() | nil
}

timer_registry()

@type timer_registry() :: %{required(atom()) => reference()}