Class ConsulConfiguration.ConsulRegistrationConfiguration.CheckConfiguration

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

@ConfigurationProperties("check") public static class ConsulConfiguration.ConsulRegistrationConfiguration.CheckConfiguration extends Object implements io.micronaut.core.util.Toggleable
Configuration for the HTTP check. See https://www.consul.io/api/agent/check.html.
  • Field Details

    • DEFAULT_ENABLED

      public static final boolean DEFAULT_ENABLED
      The default enable value.
      See Also:
    • DEFAULT_HTTP

      public static final boolean DEFAULT_HTTP
      The default http value.
      See Also:
    • DEFAULT_INTERVAL_SECONDS

      public static final int DEFAULT_INTERVAL_SECONDS
      The default interval seconds.
      See Also:
  • Constructor Details

    • CheckConfiguration

      public CheckConfiguration()
  • Method Details

    • getInterval

      public Duration getInterval()
      Returns:
      The interval for the checks
    • setInterval

      public void setInterval(Duration interval)
      Default value (15).
      Parameters:
      interval - The interval for the checks
    • isHttp

      public boolean isHttp()
      Returns:
      Whether to perform an HTTP check
    • setHttp

      public void setHttp(boolean http)
      Default value (false).
      Parameters:
      http - Whether to perform an HTTP check
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
      Returns:
      Whether the check module is enabled
    • setEnabled

      public void setEnabled(boolean enabled)
      Default value (true).
      Parameters:
      enabled - Whether the check module is enabled
    • getDeregisterCriticalServiceAfter

      public Optional<Duration> getDeregisterCriticalServiceAfter()
      Returns:
      Specifies that checks associated with a service should deregister after this time
    • setDeregisterCriticalServiceAfter

      public void setDeregisterCriticalServiceAfter(Duration deregisterCriticalServiceAfter)
      Parameters:
      deregisterCriticalServiceAfter - Specifies that checks associated with a service should deregister after this time
    • getId

      public Optional<String> getId()
      Returns:
      Specifies a unique ID for this check on the node
    • setId

      public void setId(String id)
      Parameters:
      id - The unique ID for this check on the node
    • getNotes

      public Optional<String> getNotes()
      Returns:
      Arbitrary information for humans. Not used by Consult
    • setNotes

      public void setNotes(String notes)
      Parameters:
      notes - Arbitrary information for humans
    • getTlsSkipVerify

      public Optional<Boolean> getTlsSkipVerify()
      Returns:
      Specifies if the certificate for an HTTPS check should not be verified
    • setTlsSkipVerify

      public void setTlsSkipVerify(Boolean tlsSkipVerify)
      Parameters:
      tlsSkipVerify - Specifies if the certificate for an HTTPS check should not be verified.
    • getMethod

      public io.micronaut.http.HttpMethod getMethod()
      Returns:
      Specifies a different HTTP method to be used for an HTTP check.
    • setMethod

      public void setMethod(io.micronaut.http.HttpMethod method)
      Parameters:
      method - The HTTP method to be used for an HTTP check.
    • getHeaders

      public Map<CharSequence,List<String>> getHeaders()
      Returns:
      Specifies a set of headers that should be set for HTTP checks
    • setHeaders

      public void setHeaders(Map<CharSequence,List<String>> headers)
      Parameters:
      headers - Headers for the HTTP checks
    • toString

      public String toString()
      Overrides:
      toString in class Object