Class AbstractConsulClient

java.lang.Object
io.micronaut.discovery.consul.client.v1.AbstractConsulClient
All Implemented Interfaces:
io.micronaut.core.naming.Described, ConsulClient, ConsulOperations, io.micronaut.discovery.DiscoveryClient, Closeable, AutoCloseable

@Client(id="consul", path="/v1", configuration=ConsulConfiguration.class) @Requires(beans=ConsulConfiguration.class) public abstract class AbstractConsulClient extends Object implements ConsulClient
Abstract implementation of ConsulClient that also implements DiscoveryClient.
Since:
1.0
Author:
Graeme Rocher
  • Constructor Details

    • AbstractConsulClient

      public AbstractConsulClient()
  • Method Details

    • setConsulConfiguration

      @Inject public void setConsulConfiguration(ConsulConfiguration consulConfiguration)
      Parameters:
      consulConfiguration - The Consul configuration
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface io.micronaut.core.naming.Described
    • getServiceIds

      public org.reactivestreams.Publisher<List<String>> getServiceIds()
      Specified by:
      getServiceIds in interface ConsulClient
      Specified by:
      getServiceIds in interface io.micronaut.discovery.DiscoveryClient
    • getInstances

      public org.reactivestreams.Publisher<List<io.micronaut.discovery.ServiceInstance>> getInstances(String serviceId)
      Specified by:
      getInstances in interface io.micronaut.discovery.DiscoveryClient