Class ConsulCheck
java.lang.Object
io.micronaut.discovery.consul.client.v1.ConsulCheck
Represents a Consul check.
Check definition
- Since:
- 4.1.0
- Author:
- Sergio del Amo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetHttp()
getId()
io.micronaut.http.HttpMethod
getName()
getNotes()
getTtl()
void
setDeregisterCriticalServiceAfter
(String deregisterCriticalServiceAfter) void
setHeader
(Map<CharSequence, List<String>> header) void
void
void
setInterval
(String interval) void
setMethod
(io.micronaut.http.HttpMethod method) void
void
void
void
setTlsSkipVerify
(Boolean tlsSkipVerify) void
-
Constructor Details
-
ConsulCheck
public ConsulCheck()
-
-
Method Details
-
getName
- Returns:
- Specifies the name of the check.
-
setName
- Parameters:
name
- Specifies the name of the check.
-
getId
- Returns:
- Specifies a unique ID for this check on the node.
-
setId
- Parameters:
id
- Specifies a unique ID for this check on the node.
-
getInterval
- Returns:
- Specifies the frequency at which to run this check. This is required for HTTP, TCP, and UDP checks.
-
setInterval
- Parameters:
interval
- Specifies the frequency at which to run this check. This is required for HTTP, TCP, and UDP checks.
-
getNotes
- Returns:
- Specifies arbitrary information for humans. This is not used by Consul internally.
-
setNotes
- Parameters:
notes
- Specifies arbitrary information for humans. This is not used by Consul internally.
-
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.
-
getHttp
- Returns:
- Specifies an HTTP check to perform a GET request against the value of HTTP (expected to be a URL) every Interval.
-
setHttp
- Parameters:
http
- Specifies an HTTP check to perform a GET request against the value of HTTP (expected to be a URL) every Interval.
-
getMethod
public io.micronaut.http.HttpMethod getMethod()- Returns:
- Specifies a different HTTP method to be used for an HTTP check. When no value is specified, GET is used.
-
setMethod
public void setMethod(io.micronaut.http.HttpMethod method) - Parameters:
method
- Specifies a different HTTP method to be used for an HTTP check. When no value is specified, GET is used.
-
getHeader
- Returns:
- Specifies a set of headers that should be set for HTTP checks. Each header can have multiple values.
-
setHeader
- Parameters:
header
- Specifies a set of headers that should be set for HTTP checks. Each header can have multiple values.
-
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.
-
getTtl
- Returns:
- Specifies this is a TTL check, and the TTL endpoint must be used periodically to update the state of the check. If the check is not set to passing within the specified duration, then the check will be set to the failed state.
-
setTtl
- Parameters:
ttl
- Specifies this is a TTL check, and the TTL endpoint must be used periodically to update the state of the check. If the check is not set to passing within the specified duration, then the check will be set to the failed state.
-
getStatus
- Returns:
- Specifies the initial status of the health check.
-
setStatus
- Parameters:
status
- Specifies the initial status of the health check.
-