/** * Returns the nodes providing the service. This endpoint is very similar to the {@link io.vertx.rxjava.ext.consul.ConsulClient#catalogServiceNodes} endpoint; * however, this endpoint automatically returns the status of the associated health check as well as any system level health checks. * @param service the service name * @param passing if true, filter results to only nodes with all checks in the passing state * @param resultHandler will be provided with list of services * @return reference to this, for fluency */ public io.vertx.rxjava.ext.consul.ConsulClient healthServiceNodes(String service, boolean passing, Handler<AsyncResult<ServiceEntryList>> resultHandler) { delegate.healthServiceNodes(service, passing, resultHandler); return this; }
.setCheckOptions(new CheckOptions().setTtl("5s").setStatus(CheckStatus.PASSING)), h)); ServiceEntryList list1 = getAsync(h -> ctx.readClient().healthServiceNodes("service", true, h)); assertEquals(list1.getList().size(), 2); List<String> ids = list1.getList().stream().map(entry -> entry.getService().getId()).collect(Collectors.toList());
/** * Returns the nodes providing the service. This endpoint is very similar to the {@link io.vertx.rxjava.ext.consul.ConsulClient#catalogServiceNodes} endpoint; * however, this endpoint automatically returns the status of the associated health check as well as any system level health checks. * @param service the service name * @param passing if true, filter results to only nodes with all checks in the passing state * @param resultHandler will be provided with list of services * @return reference to this, for fluency */ public io.vertx.rxjava.ext.consul.ConsulClient healthServiceNodes(String service, boolean passing, Handler<AsyncResult<ServiceEntryList>> resultHandler) { delegate.healthServiceNodes(service, passing, resultHandler); return this; }
@Override public ConsulService healthServiceNodes(String service, boolean passing, Handler<AsyncResult<ServiceEntryList>> resultHandler) { consulClient.healthServiceNodes(service, passing, resultHandler); return this; }
public static io.vertx.ext.consul.ConsulClient healthServiceNodes(io.vertx.ext.consul.ConsulClient j_receiver, java.lang.String service, boolean passing, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.healthServiceNodes(service, passing, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceEntryList>>() { public void handle(io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceEntryList> ar) { resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null)); } } : null)); return j_receiver; } public static io.vertx.ext.consul.ConsulClient healthServiceNodesWithOptions(io.vertx.ext.consul.ConsulClient j_receiver, java.lang.String service, boolean passing, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
client.healthServiceNodes(service.getName(),false, ar -> { if (ar.succeeded()) { importService(ar.result().getList(), future);
client.healthServiceNodes(service.getName(),false, ar -> { if (ar.succeeded()) { importService(ar.result().getList(), future);