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 TypeMethodDescriptionbooleanio.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.inthashCode()interval()booleanmethod(io.micronaut.http.HttpMethod method) voidsetHeaders(Map<CharSequence, List<String>> headers) protected voidsetInterval(String interval) Sets the interval.voidsetMethod(io.micronaut.http.HttpMethod method) voidsetTLSSkipVerify(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
HTTPCheckinstance
-
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
HTTPCheckinstance
-
tlsSkipVerify
- Parameters:
TLSSkipVerify- Skip the TLS verification- Returns:
- The
HTTPCheckinstance
-
method
- Parameters:
method- TheHttpMethod- Returns:
- The
HTTPCheckinstance
-
id
-
status
- Overrides:
statusin classNewCheck- Parameters:
status- TheCheck.Statusof the check- Returns:
- The deregisterCriticalServiceAfter as a
Duration
-
notes
-
equals
-
hashCode
public int hashCode()
-