Creates a supervisor.
Mode, callbacks, timer surface and backoff windows
Whether the broker is currently in a fault window (unreachable).
true while a fault is active and recovery has not been observed
Reports a fault (error/close/disconnect event). In drive mode this starts
the reconnect attempt loop; in observe mode it only marks the fault so
isHealthy is truthful while the client self-heals.
Reports recovery (reconnect/connect event). Clears the fault and any pending drive-mode attempt.
Arms the supervisor: attaches the fault (and, in observe mode, recovery)
listeners. Called from the broker's connect().
Tears down: cancels a pending attempt and removes every attached
listener. Called from the broker's disconnect().
Owns backoff, the reconnect attempt loop (drive mode), and fault/recovery tracking (both modes) for a broker's connection.
Since
0.10.0