View Source ProcessHub.Hub (ProcessHub v0.6.0)
Summary
Types
Per-event batch state: pending nodes, debounce timer ref, and the monotonic ms at which the current window opened — used to cap the total wait so a sustained event stream cannot starve the batch.
Parsed :auto_recovery config. enabled? gates the lifecycle;
recovery_timeout_ms caps the recovery loop and the cluster-event
queue gate; marker_path is the operator override for the marker file
location (nil resolves to the default).
Resolved marker state derived from :auto_recovery. enabled? mirrors
the recovery config; path holds the resolved absolute marker path
after coordinator init (or nil while disabled).
Coordinator boot-recovery state.
Functions
Returns the default event batch state.
Types
@type batch_state() :: %{ nodes: [node()], timer_ref: reference() | nil, started_at: integer() | nil }
Per-event batch state: pending nodes, debounce timer ref, and the monotonic ms at which the current window opened — used to cap the total wait so a sustained event stream cannot starve the batch.
@type recovery_config() :: %{ enabled?: boolean(), recovery_timeout_ms: pos_integer(), marker_path: nil | String.t() }
Parsed :auto_recovery config. enabled? gates the lifecycle;
recovery_timeout_ms caps the recovery loop and the cluster-event
queue gate; marker_path is the operator override for the marker file
location (nil resolves to the default).
Resolved marker state derived from :auto_recovery. enabled? mirrors
the recovery config; path holds the resolved absolute marker path
after coordinator init (or nil while disabled).
@type recovery_state() :: :recovering | :normal
Coordinator boot-recovery state.
@type t() :: %ProcessHub.Hub{ event_batches: %{nodedown: batch_state(), cluster_join: batch_state()}, hub_id: atom(), migration_retry_timer: reference() | {:running, reference()} | nil, nodeup_reconcile_timers: %{required(node()) => reference()}, pending_operations: %{ required(reference()) => ProcessHub.Service.RequestManager.t() }, pending_work_count: non_neg_integer(), procs: %{ initializer: pid(), task_sup: {:via, Registry, {pid(), binary()}}, dist_sup: {:via, Registry, {pid(), binary()}}, worker_queue: {:via, Registry, {pid(), binary()}}, janitor: {:via, Registry, {pid(), binary()}}, event_queue: atom() }, recovery_config: recovery_config(), recovery_event_queue: [term()], recovery_marker: recovery_marker(), recovery_normal_waiters: %{required(GenServer.from()) => reference()}, recovery_state: recovery_state(), recovery_timeout_timer: reference() | nil, storage: %{ optional(:registry_backend) => {module(), term()}, misc: :ets.tid(), hook: :ets.tid() } }
Functions
Returns the default event batch state.