use of com.tencent.polaris.client.pb.ServiceProto.Instance in project polaris-java by polarismesh.
the class NamingService method addInstance.
public void addInstance(ServiceKey svcKey, Node node, InstanceParameter parameter) {
ServiceProto.Instance instance = buildInstance(svcKey, node, parameter);
List<Instance> existsInstances = services.get(svcKey);
if (null == existsInstances) {
List<Instance> instances = new ArrayList<>();
instances.add(instance);
services.put(svcKey, instances);
} else {
existsInstances.add(instance);
}
}
Aggregations