[ISSUE#7738]Client code should use enabled to pass parameters (#7756)

* use enabled

* add var
This commit is contained in:
胡俊 2022-02-16 10:25:46 +08:00 committed by GitHub
parent ede1df62e3
commit 9a26a65bc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,6 +102,8 @@ public class NamingHttpClientProxy extends AbstractNamingClientProxy {
private static final String HEALTHY_ONLY_PARAM = "healthyOnly";
private static final String REGISTER_ENABLE_PARAM = "enable";
private final String namespaceId;
private final ServerListManager serverListManager;
@ -154,7 +156,7 @@ public class NamingHttpClientProxy extends AbstractNamingClientProxy {
params.put(IP_PARAM, instance.getIp());
params.put(PORT_PARAM, String.valueOf(instance.getPort()));
params.put(WEIGHT_PARAM, String.valueOf(instance.getWeight()));
params.put("enable", String.valueOf(instance.isEnabled()));
params.put(REGISTER_ENABLE_PARAM, String.valueOf(instance.isEnabled()));
params.put(HEALTHY_PARAM, String.valueOf(instance.isHealthy()));
params.put(EPHEMERAL_PARAM, String.valueOf(instance.isEphemeral()));
params.put(META_PARAM, JacksonUtils.toJson(instance.getMetadata()));