merryzsp commented on a change in pull request #1401: [SCB-1610] add
updateInstanceStatus to ServiceRegistryClient.java
URL:
https://github.com/apache/servicecomb-java-chassis/pull/1401#discussion_r349442887
##########
File path:
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/ServiceRegistryClientImpl.java
##########
@@ -901,4 +902,37 @@ public ServiceCenterInfo getServiceCenterInfo() {
}
return null;
}
+
+ @Override
+ public boolean undateMicroserviceInstanceStatus(String microserviceId,
String microserviceInstanceId, String status) {
+ Holder<HttpClientResponse> holder = new Holder<>();
+ IpPort ipPort = ipPortManager.getAvailableAddress();
+ try {
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("update status of microservice instance: {}", status);
+ }
+ String url =
String.format(Const.REGISTRY_API.MICROSERVICE_INSTANCE_STATUS, microserviceId,
microserviceInstanceId);
+ if (StringUtils.isEmpty(status)) {
+ LOGGER.debug("empty status");
+ return false;
+ }
+ Map<String, String[]> queryParams = new HashMap<>();
+ queryParams.put("value",new String[]{status});
Review comment:
fixed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services