Provides an outage-safe boundary between the console LiveView and collector.
Every operation accepts the monitored collector PID explicitly and converts expected process exits and bounded call timeouts into typed errors. This keeps transient supervisor restart windows and wedged calls out of LiveView callbacks.
Summary
Functions
Acknowledges a delivered sequence to an available collector process.
Returns the latest snapshot from an available collector process.
Requests an operator refresh from an available collector process.
Returns health information from an available collector process.
Subscribes the caller to an available collector process.
Types
@type call_error() :: {:error, :timeout | :unavailable}
@type server() :: pid() | nil
Functions
@spec acknowledge(server(), non_neg_integer(), timeout()) :: :ok | call_error()
Acknowledges a delivered sequence to an available collector process.
@spec latest_snapshot(server(), timeout()) :: {:ok, BeamConsole.Snapshot.t() | nil} | call_error()
Returns the latest snapshot from an available collector process.
Requests an operator refresh from an available collector process.
@spec status(server(), timeout()) :: {:ok, BeamConsole.Collector.Status.t()} | call_error()
Returns health information from an available collector process.
@spec subscribe(server(), timeout()) :: {:ok, BeamConsole.Snapshot.t() | nil} | call_error()
Subscribes the caller to an available collector process.