Merge branch 'develop' into develop
This commit is contained in:
commit
548354e77b
@ -50,7 +50,7 @@ public class HealthCheckProcessorDelegate implements HealthCheckProcessor {
|
|||||||
String type = task.getCluster().getHealthChecker().getType();
|
String type = task.getCluster().getHealthChecker().getType();
|
||||||
HealthCheckProcessor processor = healthCheckProcessorMap.get(type);
|
HealthCheckProcessor processor = healthCheckProcessorMap.get(type);
|
||||||
if(processor == null){
|
if(processor == null){
|
||||||
processor = healthCheckProcessorMap.get("NONE");
|
processor = healthCheckProcessorMap.get(NoneHealthCheckProcessor.TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
processor.process(task);
|
processor.process(task);
|
||||||
|
@ -47,6 +47,8 @@ import static com.alibaba.nacos.naming.misc.Loggers.SRV_LOG;
|
|||||||
@Component
|
@Component
|
||||||
public class HttpHealthCheckProcessor implements HealthCheckProcessor {
|
public class HttpHealthCheckProcessor implements HealthCheckProcessor {
|
||||||
|
|
||||||
|
public static final String TYPE = "HTTP";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SwitchDomain switchDomain;
|
private SwitchDomain switchDomain;
|
||||||
|
|
||||||
@ -79,7 +81,7 @@ public class HttpHealthCheckProcessor implements HealthCheckProcessor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return "HTTP";
|
return TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -45,6 +45,8 @@ import static com.alibaba.nacos.naming.misc.Loggers.SRV_LOG;
|
|||||||
@Component
|
@Component
|
||||||
public class MysqlHealthCheckProcessor implements HealthCheckProcessor {
|
public class MysqlHealthCheckProcessor implements HealthCheckProcessor {
|
||||||
|
|
||||||
|
public static final String TYPE = "MYSQL";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private HealthCheckCommon healthCheckCommon;
|
private HealthCheckCommon healthCheckCommon;
|
||||||
|
|
||||||
@ -83,7 +85,7 @@ public class MysqlHealthCheckProcessor implements HealthCheckProcessor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return "MYSQL";
|
return TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -26,12 +26,14 @@ import org.springframework.stereotype.Component;
|
|||||||
@Component
|
@Component
|
||||||
public class NoneHealthCheckProcessor implements HealthCheckProcessor {
|
public class NoneHealthCheckProcessor implements HealthCheckProcessor {
|
||||||
|
|
||||||
|
public static final String TYPE = "NONE";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process(HealthCheckTask task) {
|
public void process(HealthCheckTask task) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return "NONE";
|
return TYPE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,8 @@ import static com.alibaba.nacos.naming.misc.Loggers.SRV_LOG;
|
|||||||
@Component
|
@Component
|
||||||
public class TcpSuperSenseProcessor implements HealthCheckProcessor, Runnable {
|
public class TcpSuperSenseProcessor implements HealthCheckProcessor, Runnable {
|
||||||
|
|
||||||
|
public static final String TYPE = "TCP";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private HealthCheckCommon healthCheckCommon;
|
private HealthCheckCommon healthCheckCommon;
|
||||||
|
|
||||||
@ -420,6 +422,6 @@ public class TcpSuperSenseProcessor implements HealthCheckProcessor, Runnable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return "TCP";
|
return TYPE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user