Search in sources :

Example 1 with EndpointAddress

use of io.fabric8.kubernetes.api.model.EndpointAddress in project camel by apache.

the class KubernetesClientServiceDiscovery method addServers.

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()));
    }
}
Also used : DefaultServiceDefinition(org.apache.camel.impl.cloud.DefaultServiceDefinition) EndpointAddress(io.fabric8.kubernetes.api.model.EndpointAddress)

Aggregations

EndpointAddress (io.fabric8.kubernetes.api.model.EndpointAddress)1 DefaultServiceDefinition (org.apache.camel.impl.cloud.DefaultServiceDefinition)1