Updated
On this page
LivenessMonitor: tracks time since the last streaming SSE event and reports healthy/warning/stuck against configurable thresholds, so callers can detect a stalled API stream.
#transport.src.orxtra.transport._liveness
#transport.src.orxtra.transport._liveness
#LivenessMonitor
Monitors streaming response liveness by tracking time between events.
Call record_event() each time an SSE event arrives. Call check() to get the current status: "healthy", "warning", "stuck", or None if no event has been recorded yet.
#record_event
python
def record_event(self) -> NoneCall on each SSE event received.
#check
python
def check(self) -> str | NoneReturns 'healthy', 'warning', 'stuck', or None (no events yet).
#elapsed
python
def elapsed(self) -> float | NoneSeconds since the last event, or None if no event recorded.
#reset
python
def reset(self) -> NoneClear recorded state.