Monitoring¶
erpc.monitoring ¶
Health monitoring for eRPC upstream endpoints.
HealthStatus
dataclass
¶
Structured result from an eRPC health check.
Attributes:
| Name | Type | Description |
|---|---|---|
status |
str
|
Health status string (e.g. |
uptime |
float
|
Process uptime in seconds. |
version |
str
|
eRPC version string. |
Source code in erpc/client.py
from_dict
classmethod
¶
Create a HealthStatus from a JSON-decoded dictionary.
Missing fields are filled with sensible defaults so partial responses don't crash the client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict[str, Any]
|
Decoded JSON body from the health endpoint. |
required |
Returns:
| Type | Description |
|---|---|
HealthStatus
|
Populated |
Source code in erpc/client.py
HealthEvent ¶
HealthMonitor
dataclass
¶
Monitors health of eRPC upstream endpoints.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
Base URL of the eRPC instance to monitor. |
interval |
float
|
Polling interval in seconds. |
history |
list[HealthStatus]
|
Recent health check results. |
Source code in erpc/monitoring.py
latest_event ¶
Return the latest health event based on history, or None.