@Override public String getHost() { return endpointAddress.getIp(); }
EndpointPort port = subset.getPorts().get(FIRST); for (EndpointAddress address : subset.getAddresses()) { result.add(new Server(address.getIp(), port.getPort())); || portName.endsWith(port.getName())) { for (EndpointAddress address : subset.getAddresses()) { result.add(new Server(address.getIp(), port.getPort()));
@Override public String getHost() { return endpointAddress.getIp(); }
EndpointPort port = subset.getPorts().get(FIRST); for (EndpointAddress address : subset.getAddresses()) { result.add(new Server(address.getIp(), port.getPort())); if (Utils.isNullOrEmpty(portName) || portName.endsWith(port.getName())) { for (EndpointAddress address : subset.getAddresses()) { result.add(new Server(address.getIp(), port.getPort()));
@Override public String getHost() { return endpointAddress.getIp(); }
@Override public String getHost() { if (subset.getAddresses().isEmpty()) { throw new IllegalStateException("Endpoint subset has no addresses."); } return subset.getAddresses().get(0).getIp(); }
protected void addServers(String name, List<ServiceDefinition> servers, EndpointPort port, EndpointSubset subset) { final List<EndpointAddress> addresses = subset.getAddresses(); final int size = addresses.size(); for (int i = 0; i < size; i++) { servers.add(new DefaultServiceDefinition(name, addresses.get(i).getIp(), port.getPort())); } }
@Override public ServiceInstance getLocalServiceInstance() { String podName = System.getenv(HOSTNAME); return client.endpoints().withName(localServiceId).get().getSubsets() .stream() .filter(s -> s.getAddresses().iterator().next().getIp().equals(podName)) .map(s -> new KubernetesServiceInstance(localServiceId, s.getPorts().iterator().next().getName(), s, false)) .findFirst().get(); }
public EndpointAddressBuilder( EndpointAddress instance ){ this.fluent = this; this.withIp(instance.getIp()); this.withTargetRef(instance.getTargetRef()); }
private static List<Instance> toInstances(Endpoints e) { List<Instance> result = new ArrayList<Instance>(); for (EndpointSubset subset : e.getSubsets()) { String clusterName = e.getMetadata().getLabels().containsKey(HYSTRIX_CLUSTER) ? e.getMetadata().getLabels().get(HYSTRIX_CLUSTER) : DEFAULT; for (EndpointAddress address : subset.getAddresses()) { result.add(new Instance(address.getIp(), clusterName, true)); } } return result; } }
public EndpointAddressBuilder( EndpointAddressFluent<?> fluent , EndpointAddress instance ){ this.fluent = fluent; fluent.withIp(instance.getIp()); fluent.withTargetRef(instance.getTargetRef()); } public EndpointAddressBuilder( EndpointAddress instance ){
String ip = address.getIp(); try { InetAddress endpointAddress = InetAddress.getByName(ip);
public EndpointAddressBuilder(EndpointAddress instance,Boolean validationEnabled){ this.fluent = this; this.withHostname(instance.getHostname()); this.withIp(instance.getIp()); this.withTargetRef(instance.getTargetRef()); this.validationEnabled = validationEnabled; }
public EndpointAddressBuilder(EndpointAddressFluent<?> fluent,EndpointAddress instance,Boolean validationEnabled){ this.fluent = fluent; fluent.withHostname(instance.getHostname()); fluent.withIp(instance.getIp()); fluent.withTargetRef(instance.getTargetRef()); this.validationEnabled = validationEnabled; } public EndpointAddressBuilder(EndpointAddress instance){
public EndpointAddressFluentImpl(EndpointAddress instance){ this.withHostname(instance.getHostname()); this.withIp(instance.getIp()); this.withTargetRef(instance.getTargetRef()); }
EndpointPort port = subset.getPorts().get(FIRST); for (EndpointAddress address : subset.getAddresses()) { result.add(new Server(address.getIp(), port.getPort())); if (Utils.isNullOrEmpty(portName) || portName.endsWith(port.getName())) { for (EndpointAddress address : subset.getAddresses()) { result.add(new Server(address.getIp(), port.getPort()));
String podName = address.getTargetRef().getName(); podNames.add(podName); String privateIp = address.getIp(); privateIps.add(privateIp);
if (addresses != null) { for (EndpointAddress address : addresses) { String ip = address.getIp(); String addr = ip;