Class HttpHealthCheck
-
- All Implemented Interfaces:
-
io.github.caijiang.common.orchestration.HealthCheck
public final class HttpHealthCheck implements HealthCheck
通过 curl 检查
CJ
-
-
Constructor Summary
Constructors Constructor Description HttpHealthCheck(String uri, Boolean code3xxHealthy, Boolean code2xxHealthy)
-
Method Summary
Modifier and Type Method Description StringtoHealthCheckCommand(ServiceNode node)BooleancheckHealth(String stdOutput, Integer exitCode)-
-
Method Detail
-
toHealthCheckCommand
String toHealthCheckCommand(ServiceNode node)
- Returns:
健康检查指令
-
checkHealth
Boolean checkHealth(String stdOutput, Integer exitCode)
- Parameters:
stdOutput- toHealthCheckCommand 指令的结果exitCode- 指令退出代码- Returns:
是否健康
-
-
-
-