feat(heartbeat): add heartbeat endpoint and logic for service health check

This commit is contained in:
Chang lue Tsen
2025-11-09 10:49:51 -05:00
parent 750a33cca2
commit 1172ecc2f1
5 changed files with 69 additions and 0 deletions
+9
View File
@@ -87,6 +87,11 @@ type (
Total int64 `json:"total"`
List []SubscribeClient `json:"list"`
}
HeartbeatResponse {
Status bool `json:"status"`
Message string `json:"message,omitempty"`
Timestamp int64 `json:"timestamp,omitempty"`
}
)
@server (
@@ -130,5 +135,9 @@ service ppanel {
@doc "Get Client"
@handler GetClient
get /client returns (GetSubscribeClientResponse)
@doc "Heartbeat"
@handler Heartbeat
get /heartbeat returns (HeartbeatResponse)
}