Class HealthChecker
java.lang.Object
tech.riemann.nif.starter.monitor.health.HealthChecker
健康检查器,用于检查服务的健康状态
该类负责检查单个服务的健康状态,通过发送 HTTP 请求到服务的健康检查端点 并根据响应状态判断服务的健康状态
- Author:
- Kerbores(kerbores@riemann.tech)
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription检查服务的健康状态
-
Constructor Details
-
HealthChecker
public HealthChecker()
-
-
Method Details
-
check
检查服务的健康状态- Parameters:
service- 要检查的服务- Returns:
- 服务的健康状态
- Throws:
BizException- 当服务的 domain 或检查端点为空时抛出
-