Class HTTPCheck
java.lang.Object
io.micronaut.discovery.consul.client.v1.NewCheck
io.micronaut.discovery.consul.client.v1.HTTPCheck
- All Implemented Interfaces:
Check
A class representing an HTTP check. See https://www.consul.io/api/agent/check.html.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.discovery.consul.client.v1.Check
Check.Status
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
io.micronaut.core.convert.value.ConvertibleMultiValues<String>
See https://www.consul.io/api/agent/service.html#header.getHTTP()
See https://www.consul.io/api/agent/service.html#http.Optional<io.micronaut.http.HttpMethod>
See https://www.consul.io/api/agent/service.html#method.int
hashCode()
interval()
boolean
method
(io.micronaut.http.HttpMethod method) void
setHeaders
(Map<CharSequence, List<String>> headers) protected void
setInterval
(String interval) Sets the interval.void
setMethod
(io.micronaut.http.HttpMethod method) void
setTLSSkipVerify
(boolean TLSSkipVerify) status
(Check.Status status) tlsSkipVerify
(boolean TLSSkipVerify) Methods inherited from class io.micronaut.discovery.consul.client.v1.NewCheck
deregisterCriticalServiceAfter, deregisterCriticalServiceAfter, deregisterCriticalServiceAfter, getDeregisterCriticalServiceAfter, getID, getName, getNotes, getStatus, setDeregisterCriticalServiceAfter, setName, setNotes, setStatus, status
-
Constructor Details
-
HTTPCheck
- Parameters:
name
- The nameurl
- The URL
-
HTTPCheck
- Parameters:
url
- The URL
-
-
Method Details
-
interval
- Returns:
- The interval as a
Duration
-
setInterval
Sets the interval.- Parameters:
interval
- The interval
-
interval
-
interval
- Parameters:
interval
- The interval as a string- Returns:
- The
HTTPCheck
instance
-
getInterval
- Returns:
- The check interval
-
getHTTP
See https://www.consul.io/api/agent/service.html#http.- Returns:
- The HTTP URL to check
-
getMethod
See https://www.consul.io/api/agent/service.html#method.- Returns:
- The HTTP method to use for the check
-
getHeaders
See https://www.consul.io/api/agent/service.html#header.- Returns:
- The HTTP headers to use for the check
-
setHeaders
- Parameters:
headers
- The headers
-
isTLSSkipVerify
public boolean isTLSSkipVerify()- Returns:
- Whether skip TLS verification
-
setTLSSkipVerify
public void setTLSSkipVerify(boolean TLSSkipVerify) - Parameters:
TLSSkipVerify
- Skip the TLS verification
-
setMethod
public void setMethod(io.micronaut.http.HttpMethod method) - Parameters:
method
- TheHttpMethod
-
headers
- Parameters:
headers
- The headers- Returns:
- The
HTTPCheck
instance
-
tlsSkipVerify
- Parameters:
TLSSkipVerify
- Skip the TLS verification- Returns:
- The
HTTPCheck
instance
-
method
- Parameters:
method
- TheHttpMethod
- Returns:
- The
HTTPCheck
instance
-
id
-
status
- Overrides:
status
in classNewCheck
- Parameters:
status
- TheCheck.Status
of the check- Returns:
- The deregisterCriticalServiceAfter as a
Duration
-
notes
-
equals
-
hashCode
public int hashCode()
-