[motify info] config health info
This commit is contained in:
parent
89c5c8fd76
commit
8c7dcd7bb3
@ -99,5 +99,12 @@ public interface ConfigService {
|
||||
* listener
|
||||
*/
|
||||
public void removeListener(String dataId, String group, Listener listener);
|
||||
|
||||
/**
|
||||
* server health info
|
||||
*
|
||||
* @return whether health
|
||||
*/
|
||||
public String getServerStatus();
|
||||
|
||||
}
|
||||
|
@ -264,4 +264,13 @@ public class NacosConfigService implements ConfigService {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getServerStatus() {
|
||||
if (worker.isHealthServer()) {
|
||||
return "UP";
|
||||
} else {
|
||||
return "DOWN";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user