[motify info] config health info

This commit is contained in:
water.lyl 2018-09-13 17:55:53 +08:00
parent 89c5c8fd76
commit 8c7dcd7bb3
2 changed files with 16 additions and 0 deletions

View File

@ -100,4 +100,11 @@ public interface ConfigService {
*/
public void removeListener(String dataId, String group, Listener listener);
/**
* server health info
*
* @return whether health
*/
public String getServerStatus();
}

View File

@ -264,4 +264,13 @@ public class NacosConfigService implements ConfigService {
}
@Override
public String getServerStatus() {
if (worker.isHealthServer()) {
return "UP";
} else {
return "DOWN";
}
}
}