Commit 46cf840e by Spencer Gibb

added ipAddress to ServiceInstance

parent 3f96f3ae
...@@ -8,5 +8,6 @@ package org.springframework.cloud.client; ...@@ -8,5 +8,6 @@ package org.springframework.cloud.client;
public interface ServiceInstance { public interface ServiceInstance {
public String getServiceId(); public String getServiceId();
public String getHost(); public String getHost();
public String getIpAddress();
public int getPort(); public int getPort();
} }
...@@ -27,6 +27,11 @@ public class EurekaDiscoverClient implements DiscoveryClient { ...@@ -27,6 +27,11 @@ public class EurekaDiscoverClient implements DiscoveryClient {
} }
@Override @Override
public String getIpAddress() {
return config.getIpAddress();
}
@Override
public int getPort() { public int getPort() {
return config.getNonSecurePort(); return config.getNonSecurePort();
} }
......
...@@ -45,6 +45,11 @@ public class RibbonLoadBalancerClient implements LoadBalancerClient { ...@@ -45,6 +45,11 @@ public class RibbonLoadBalancerClient implements LoadBalancerClient {
} }
@Override @Override
public String getIpAddress() {
return null; //TODO: ribbon doesn't supply ip
}
@Override
public int getPort() { public int getPort() {
return server.getPort(); return server.getPort();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment