public interface ConsulService extends ConsulClient
Modifier and Type | Method and Description |
---|---|
ConsulService |
agentInfo(Handler<AsyncResult<JsonObject>> resultHandler)
Returns the configuration and member information of the local agent
|
ConsulService |
catalogDatacenters(Handler<AsyncResult<List<String>>> resultHandler)
Return all the datacenters that are known by the Consul server
|
ConsulService |
catalogNodes(Handler<AsyncResult<NodeList>> resultHandler)
Returns the nodes registered in a datacenter
|
ConsulService |
catalogNodeServices(String node,
Handler<AsyncResult<ServiceList>> resultHandler)
Returns the node's registered services
|
ConsulService |
catalogNodeServicesWithOptions(String node,
BlockingQueryOptions options,
Handler<AsyncResult<ServiceList>> resultHandler)
Returns the node's registered services
This is blocking query unlike
ConsulClient.catalogNodeServices(String, Handler) |
ConsulService |
catalogNodesWithOptions(NodeQueryOptions options,
Handler<AsyncResult<NodeList>> resultHandler)
Returns the nodes registered in a datacenter
|
ConsulService |
catalogServiceNodes(String service,
Handler<AsyncResult<ServiceList>> resultHandler)
Returns the nodes providing a service
|
ConsulService |
catalogServiceNodesWithOptions(String service,
ServiceQueryOptions options,
Handler<AsyncResult<ServiceList>> resultHandler)
Returns the nodes providing a service
|
ConsulService |
catalogServices(Handler<AsyncResult<ServiceList>> resultHandler)
Returns the services registered in a datacenter
|
ConsulService |
catalogServicesWithOptions(BlockingQueryOptions options,
Handler<AsyncResult<ServiceList>> resultHandler)
Returns the services registered in a datacenter
This is blocking query unlike
ConsulClient.catalogServices(Handler) |
ConsulService |
cloneAclToken(String id,
Handler<AsyncResult<String>> idHandler)
Clone Acl token
|
void |
close()
Close the client and release its resources
|
ConsulService |
coordinateDatacenters(Handler<AsyncResult<List<DcCoordinates>>> resultHandler)
Returns the WAN network coordinates for all Consul servers, organized by DCs
|
ConsulService |
coordinateNodes(Handler<AsyncResult<CoordinateList>> resultHandler)
Returns the LAN network coordinates for all nodes in a given DC
|
ConsulService |
coordinateNodesWithOptions(BlockingQueryOptions options,
Handler<AsyncResult<CoordinateList>> resultHandler)
Returns the LAN network coordinates for all nodes in a given DC
This is blocking query unlike
ConsulClient.coordinateNodes(Handler) |
ConsulService |
createAclToken(AclToken token,
Handler<AsyncResult<String>> idHandler)
Create new Acl token
|
static ConsulService |
createEventBusProxy(Vertx vertx,
String address)
Create a proxy to a service that is deployed somewhere on the event bus
|
ConsulService |
createPreparedQuery(PreparedQueryDefinition definition,
Handler<AsyncResult<String>> resultHandler) |
ConsulService |
createSession(Handler<AsyncResult<String>> idHandler)
Initialize a new session
|
ConsulService |
createSessionWithOptions(SessionOptions options,
Handler<AsyncResult<String>> idHandler)
Initialize a new session
|
ConsulService |
deletePreparedQuery(String id,
Handler<AsyncResult<Void>> resultHandler)
Deletes an existing prepared query
|
ConsulService |
deleteValue(String key,
Handler<AsyncResult<Void>> resultHandler)
Remove the key/value pair that corresponding to the specified key
|
ConsulService |
deleteValues(String keyPrefix,
Handler<AsyncResult<Void>> resultHandler)
Removes all the key/value pair that corresponding to the specified key prefix
|
ConsulService |
deregisterCheck(String checkId,
Handler<AsyncResult<Void>> resultHandler)
Remove a check from the local agent.
|
ConsulService |
deregisterService(String id,
Handler<AsyncResult<Void>> resultHandler)
Remove a service from the local agent.
|
ConsulService |
destroyAclToken(String id,
Handler<AsyncResult<Void>> resultHandler)
Destroy Acl token
|
ConsulService |
destroySession(String id,
Handler<AsyncResult<Void>> resultHandler)
Destroys the given session
|
ConsulService |
executePreparedQuery(String query,
Handler<AsyncResult<PreparedQueryExecuteResponse>> resultHandler)
Executes an existing prepared query.
|
ConsulService |
executePreparedQueryWithOptions(String query,
PreparedQueryExecuteOptions options,
Handler<AsyncResult<PreparedQueryExecuteResponse>> resultHandler)
Executes an existing prepared query.
|
ConsulService |
failCheck(String checkId,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "critical".
|
ConsulService |
failCheckWithNote(String checkId,
String note,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "critical".
|
ConsulService |
fireEvent(String name,
Handler<AsyncResult<Event>> resultHandler)
Fires a new user event
|
ConsulService |
fireEventWithOptions(String name,
EventOptions options,
Handler<AsyncResult<Event>> resultHandler)
Fires a new user event
|
ConsulService |
getAllPreparedQueries(Handler<AsyncResult<List<PreparedQueryDefinition>>> resultHandler)
Returns a list of all prepared queries.
|
ConsulService |
getKeys(String keyPrefix,
Handler<AsyncResult<List<String>>> resultHandler)
Returns the list of keys that corresponding to the specified key prefix.
|
ConsulService |
getKeysWithOptions(String keyPrefix,
BlockingQueryOptions options,
Handler<AsyncResult<List<String>>> resultHandler)
Returns the list of keys that corresponding to the specified key prefix.
|
ConsulService |
getPreparedQuery(String id,
Handler<AsyncResult<PreparedQueryDefinition>> resultHandler)
Returns an existing prepared query
|
ConsulService |
getValue(String key,
Handler<AsyncResult<KeyValue>> resultHandler)
Returns key/value pair that corresponding to the specified key.
|
ConsulService |
getValues(String keyPrefix,
Handler<AsyncResult<KeyValueList>> resultHandler)
Returns the list of key/value pairs that corresponding to the specified key prefix.
|
ConsulService |
getValuesWithOptions(String keyPrefix,
BlockingQueryOptions options,
Handler<AsyncResult<KeyValueList>> resultHandler)
Returns the list of key/value pairs that corresponding to the specified key prefix.
|
ConsulService |
getValueWithOptions(String key,
BlockingQueryOptions options,
Handler<AsyncResult<KeyValue>> resultHandler)
Returns key/value pair that corresponding to the specified key.
|
ConsulService |
healthChecks(String service,
Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks associated with the service
|
ConsulService |
healthChecksWithOptions(String service,
CheckQueryOptions options,
Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks associated with the service
|
ConsulService |
healthServiceNodes(String service,
boolean passing,
Handler<AsyncResult<ServiceEntryList>> resultHandler)
Returns the nodes providing the service.
|
ConsulService |
healthServiceNodesWithOptions(String service,
boolean passing,
ServiceQueryOptions options,
Handler<AsyncResult<ServiceEntryList>> resultHandler)
Returns the nodes providing the service.
|
ConsulService |
healthState(HealthState healthState,
Handler<AsyncResult<CheckList>> handler)
Returns the checks in the specified status
|
ConsulService |
healthStateWithOptions(HealthState healthState,
CheckQueryOptions checkQueryOptions,
Handler<AsyncResult<CheckList>> handler)
Returns the checks in the specified status
|
ConsulService |
infoAclToken(String id,
Handler<AsyncResult<AclToken>> tokenHandler)
Get info of Acl token
|
ConsulService |
infoSession(String id,
Handler<AsyncResult<Session>> resultHandler)
Returns the requested session information
|
ConsulService |
infoSessionWithOptions(String id,
BlockingQueryOptions options,
Handler<AsyncResult<Session>> resultHandler)
Returns the requested session information
This is blocking query unlike
ConsulClient.infoSession(String, Handler) |
ConsulService |
leaderStatus(Handler<AsyncResult<String>> resultHandler)
Get the Raft leader for the datacenter in which the agent is running.
|
ConsulService |
listAclTokens(Handler<AsyncResult<List<AclToken>>> resultHandler)
Get list of Acl token
|
ConsulService |
listEvents(Handler<AsyncResult<EventList>> resultHandler)
Returns the most recent events known by the agent
|
ConsulService |
listEventsWithOptions(EventListOptions options,
Handler<AsyncResult<EventList>> resultHandler)
Returns the most recent events known by the agent.
|
ConsulService |
listNodeSessions(String nodeId,
Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions for a given node
|
ConsulService |
listNodeSessionsWithOptions(String nodeId,
BlockingQueryOptions options,
Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions for a given node
This is blocking query unlike
ConsulClient.listNodeSessions(String, Handler) |
ConsulService |
listSessions(Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions
|
ConsulService |
listSessionsWithOptions(BlockingQueryOptions options,
Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions
This is blocking query unlike
ConsulClient.listSessions(Handler) |
ConsulService |
localChecks(Handler<AsyncResult<List<Check>>> resultHandler)
Return all the checks that are registered with the local agent.
|
ConsulService |
localServices(Handler<AsyncResult<List<Service>>> resultHandler)
Returns list of services registered with the local agent.
|
ConsulService |
maintenanceService(MaintenanceOptions maintenanceOptions,
Handler<AsyncResult<Void>> resultHandler)
Places a given service into "maintenance mode"
|
ConsulService |
passCheck(String checkId,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "passing".
|
ConsulService |
passCheckWithNote(String checkId,
String note,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "passing".
|
ConsulService |
peersStatus(Handler<AsyncResult<List<String>>> resultHandler)
Retrieves the Raft peers for the datacenter in which the the agent is running.
|
ConsulService |
putValue(String key,
String value,
Handler<AsyncResult<Boolean>> resultHandler)
Adds specified key/value pair
|
ConsulService |
putValueWithOptions(String key,
String value,
KeyValueOptions options,
Handler<AsyncResult<Boolean>> resultHandler) |
ConsulService |
registerCheck(CheckOptions checkOptions,
Handler<AsyncResult<Void>> resultHandler)
Add a new check to the local agent.
|
ConsulService |
registerService(ServiceOptions serviceOptions,
Handler<AsyncResult<Void>> resultHandler)
Adds a new service, with an optional health check, to the local agent.
|
ConsulService |
renewSession(String id,
Handler<AsyncResult<Session>> resultHandler)
Renews the given session.
|
ConsulService |
transaction(TxnRequest request,
Handler<AsyncResult<TxnResponse>> resultHandler)
Manages multiple operations inside a single, atomic transaction.
|
ConsulService |
updateAclToken(AclToken token,
Handler<AsyncResult<String>> idHandler)
Update Acl token
|
ConsulService |
updateCheck(String checkId,
CheckStatus status,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to given status.
|
ConsulService |
updateCheckWithNote(String checkId,
CheckStatus status,
String note,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to given status.
|
ConsulService |
updatePreparedQuery(PreparedQueryDefinition definition,
Handler<AsyncResult<Void>> resultHandler) |
ConsulService |
warnCheck(String checkId,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "warning".
|
ConsulService |
warnCheckWithNote(String checkId,
String note,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "warning".
|
create, create
static ConsulService createEventBusProxy(Vertx vertx, String address)
vertx
- the Vert.x instanceaddress
- the address the service is listening on on the event busConsulService agentInfo(Handler<AsyncResult<JsonObject>> resultHandler)
ConsulClient
agentInfo
in interface ConsulClient
resultHandler
- will be provided with the configuration and member information of the local agentConsulService coordinateNodes(Handler<AsyncResult<CoordinateList>> resultHandler)
ConsulClient
coordinateNodes
in interface ConsulClient
resultHandler
- will be provided with network coordinates of nodes in datacenterConsulService coordinateNodesWithOptions(BlockingQueryOptions options, Handler<AsyncResult<CoordinateList>> resultHandler)
ConsulClient
ConsulClient.coordinateNodes(Handler)
coordinateNodesWithOptions
in interface ConsulClient
options
- the blocking optionsresultHandler
- will be provided with network coordinates of nodes in datacenterConsulService coordinateDatacenters(Handler<AsyncResult<List<DcCoordinates>>> resultHandler)
ConsulClient
coordinateDatacenters
in interface ConsulClient
resultHandler
- will be provided with network coordinates for all Consul serversConsulService getKeys(String keyPrefix, Handler<AsyncResult<List<String>>> resultHandler)
ConsulClient
getKeys
in interface ConsulClient
keyPrefix
- the prefixresultHandler
- will be provided with keys listConsulService getKeysWithOptions(String keyPrefix, BlockingQueryOptions options, Handler<AsyncResult<List<String>>> resultHandler)
ConsulClient
getKeysWithOptions
in interface ConsulClient
keyPrefix
- the prefixoptions
- the blocking optionsresultHandler
- will be provided with keys listConsulService getValue(String key, Handler<AsyncResult<KeyValue>> resultHandler)
ConsulClient
KeyValue
object will be returned if no such key is found.getValue
in interface ConsulClient
key
- the keyresultHandler
- will be provided with key/value pairConsulService getValueWithOptions(String key, BlockingQueryOptions options, Handler<AsyncResult<KeyValue>> resultHandler)
ConsulClient
KeyValue
object will be returned if no such key is found.
This is blocking query unlike ConsulClient.getValue(String, Handler)
getValueWithOptions
in interface ConsulClient
key
- the keyoptions
- the blocking optionsresultHandler
- will be provided with key/value pairConsulService deleteValue(String key, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
deleteValue
in interface ConsulClient
key
- the keyresultHandler
- will be called on completeConsulService getValues(String keyPrefix, Handler<AsyncResult<KeyValueList>> resultHandler)
ConsulClient
KeyValueList
object will be returned if no such key prefix is found.getValues
in interface ConsulClient
keyPrefix
- the prefixresultHandler
- will be provided with list of key/value pairsConsulService getValuesWithOptions(String keyPrefix, BlockingQueryOptions options, Handler<AsyncResult<KeyValueList>> resultHandler)
ConsulClient
KeyValueList
object will be returned if no such key prefix is found.
This is blocking query unlike ConsulClient.getValues(String, Handler)
getValuesWithOptions
in interface ConsulClient
keyPrefix
- the prefixoptions
- the blocking optionsresultHandler
- will be provided with list of key/value pairsConsulService deleteValues(String keyPrefix, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
deleteValues
in interface ConsulClient
keyPrefix
- the prefixresultHandler
- will be called on completeConsulService putValue(String key, String value, Handler<AsyncResult<Boolean>> resultHandler)
ConsulClient
putValue
in interface ConsulClient
key
- the keyvalue
- the valueresultHandler
- will be provided with success of operationConsulService putValueWithOptions(String key, String value, KeyValueOptions options, Handler<AsyncResult<Boolean>> resultHandler)
putValueWithOptions
in interface ConsulClient
key
- the keyvalue
- the valueoptions
- options used to push pairresultHandler
- will be provided with success of operationConsulService transaction(TxnRequest request, Handler<AsyncResult<TxnResponse>> resultHandler)
ConsulClient
transaction
in interface ConsulClient
request
- transaction requestresultHandler
- will be provided with result of transactionConsulService createAclToken(AclToken token, Handler<AsyncResult<String>> idHandler)
ConsulClient
createAclToken
in interface ConsulClient
token
- properties of the tokenidHandler
- will be provided with ID of created tokenConsulService updateAclToken(AclToken token, Handler<AsyncResult<String>> idHandler)
ConsulClient
updateAclToken
in interface ConsulClient
token
- properties of the token to be updatedidHandler
- will be provided with ID of updatedConsulService cloneAclToken(String id, Handler<AsyncResult<String>> idHandler)
ConsulClient
cloneAclToken
in interface ConsulClient
id
- the ID of token to be clonedidHandler
- will be provided with ID of cloned tokenConsulService listAclTokens(Handler<AsyncResult<List<AclToken>>> resultHandler)
ConsulClient
listAclTokens
in interface ConsulClient
resultHandler
- will be provided with list of tokensConsulService infoAclToken(String id, Handler<AsyncResult<AclToken>> tokenHandler)
ConsulClient
infoAclToken
in interface ConsulClient
id
- the ID of tokentokenHandler
- will be provided with tokenConsulService destroyAclToken(String id, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
destroyAclToken
in interface ConsulClient
id
- the ID of tokenresultHandler
- will be called on completeConsulService fireEvent(String name, Handler<AsyncResult<Event>> resultHandler)
ConsulClient
fireEvent
in interface ConsulClient
name
- name of eventresultHandler
- will be provided with properties of eventConsulService fireEventWithOptions(String name, EventOptions options, Handler<AsyncResult<Event>> resultHandler)
ConsulClient
fireEventWithOptions
in interface ConsulClient
name
- name of eventoptions
- options used to create eventresultHandler
- will be provided with properties of eventConsulService listEvents(Handler<AsyncResult<EventList>> resultHandler)
ConsulClient
listEvents
in interface ConsulClient
resultHandler
- will be provided with list of eventsConsulService listEventsWithOptions(EventListOptions options, Handler<AsyncResult<EventList>> resultHandler)
ConsulClient
ConsulClient.listEvents(Handler)
. However, the semantics of this endpoint
are slightly different. Most blocking queries provide a monotonic index and block until a newer index is available.
This can be supported as a consequence of the total ordering of the consensus protocol. With gossip,
there is no ordering, and instead X-Consul-Index
maps to the newest event that matches the query.
In practice, this means the index is only useful when used against a single agent and has no meaning globally. Because Consul defines the index as being opaque, clients should not be expecting a natural ordering either.
listEventsWithOptions
in interface ConsulClient
options
- the blocking optionsresultHandler
- will be provided with list of eventsConsulService registerService(ServiceOptions serviceOptions, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
registerService
in interface ConsulClient
serviceOptions
- the options of new serviceresultHandler
- will be called when completeServiceOptions
ConsulService maintenanceService(MaintenanceOptions maintenanceOptions, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
maintenanceService
in interface ConsulClient
maintenanceOptions
- the maintenance optionsresultHandler
- will be called when completeMaintenanceOptions
ConsulService deregisterService(String id, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
deregisterService
in interface ConsulClient
id
- the ID of serviceresultHandler
- will be called when completeConsulService healthChecks(String service, Handler<AsyncResult<CheckList>> resultHandler)
ConsulClient
healthChecks
in interface ConsulClient
service
- the service nameresultHandler
- will be provided with list of checksConsulService healthChecksWithOptions(String service, CheckQueryOptions options, Handler<AsyncResult<CheckList>> resultHandler)
ConsulClient
healthChecksWithOptions
in interface ConsulClient
service
- the service nameoptions
- options used to request checksresultHandler
- will be provided with list of checksConsulService healthState(HealthState healthState, Handler<AsyncResult<CheckList>> handler)
ConsulClient
healthState
in interface ConsulClient
healthState
- the health statehandler
- will be provided with list of checksConsulService healthStateWithOptions(HealthState healthState, CheckQueryOptions checkQueryOptions, Handler<AsyncResult<CheckList>> handler)
ConsulClient
healthStateWithOptions
in interface ConsulClient
healthState
- the health statecheckQueryOptions
- options used to request checkshandler
- will be provided with list of checksConsulService healthServiceNodes(String service, boolean passing, Handler<AsyncResult<ServiceEntryList>> resultHandler)
ConsulClient
ConsulClient.catalogServiceNodes(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
endpoint;
however, this endpoint automatically returns the status of the associated health check as well as any system level health checks.healthServiceNodes
in interface ConsulClient
service
- the service namepassing
- if true, filter results to only nodes with all checks in the passing stateresultHandler
- will be provided with list of servicesConsulService healthServiceNodesWithOptions(String service, boolean passing, ServiceQueryOptions options, Handler<AsyncResult<ServiceEntryList>> resultHandler)
ConsulClient
ConsulClient.catalogServiceNodesWithOptions(java.lang.String, io.vertx.ext.consul.ServiceQueryOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
endpoint;
however, this endpoint automatically returns the status of the associated health check as well as any system level health checks.healthServiceNodesWithOptions
in interface ConsulClient
service
- the service namepassing
- if true, filter results to only nodes with all checks in the passing stateoptions
- options used to request servicesresultHandler
- will be provided with list of servicesConsulService catalogServiceNodes(String service, Handler<AsyncResult<ServiceList>> resultHandler)
ConsulClient
catalogServiceNodes
in interface ConsulClient
service
- name of serviceresultHandler
- will be provided with list of nodes providing given serviceConsulService catalogServiceNodesWithOptions(String service, ServiceQueryOptions options, Handler<AsyncResult<ServiceList>> resultHandler)
ConsulClient
catalogServiceNodesWithOptions
in interface ConsulClient
service
- name of serviceoptions
- options used to request servicesresultHandler
- will be provided with list of nodes providing given serviceConsulService catalogDatacenters(Handler<AsyncResult<List<String>>> resultHandler)
ConsulClient
catalogDatacenters
in interface ConsulClient
resultHandler
- will be provided with list of datacentersConsulService catalogNodes(Handler<AsyncResult<NodeList>> resultHandler)
ConsulClient
catalogNodes
in interface ConsulClient
resultHandler
- will be provided with list of nodesConsulService catalogNodesWithOptions(NodeQueryOptions options, Handler<AsyncResult<NodeList>> resultHandler)
ConsulClient
catalogNodesWithOptions
in interface ConsulClient
options
- options used to request nodesresultHandler
- will be provided with list of nodesConsulService catalogServices(Handler<AsyncResult<ServiceList>> resultHandler)
ConsulClient
catalogServices
in interface ConsulClient
resultHandler
- will be provided with list of servicesConsulService catalogServicesWithOptions(BlockingQueryOptions options, Handler<AsyncResult<ServiceList>> resultHandler)
ConsulClient
ConsulClient.catalogServices(Handler)
catalogServicesWithOptions
in interface ConsulClient
options
- the blocking optionsresultHandler
- will be provided with list of servicesConsulService localServices(Handler<AsyncResult<List<Service>>> resultHandler)
ConsulClient
localServices
in interface ConsulClient
resultHandler
- will be provided with list of servicesConsulService catalogNodeServices(String node, Handler<AsyncResult<ServiceList>> resultHandler)
ConsulClient
catalogNodeServices
in interface ConsulClient
node
- node nameresultHandler
- will be provided with list of servicesConsulService catalogNodeServicesWithOptions(String node, BlockingQueryOptions options, Handler<AsyncResult<ServiceList>> resultHandler)
ConsulClient
ConsulClient.catalogNodeServices(String, Handler)
catalogNodeServicesWithOptions
in interface ConsulClient
node
- node nameoptions
- the blocking optionsresultHandler
- will be provided with list of servicesConsulService localChecks(Handler<AsyncResult<List<Check>>> resultHandler)
ConsulClient
localChecks
in interface ConsulClient
resultHandler
- will be provided with list of checksConsulService registerCheck(CheckOptions checkOptions, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
registerCheck
in interface ConsulClient
checkOptions
- options used to register new checkresultHandler
- will be called when completeConsulService deregisterCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
deregisterCheck
in interface ConsulClient
checkId
- the ID of checkresultHandler
- will be called when completeConsulService passCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
passCheck
in interface ConsulClient
checkId
- the ID of checkresultHandler
- will be called when completeCheckStatus
ConsulService passCheckWithNote(String checkId, String note, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
passCheckWithNote
in interface ConsulClient
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.resultHandler
- will be called when completeCheckStatus
ConsulService warnCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
warnCheck
in interface ConsulClient
checkId
- the ID of checkresultHandler
- will be called when completeCheckStatus
ConsulService warnCheckWithNote(String checkId, String note, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
warnCheckWithNote
in interface ConsulClient
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.resultHandler
- will be called when completeCheckStatus
ConsulService failCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
failCheck
in interface ConsulClient
checkId
- the ID of checkresultHandler
- will be called when completeCheckStatus
ConsulService failCheckWithNote(String checkId, String note, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
failCheckWithNote
in interface ConsulClient
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.resultHandler
- will be called when completeCheckStatus
ConsulService updateCheck(String checkId, CheckStatus status, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
updateCheck
in interface ConsulClient
checkId
- the ID of checkstatus
- new status of checkresultHandler
- will be called when completeConsulService updateCheckWithNote(String checkId, CheckStatus status, String note, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
updateCheckWithNote
in interface ConsulClient
checkId
- the ID of checkstatus
- new status of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.resultHandler
- will be called when completeConsulService leaderStatus(Handler<AsyncResult<String>> resultHandler)
ConsulClient
10.1.10.12:8300
"leaderStatus
in interface ConsulClient
resultHandler
- will be provided with address of cluster leaderConsulService peersStatus(Handler<AsyncResult<List<String>>> resultHandler)
ConsulClient
10.1.10.12:8300
", "10.1.10.13:8300
"peersStatus
in interface ConsulClient
resultHandler
- will be provided with list of peersConsulService createSession(Handler<AsyncResult<String>> idHandler)
ConsulClient
createSession
in interface ConsulClient
idHandler
- will be provided with ID of new sessionConsulService createSessionWithOptions(SessionOptions options, Handler<AsyncResult<String>> idHandler)
ConsulClient
createSessionWithOptions
in interface ConsulClient
options
- options used to create sessionidHandler
- will be provided with ID of new sessionConsulService infoSession(String id, Handler<AsyncResult<Session>> resultHandler)
ConsulClient
infoSession
in interface ConsulClient
id
- the ID of requested sessionresultHandler
- will be provided with info of requested sessionConsulService infoSessionWithOptions(String id, BlockingQueryOptions options, Handler<AsyncResult<Session>> resultHandler)
ConsulClient
ConsulClient.infoSession(String, Handler)
infoSessionWithOptions
in interface ConsulClient
id
- the ID of requested sessionoptions
- the blocking optionsresultHandler
- will be provided with info of requested sessionConsulService renewSession(String id, Handler<AsyncResult<Session>> resultHandler)
ConsulClient
renewSession
in interface ConsulClient
id
- the ID of session that should be renewedresultHandler
- will be provided with info of renewed sessionConsulService listSessions(Handler<AsyncResult<SessionList>> resultHandler)
ConsulClient
listSessions
in interface ConsulClient
resultHandler
- will be provided with list of sessionsConsulService listSessionsWithOptions(BlockingQueryOptions options, Handler<AsyncResult<SessionList>> resultHandler)
ConsulClient
ConsulClient.listSessions(Handler)
listSessionsWithOptions
in interface ConsulClient
options
- the blocking optionsresultHandler
- will be provided with list of sessionsConsulService listNodeSessions(String nodeId, Handler<AsyncResult<SessionList>> resultHandler)
ConsulClient
listNodeSessions
in interface ConsulClient
nodeId
- the ID of noderesultHandler
- will be provided with list of sessionsConsulService listNodeSessionsWithOptions(String nodeId, BlockingQueryOptions options, Handler<AsyncResult<SessionList>> resultHandler)
ConsulClient
ConsulClient.listNodeSessions(String, Handler)
listNodeSessionsWithOptions
in interface ConsulClient
nodeId
- the ID of nodeoptions
- the blocking optionsresultHandler
- will be provided with list of sessionsConsulService destroySession(String id, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
destroySession
in interface ConsulClient
id
- the ID of sessionresultHandler
- will be called when completeConsulService createPreparedQuery(PreparedQueryDefinition definition, Handler<AsyncResult<String>> resultHandler)
createPreparedQuery
in interface ConsulClient
definition
- definition of the prepare queryresultHandler
- will be provided with id of created prepare queryConsulService getPreparedQuery(String id, Handler<AsyncResult<PreparedQueryDefinition>> resultHandler)
ConsulClient
getPreparedQuery
in interface ConsulClient
id
- the id of the query to readresultHandler
- will be provided with definition of the prepare queryConsulService getAllPreparedQueries(Handler<AsyncResult<List<PreparedQueryDefinition>>> resultHandler)
ConsulClient
getAllPreparedQueries
in interface ConsulClient
resultHandler
- will be provided with list of definitions of the all prepare queriesConsulService updatePreparedQuery(PreparedQueryDefinition definition, Handler<AsyncResult<Void>> resultHandler)
updatePreparedQuery
in interface ConsulClient
definition
- definition of the prepare queryresultHandler
- will be called when completeConsulService deletePreparedQuery(String id, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
deletePreparedQuery
in interface ConsulClient
id
- the id of the query to deleteresultHandler
- will be called when completeConsulService executePreparedQuery(String query, Handler<AsyncResult<PreparedQueryExecuteResponse>> resultHandler)
ConsulClient
executePreparedQuery
in interface ConsulClient
query
- the ID of the query to execute. This can also be the name of an existing prepared query,
or a name that matches a prefix name for a prepared query template.resultHandler
- will be provided with responseConsulService executePreparedQueryWithOptions(String query, PreparedQueryExecuteOptions options, Handler<AsyncResult<PreparedQueryExecuteResponse>> resultHandler)
ConsulClient
executePreparedQueryWithOptions
in interface ConsulClient
query
- the ID of the query to execute. This can also be the name of an existing prepared query,
or a name that matches a prefix name for a prepared query template.options
- the options used to execute prepared queryresultHandler
- will be provided with responsevoid close()
ConsulClient
close
in interface ConsulClient
Copyright © 2023 Eclipse. All rights reserved.