Raxol.Swarm.NodeMonitor
(Raxol v2.3.0)
View Source
Health and latency tracking for cluster nodes.
Monitors nodes via :net_kernel.monitor_nodes/1, pings at a
configurable interval, and maintains RTT history per node. Notifies
subscribers on status changes (healthy -> suspect -> down).
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type status() :: :healthy | :suspect | :down
@type t() :: %Raxol.Swarm.NodeMonitor{ nodes: %{required(node()) => health_record()}, ping_interval_ms: pos_integer(), ping_ref: reference() | nil, subscribers: [pid()] }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec get_health(GenServer.server(), node()) :: {:ok, health_record()} | {:error, :unknown}
@spec list_all(GenServer.server()) :: [health_record()]
@spec list_healthy(GenServer.server()) :: [node()]
@spec list_suspect(GenServer.server()) :: [node()]
@spec start_link(keyword()) :: GenServer.on_start()
@spec subscribe(GenServer.server()) :: :ok
@spec unsubscribe(GenServer.server()) :: :ok