Class ConsulConfiguration.ConsulDiscoveryConfiguration

java.lang.Object
io.micronaut.discovery.DiscoveryConfiguration
io.micronaut.discovery.consul.ConsulConfiguration.ConsulDiscoveryConfiguration
All Implemented Interfaces:
io.micronaut.core.util.Toggleable
Enclosing class:
ConsulConfiguration

@ConfigurationProperties("discovery") @Requires(property="consul.client") public static class ConsulConfiguration.ConsulDiscoveryConfiguration extends io.micronaut.discovery.DiscoveryConfiguration
Configuration class for Consul client discovery.
  • Constructor Details

    • ConsulDiscoveryConfiguration

      public ConsulDiscoveryConfiguration()
  • Method Details

    • isPassing

      public boolean isPassing()
      Whether services that are not passing health checks should be returned.
      Returns:
      True if only passing services should be returned (defaults to false)
    • setPassing

      public void setPassing(boolean passing)
      Parameters:
      passing - Whether services that are not passing health checks should be returned
    • getTags

      public Map<String,String> getTags()
      A map of service ID to tags to use for querying.
      Returns:
      The tags
    • setTags

      public void setTags(Map<String,String> tags)
      Parameters:
      tags - The tags to use for querying
    • getDatacenters

      public Map<String,String> getDatacenters()
      A map of service ID to data centers to query.
      Returns:
      The map to query
    • setDatacenters

      public void setDatacenters(Map<String,String> datacenters)
      Parameters:
      datacenters - The data centers to query
    • getSchemes

      public Map<String,String> getSchemes()
      A map of service ID to protocol scheme (eg. http, https etc.). Default is http.
      Returns:
      A map of schemes
    • setSchemes

      public void setSchemes(Map<String,String> schemes)
      Parameters:
      schemes - The service ID to protocol scheme
    • toString

      public String toString()
      Overrides:
      toString in class Object