@Override
	public void setStatus(Registration registration, String status) {

		if (!STATUS_UP.equalsIgnoreCase(status)
				&& !STATUS_DOWN.equalsIgnoreCase(status)) {
			log.warn("can't support status {},please choose UP or DOWN", status);
			return;
		}

		String serviceId = registration.getServiceId();

		Instance instance = getNacosInstanceFromRegistration(registration);

		if (STATUS_DOWN.equalsIgnoreCase(status)) {
			instance.setEnabled(false);
		}
		else {
			instance.setEnabled(true);
		}

		try {
			Properties nacosProperties = nacosDiscoveryProperties.getNacosProperties();
			nacosServiceManager.getNamingMaintainService(nacosProperties).updateInstance(
					serviceId, nacosDiscoveryProperties.getGroup(), instance);
		}
		catch (Exception e) {
			throw new RuntimeException("update nacos instance status fail", e);
		}

	}
@author xiaojing
@author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
@author <a href="mailto:78552423@qq.com">eshun</a>
@author JAY
spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/main/java/com/alibaba/cloud/nacos/registry/NacosServiceRegistry.java