Package io.micronaut.discovery.consul
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanThe default enable value.static final booleanThe default http value.static final intThe default interval seconds. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiongetId()io.micronaut.http.HttpMethodgetNotes()booleanbooleanisHttp()voidsetDeregisterCriticalServiceAfter(Duration deregisterCriticalServiceAfter) voidsetEnabled(boolean enabled) Default value (true).voidsetHeaders(Map<CharSequence, List<String>> headers) voidsetHttp(boolean http) Default value (false).voidvoidsetInterval(Duration interval) Default value (15).voidsetMethod(io.micronaut.http.HttpMethod method) voidvoidsetTlsSkipVerify(Boolean tlsSkipVerify) toString() 
- 
Field Details
- 
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
 
 - 
DEFAULT_HTTP
public static final boolean DEFAULT_HTTPThe default http value.- See Also:
 
 - 
DEFAULT_INTERVAL_SECONDS
public static final int DEFAULT_INTERVAL_SECONDSThe default interval seconds.- See Also:
 
 
 - 
 - 
Constructor Details
- 
CheckConfiguration
public CheckConfiguration() 
 - 
 - 
Method Details
- 
getInterval
- Returns:
 - The interval for the checks
 
 - 
setInterval
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:
 isEnabledin interfaceio.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
- Returns:
 - Specifies that checks associated with a service should deregister after this time
 
 - 
setDeregisterCriticalServiceAfter
- Parameters:
 deregisterCriticalServiceAfter- Specifies that checks associated with a service should deregister after this time
 - 
getId
- Returns:
 - Specifies a unique ID for this check on the node
 
 - 
setId
- Parameters:
 id- The unique ID for this check on the node
 - 
getNotes
- Returns:
 - Arbitrary information for humans. Not used by Consult
 
 - 
setNotes
- Parameters:
 notes- Arbitrary information for humans
 - 
getTlsSkipVerify
- Returns:
 - Specifies if the certificate for an HTTPS check should not be verified
 
 - 
setTlsSkipVerify
- 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
- Returns:
 - Specifies a set of headers that should be set for HTTP checks
 
 - 
setHeaders
- Parameters:
 headers- Headers for the HTTP checks
 - 
toString
 
 -