public class CheckOptions extends Object
Constructor and Description |
---|
CheckOptions()
Default constructor
|
CheckOptions(CheckOptions options)
Copy constructor
|
CheckOptions(JsonObject options)
Constructor from JSON
|
Modifier and Type | Method and Description |
---|---|
String |
getHttp()
Get HTTP address
|
String |
getId()
Get check ID
|
String |
getInterval()
Get checking interval
|
String |
getName()
Get check name
|
String |
getNotes()
Get check notes
|
String |
getScript()
Get path to checking script
|
String |
getServiceId()
Get the service ID to associate the registered check with an existing service provided by the agent.
|
CheckStatus |
getStatus()
Get the check status to specify the initial state of the health check.
|
String |
getTcp()
Get TCP address.
|
String |
getTtl()
Get Time to Live of check
|
CheckOptions |
setHttp(String http)
Set HTTP address to check.
|
CheckOptions |
setId(String id)
Set check ID
|
CheckOptions |
setInterval(String interval)
Set checking interval
|
CheckOptions |
setName(String name)
Set check name.
|
CheckOptions |
setNotes(String notes)
Set check notes
|
CheckOptions |
setScript(String script)
Set path to checking script.
|
CheckOptions |
setServiceId(String serviceId)
Set the service ID to associate the registered check with an existing service provided by the agent.
|
CheckOptions |
setStatus(CheckStatus status)
Set the check status to specify the initial state of the health check.
|
CheckOptions |
setTcp(String tcp)
Set TCP address to check.
|
CheckOptions |
setTtl(String ttl)
Set Time to Live of check.
|
JsonObject |
toJson()
Convert to JSON
|
public CheckOptions()
public CheckOptions(CheckOptions options)
options
- the one to copypublic CheckOptions(JsonObject options)
options
- the JSONpublic JsonObject toJson()
public String getServiceId()
public CheckOptions setServiceId(String serviceId)
serviceId
- the service IDpublic CheckStatus getStatus()
public CheckOptions setStatus(CheckStatus status)
status
- the check statuspublic String getScript()
public CheckOptions setScript(String script)
script
- path to scriptpublic String getHttp()
public CheckOptions setHttp(String http)
http
- HTTP addresspublic String getTtl()
public CheckOptions setTtl(String ttl)
ttl
- Time to Live of checkpublic String getTcp()
public CheckOptions setTcp(String tcp)
tcp
- TCP addresspublic String getInterval()
public CheckOptions setInterval(String interval)
interval
- checking interval in Go's time format which is sequence of decimal numbers,
each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h"public String getId()
public CheckOptions setId(String id)
id
- check IDpublic String getName()
public CheckOptions setName(String name)
name
- check namepublic String getNotes()
public CheckOptions setNotes(String notes)
notes
- check notesCopyright © 2017. All rights reserved.