Search in sources :

Example 1 with HttpClientOptions

use of io.gravitee.definition.model.HttpClientOptions in project gravitee-gateway by gravitee-io.

the class EndpointDiscoveryConsulVerticle method createEndpoint.

private Endpoint createEndpoint(Service service) {
    String address = service.getAddress();
    if (address == null || address.trim().isEmpty()) {
        address = service.getNodeAddress();
    }
    DiscoveredEndpoint endpoint = new DiscoveredEndpoint("consul:" + service.getId(), "http://" + address + ':' + service.getPort());
    endpoint.setHttpClientOptions(new HttpClientOptions());
    return endpoint;
}
Also used : DiscoveredEndpoint(io.gravitee.gateway.services.endpoint.discovery.consul.endpoint.DiscoveredEndpoint) HttpClientOptions(io.gravitee.definition.model.HttpClientOptions)

Aggregations

HttpClientOptions (io.gravitee.definition.model.HttpClientOptions)1 DiscoveredEndpoint (io.gravitee.gateway.services.endpoint.discovery.consul.endpoint.DiscoveredEndpoint)1