Package io.vertx.reactivex.ext.consul
Class ConsulClient
- java.lang.Object
-
- io.vertx.reactivex.ext.consul.ConsulClient
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<ConsulClient>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description ConsulClient(ConsulClient delegate)
ConsulClient(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ConsulClient
agentInfo()
Returns the configuration and member information of the local agentConsulClient
agentInfo(Handler<AsyncResult<JsonObject>> resultHandler)
Returns the configuration and member information of the local agentConsulClient
catalogDatacenters()
Return all the datacenters that are known by the Consul serverConsulClient
catalogDatacenters(Handler<AsyncResult<List<String>>> resultHandler)
Return all the datacenters that are known by the Consul serverConsulClient
catalogNodes()
Returns the nodes registered in a datacenterConsulClient
catalogNodes(Handler<AsyncResult<NodeList>> resultHandler)
Returns the nodes registered in a datacenterConsulClient
catalogNodeServices(String node)
Returns the node's registered servicesConsulClient
catalogNodeServices(String node, Handler<AsyncResult<ServiceList>> resultHandler)
Returns the node's registered servicesConsulClient
catalogNodeServicesWithOptions(String node, BlockingQueryOptions options)
Returns the node's registered services This is blocking query unlikecatalogNodeServices(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
ConsulClient
catalogNodeServicesWithOptions(String node, BlockingQueryOptions options, Handler<AsyncResult<ServiceList>> resultHandler)
Returns the node's registered services This is blocking query unlikecatalogNodeServices(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
ConsulClient
catalogNodesWithOptions(NodeQueryOptions options)
Returns the nodes registered in a datacenterConsulClient
catalogNodesWithOptions(NodeQueryOptions options, Handler<AsyncResult<NodeList>> resultHandler)
Returns the nodes registered in a datacenterConsulClient
catalogServiceNodes(String service)
Returns the nodes providing a serviceConsulClient
catalogServiceNodes(String service, Handler<AsyncResult<ServiceList>> resultHandler)
Returns the nodes providing a serviceConsulClient
catalogServiceNodesWithOptions(String service, ServiceQueryOptions options)
Returns the nodes providing a serviceConsulClient
catalogServiceNodesWithOptions(String service, ServiceQueryOptions options, Handler<AsyncResult<ServiceList>> resultHandler)
Returns the nodes providing a serviceConsulClient
catalogServices()
Returns the services registered in a datacenterConsulClient
catalogServices(Handler<AsyncResult<ServiceList>> resultHandler)
Returns the services registered in a datacenterConsulClient
catalogServicesWithOptions(BlockingQueryOptions options)
Returns the services registered in a datacenter This is blocking query unlikecatalogServices(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
ConsulClient
catalogServicesWithOptions(BlockingQueryOptions options, Handler<AsyncResult<ServiceList>> resultHandler)
Returns the services registered in a datacenter This is blocking query unlikecatalogServices(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
ConsulClient
cloneAclToken(String id)
Deprecated.ConsulClient
cloneAclToken(String id, Handler<AsyncResult<String>> idHandler)
Deprecated.ConsulClient
cloneAclToken(String accessorId, CloneAclTokenOptions cloneAclToken)
Clones an existing ACL tokenConsulClient
cloneAclToken(String accessorId, CloneAclTokenOptions cloneAclToken, Handler<AsyncResult<AclToken>> resultHandler)
Clones an existing ACL tokenvoid
close()
Close the client and release its resourcesConsulClient
coordinateDatacenters()
Returns the WAN network coordinates for all Consul servers, organized by DCsConsulClient
coordinateDatacenters(Handler<AsyncResult<List<DcCoordinates>>> resultHandler)
Returns the WAN network coordinates for all Consul servers, organized by DCsConsulClient
coordinateNodes()
Returns the LAN network coordinates for all nodes in a given DCConsulClient
coordinateNodes(Handler<AsyncResult<CoordinateList>> resultHandler)
Returns the LAN network coordinates for all nodes in a given DCConsulClient
coordinateNodesWithOptions(BlockingQueryOptions options)
Returns the LAN network coordinates for all nodes in a given DC This is blocking query unlikecoordinateNodes(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.CoordinateList>>)
ConsulClient
coordinateNodesWithOptions(BlockingQueryOptions options, Handler<AsyncResult<CoordinateList>> resultHandler)
Returns the LAN network coordinates for all nodes in a given DC This is blocking query unlikecoordinateNodes(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.CoordinateList>>)
static ConsulClient
create(Vertx vertx)
Create a Consul client with default options.static ConsulClient
create(Vertx vertx, ConsulClientOptions options)
Create a Consul client.ConsulClient
createAclPolicy(AclPolicy policy)
Creates a new ACL policyConsulClient
createAclPolicy(AclPolicy policy, Handler<AsyncResult<String>> resultHandler)
Creates a new ACL policyConsulClient
createAclToken(AclToken token)
Deprecated.ConsulClient
createAclToken(AclToken token, Handler<AsyncResult<String>> idHandler)
Deprecated.ConsulClient
createAclToken(AclToken token)
Create an Acl tokenConsulClient
createAclToken(AclToken token, Handler<AsyncResult<AclToken>> resultHandler)
Create an Acl tokenConsulClient
createPreparedQuery(PreparedQueryDefinition definition)
ConsulClient
createPreparedQuery(PreparedQueryDefinition definition, Handler<AsyncResult<String>> resultHandler)
ConsulClient
createSession()
Initialize a new sessionConsulClient
createSession(Handler<AsyncResult<String>> idHandler)
Initialize a new sessionConsulClient
createSessionWithOptions(SessionOptions options)
Initialize a new sessionConsulClient
createSessionWithOptions(SessionOptions options, Handler<AsyncResult<String>> idHandler)
Initialize a new sessionConsulClient
deleteAclToken(String accessorId)
Deletes an ACL tokenConsulClient
deleteAclToken(String accessorId, Handler<AsyncResult<Boolean>> resultHandler)
Deletes an ACL tokenConsulClient
deletePolicy(String id, Handler<AsyncResult<Boolean>> resultHandler)
This endpoint deletes an ACL policyConsulClient
deletePreparedQuery(String id)
Deletes an existing prepared queryConsulClient
deletePreparedQuery(String id, Handler<AsyncResult<Void>> resultHandler)
Deletes an existing prepared queryConsulClient
deleteValue(String key)
Remove the key/value pair that corresponding to the specified keyConsulClient
deleteValue(String key, Handler<AsyncResult<Void>> resultHandler)
Remove the key/value pair that corresponding to the specified keyConsulClient
deleteValues(String keyPrefix)
Removes all the key/value pair that corresponding to the specified key prefixConsulClient
deleteValues(String keyPrefix, Handler<AsyncResult<Void>> resultHandler)
Removes all the key/value pair that corresponding to the specified key prefixConsulClient
deregisterCatalogService(String nodeId, String serviceId)
Deregister entities from the node or deregister the node itself.ConsulClient
deregisterCatalogService(String nodeId, String serviceId, Handler<AsyncResult<Void>> resultHandler)
Deregister entities from the node or deregister the node itself.ConsulClient
deregisterCheck(String checkId)
Remove a check from the local agent.ConsulClient
deregisterCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
Remove a check from the local agent.ConsulClient
deregisterService(String id)
Remove a service from the local agent.ConsulClient
deregisterService(String id, Handler<AsyncResult<Void>> resultHandler)
Remove a service from the local agent.ConsulClient
destroyAclToken(String id)
Deprecated.ConsulClient
destroyAclToken(String id, Handler<AsyncResult<Void>> resultHandler)
Deprecated.ConsulClient
destroySession(String id)
Destroys the given sessionConsulClient
destroySession(String id, Handler<AsyncResult<Void>> resultHandler)
Destroys the given sessionboolean
equals(Object o)
ConsulClient
executePreparedQuery(String query)
Executes an existing prepared query.ConsulClient
executePreparedQuery(String query, Handler<AsyncResult<PreparedQueryExecuteResponse>> resultHandler)
Executes an existing prepared query.ConsulClient
executePreparedQueryWithOptions(String query, PreparedQueryExecuteOptions options)
Executes an existing prepared query.ConsulClient
executePreparedQueryWithOptions(String query, PreparedQueryExecuteOptions options, Handler<AsyncResult<PreparedQueryExecuteResponse>> resultHandler)
Executes an existing prepared query.ConsulClient
failCheck(String checkId)
Set status of the check to "critical".ConsulClient
failCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "critical".ConsulClient
failCheckWithNote(String checkId, String note)
Set status of the check to "critical".ConsulClient
failCheckWithNote(String checkId, String note, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "critical".ConsulClient
fireEvent(String name)
Fires a new user eventConsulClient
fireEvent(String name, Handler<AsyncResult<Event>> resultHandler)
Fires a new user eventConsulClient
fireEventWithOptions(String name, EventOptions options)
Fires a new user eventConsulClient
fireEventWithOptions(String name, EventOptions options, Handler<AsyncResult<Event>> resultHandler)
Fires a new user eventConsulClient
getAclPolicies(Handler<AsyncResult<List<AclPolicy>>> resultHandler)
This endpoint lists all the ACL policies.ConsulClient
getAclTokens()
Get list of Acl tokenConsulClient
getAclTokens(Handler<AsyncResult<List<AclToken>>> resultHandler)
Get list of Acl tokenConsulClient
getAllPreparedQueries()
Returns a list of all prepared queries.ConsulClient
getAllPreparedQueries(Handler<AsyncResult<List<PreparedQueryDefinition>>> resultHandler)
Returns a list of all prepared queries.ConsulClient
getDelegate()
ConsulClient
getKeys(String keyPrefix)
Returns the list of keys that corresponding to the specified key prefix.ConsulClient
getKeys(String keyPrefix, Handler<AsyncResult<List<String>>> resultHandler)
Returns the list of keys that corresponding to the specified key prefix.ConsulClient
getKeysWithOptions(String keyPrefix, BlockingQueryOptions options)
Returns the list of keys that corresponding to the specified key prefix.ConsulClient
getKeysWithOptions(String keyPrefix, BlockingQueryOptions options, Handler<AsyncResult<List<String>>> resultHandler)
Returns the list of keys that corresponding to the specified key prefix.ConsulClient
getPreparedQuery(String id)
Returns an existing prepared queryConsulClient
getPreparedQuery(String id, Handler<AsyncResult<PreparedQueryDefinition>> resultHandler)
Returns an existing prepared queryConsulClient
getValue(String key)
Returns key/value pair that corresponding to the specified key.ConsulClient
getValue(String key, Handler<AsyncResult<KeyValue>> resultHandler)
Returns key/value pair that corresponding to the specified key.ConsulClient
getValues(String keyPrefix)
Returns the list of key/value pairs that corresponding to the specified key prefix.ConsulClient
getValues(String keyPrefix, Handler<AsyncResult<KeyValueList>> resultHandler)
Returns the list of key/value pairs that corresponding to the specified key prefix.ConsulClient
getValuesWithOptions(String keyPrefix, BlockingQueryOptions options)
Returns the list of key/value pairs that corresponding to the specified key prefix.ConsulClient
getValuesWithOptions(String keyPrefix, BlockingQueryOptions options, Handler<AsyncResult<KeyValueList>> resultHandler)
Returns the list of key/value pairs that corresponding to the specified key prefix.ConsulClient
getValueWithOptions(String key, BlockingQueryOptions options)
Returns key/value pair that corresponding to the specified key.ConsulClient
getValueWithOptions(String key, BlockingQueryOptions options, Handler<AsyncResult<KeyValue>> resultHandler)
Returns key/value pair that corresponding to the specified key.int
hashCode()
ConsulClient
healthChecks(String service)
Returns the checks associated with the serviceConsulClient
healthChecks(String service, Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks associated with the serviceConsulClient
healthChecksWithOptions(String service, CheckQueryOptions options)
Returns the checks associated with the serviceConsulClient
healthChecksWithOptions(String service, CheckQueryOptions options, Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks associated with the serviceConsulClient
healthNodesWithOptions(String node, CheckQueryOptions options)
Returns the checks specific to the node provided on the path.ConsulClient
healthNodesWithOptions(String node, CheckQueryOptions options, Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks specific to the node provided on the path.ConsulClient
healthServiceNodes(String service, boolean passing)
Returns the nodes providing the service.ConsulClient
healthServiceNodes(String service, boolean passing, Handler<AsyncResult<ServiceEntryList>> resultHandler)
Returns the nodes providing the service.ConsulClient
healthServiceNodesWithOptions(String service, boolean passing, ServiceQueryOptions options)
Returns the nodes providing the service.ConsulClient
healthServiceNodesWithOptions(String service, boolean passing, ServiceQueryOptions options, Handler<AsyncResult<ServiceEntryList>> resultHandler)
Returns the nodes providing the service.ConsulClient
healthState(HealthState healthState)
Returns the checks in the specified statusConsulClient
healthState(HealthState healthState, Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks in the specified statusConsulClient
healthStateWithOptions(HealthState healthState, CheckQueryOptions options)
Returns the checks in the specified statusConsulClient
healthStateWithOptions(HealthState healthState, CheckQueryOptions options, Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks in the specified statusConsulClient
infoAclToken(String id)
Deprecated.ConsulClient
infoAclToken(String id, Handler<AsyncResult<AclToken>> tokenHandler)
Deprecated.ConsulClient
infoSession(String id)
Returns the requested session informationConsulClient
infoSession(String id, Handler<AsyncResult<Session>> resultHandler)
Returns the requested session informationConsulClient
infoSessionWithOptions(String id, BlockingQueryOptions options)
Returns the requested session information This is blocking query unlikeinfoSession(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.Session>>)
ConsulClient
infoSessionWithOptions(String id, BlockingQueryOptions options, Handler<AsyncResult<Session>> resultHandler)
Returns the requested session information This is blocking query unlikeinfoSession(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.Session>>)
ConsulClient
leaderStatus()
Get the Raft leader for the datacenter in which the agent is running.ConsulClient
leaderStatus(Handler<AsyncResult<String>> resultHandler)
Get the Raft leader for the datacenter in which the agent is running.ConsulClient
listAclTokens()
Deprecated.ConsulClient
listAclTokens(Handler<AsyncResult<List<AclToken>>> resultHandler)
Deprecated.ConsulClient
listEvents()
Returns the most recent events known by the agentConsulClient
listEvents(Handler<AsyncResult<EventList>> resultHandler)
Returns the most recent events known by the agentConsulClient
listEventsWithOptions(EventListOptions options)
Returns the most recent events known by the agent.ConsulClient
listEventsWithOptions(EventListOptions options, Handler<AsyncResult<EventList>> resultHandler)
Returns the most recent events known by the agent.ConsulClient
listNodeSessions(String nodeId)
Returns the active sessions for a given nodeConsulClient
listNodeSessions(String nodeId, Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions for a given nodeConsulClient
listNodeSessionsWithOptions(String nodeId, BlockingQueryOptions options)
Returns the active sessions for a given node This is blocking query unlikelistNodeSessions(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.SessionList>>)
ConsulClient
listNodeSessionsWithOptions(String nodeId, BlockingQueryOptions options, Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions for a given node This is blocking query unlikelistNodeSessions(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.SessionList>>)
ConsulClient
listSessions()
Returns the active sessionsConsulClient
listSessions(Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessionsConsulClient
listSessionsWithOptions(BlockingQueryOptions options)
Returns the active sessions This is blocking query unlikelistSessions(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.SessionList>>)
ConsulClient
listSessionsWithOptions(BlockingQueryOptions options, Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions This is blocking query unlikelistSessions(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.SessionList>>)
ConsulClient
localChecks()
Return all the checks that are registered with the local agent.ConsulClient
localChecks(Handler<AsyncResult<List<Check>>> resultHandler)
Return all the checks that are registered with the local agent.ConsulClient
localServices()
Returns list of services registered with the local agent.ConsulClient
localServices(Handler<AsyncResult<List<Service>>> resultHandler)
Returns list of services registered with the local agent.ConsulClient
maintenanceService(MaintenanceOptions maintenanceOptions)
Places a given service into "maintenance mode"ConsulClient
maintenanceService(MaintenanceOptions maintenanceOptions, Handler<AsyncResult<Void>> resultHandler)
Places a given service into "maintenance mode"static ConsulClient
newInstance(ConsulClient arg)
ConsulClient
passCheck(String checkId)
Set status of the check to "passing".ConsulClient
passCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "passing".ConsulClient
passCheckWithNote(String checkId, String note)
Set status of the check to "passing".ConsulClient
passCheckWithNote(String checkId, String note, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "passing".ConsulClient
peersStatus()
Retrieves the Raft peers for the datacenter in which the the agent is running.ConsulClient
peersStatus(Handler<AsyncResult<List<String>>> resultHandler)
Retrieves the Raft peers for the datacenter in which the the agent is running.ConsulClient
putValue(String key, String value)
Adds specified key/value pairConsulClient
putValue(String key, String value, Handler<AsyncResult<Boolean>> resultHandler)
Adds specified key/value pairConsulClient
putValueWithOptions(String key, String value, KeyValueOptions options)
ConsulClient
putValueWithOptions(String key, String value, KeyValueOptions options, Handler<AsyncResult<Boolean>> resultHandler)
ConsulClient
readAclToken(String accessorId)
Reads an ACL token with the given Accessor IDConsulClient
readAclToken(String accessorId, Handler<AsyncResult<AclToken>> resultHandler)
Reads an ACL token with the given Accessor IDConsulClient
readPolicy(String id)
This endpoint reads an ACL policy with the given IDConsulClient
readPolicy(String id, Handler<AsyncResult<AclPolicy>> resultHandler)
This endpoint reads an ACL policy with the given IDConsulClient
readPolicyByName(String name)
This endpoint reads an ACL policy with the given nameConsulClient
readPolicyByName(String name, Handler<AsyncResult<AclPolicy>> resultHandler)
This endpoint reads an ACL policy with the given nameConsulClient
registerCatalogService(Node nodeOptions, ServiceOptions serviceOptions)
Register node with external serviceConsulClient
registerCatalogService(Node nodeOptions, ServiceOptions serviceOptions, Handler<AsyncResult<Void>> resultHandler)
Register node with external serviceConsulClient
registerCheck(CheckOptions checkOptions)
Add a new check to the local agent.ConsulClient
registerCheck(CheckOptions checkOptions, Handler<AsyncResult<Void>> resultHandler)
Add a new check to the local agent.ConsulClient
registerService(ServiceOptions serviceOptions)
Adds a new service, with an optional health check, to the local agent.ConsulClient
registerService(ServiceOptions serviceOptions, Handler<AsyncResult<Void>> resultHandler)
Adds a new service, with an optional health check, to the local agent.ConsulClient
renewSession(String id)
Renews the given session.ConsulClient
renewSession(String id, Handler<AsyncResult<Session>> resultHandler)
Renews the given session.io.reactivex.Single<JsonObject>
rxAgentInfo()
Returns the configuration and member information of the local agentio.reactivex.Single<List<String>>
rxCatalogDatacenters()
Return all the datacenters that are known by the Consul serverio.reactivex.Single<NodeList>
rxCatalogNodes()
Returns the nodes registered in a datacenterio.reactivex.Single<ServiceList>
rxCatalogNodeServices(String node)
Returns the node's registered servicesio.reactivex.Single<ServiceList>
rxCatalogNodeServicesWithOptions(String node, BlockingQueryOptions options)
Returns the node's registered services This is blocking query unlikecatalogNodeServices(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
io.reactivex.Single<NodeList>
rxCatalogNodesWithOptions(NodeQueryOptions options)
Returns the nodes registered in a datacenterio.reactivex.Single<ServiceList>
rxCatalogServiceNodes(String service)
Returns the nodes providing a serviceio.reactivex.Single<ServiceList>
rxCatalogServiceNodesWithOptions(String service, ServiceQueryOptions options)
Returns the nodes providing a serviceio.reactivex.Single<ServiceList>
rxCatalogServices()
Returns the services registered in a datacenterio.reactivex.Single<ServiceList>
rxCatalogServicesWithOptions(BlockingQueryOptions options)
Returns the services registered in a datacenter This is blocking query unlikecatalogServices(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
io.reactivex.Single<String>
rxCloneAclToken(String id)
Deprecated.io.reactivex.Single<AclToken>
rxCloneAclToken(String accessorId, CloneAclTokenOptions cloneAclToken)
Clones an existing ACL tokenio.reactivex.Single<List<DcCoordinates>>
rxCoordinateDatacenters()
Returns the WAN network coordinates for all Consul servers, organized by DCsio.reactivex.Single<CoordinateList>
rxCoordinateNodes()
Returns the LAN network coordinates for all nodes in a given DCio.reactivex.Single<CoordinateList>
rxCoordinateNodesWithOptions(BlockingQueryOptions options)
Returns the LAN network coordinates for all nodes in a given DC This is blocking query unlikecoordinateNodes(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.CoordinateList>>)
io.reactivex.Single<String>
rxCreateAclPolicy(AclPolicy policy)
Creates a new ACL policyio.reactivex.Single<String>
rxCreateAclToken(AclToken token)
Deprecated.io.reactivex.Single<AclToken>
rxCreateAclToken(AclToken token)
Create an Acl tokenio.reactivex.Single<String>
rxCreatePreparedQuery(PreparedQueryDefinition definition)
io.reactivex.Single<String>
rxCreateSession()
Initialize a new sessionio.reactivex.Single<String>
rxCreateSessionWithOptions(SessionOptions options)
Initialize a new sessionio.reactivex.Single<Boolean>
rxDeleteAclToken(String accessorId)
Deletes an ACL tokenio.reactivex.Completable
rxDeletePreparedQuery(String id)
Deletes an existing prepared queryio.reactivex.Completable
rxDeleteValue(String key)
Remove the key/value pair that corresponding to the specified keyio.reactivex.Completable
rxDeleteValues(String keyPrefix)
Removes all the key/value pair that corresponding to the specified key prefixio.reactivex.Completable
rxDeregisterCatalogService(String nodeId, String serviceId)
Deregister entities from the node or deregister the node itself.io.reactivex.Completable
rxDeregisterCheck(String checkId)
Remove a check from the local agent.io.reactivex.Completable
rxDeregisterService(String id)
Remove a service from the local agent.io.reactivex.Completable
rxDestroyAclToken(String id)
Deprecated.io.reactivex.Completable
rxDestroySession(String id)
Destroys the given sessionio.reactivex.Single<PreparedQueryExecuteResponse>
rxExecutePreparedQuery(String query)
Executes an existing prepared query.io.reactivex.Single<PreparedQueryExecuteResponse>
rxExecutePreparedQueryWithOptions(String query, PreparedQueryExecuteOptions options)
Executes an existing prepared query.io.reactivex.Completable
rxFailCheck(String checkId)
Set status of the check to "critical".io.reactivex.Completable
rxFailCheckWithNote(String checkId, String note)
Set status of the check to "critical".io.reactivex.Single<Event>
rxFireEvent(String name)
Fires a new user eventio.reactivex.Single<Event>
rxFireEventWithOptions(String name, EventOptions options)
Fires a new user eventio.reactivex.Single<List<AclToken>>
rxGetAclTokens()
Get list of Acl tokenio.reactivex.Single<List<PreparedQueryDefinition>>
rxGetAllPreparedQueries()
Returns a list of all prepared queries.io.reactivex.Single<List<String>>
rxGetKeys(String keyPrefix)
Returns the list of keys that corresponding to the specified key prefix.io.reactivex.Single<List<String>>
rxGetKeysWithOptions(String keyPrefix, BlockingQueryOptions options)
Returns the list of keys that corresponding to the specified key prefix.io.reactivex.Single<PreparedQueryDefinition>
rxGetPreparedQuery(String id)
Returns an existing prepared queryio.reactivex.Single<KeyValue>
rxGetValue(String key)
Returns key/value pair that corresponding to the specified key.io.reactivex.Single<KeyValueList>
rxGetValues(String keyPrefix)
Returns the list of key/value pairs that corresponding to the specified key prefix.io.reactivex.Single<KeyValueList>
rxGetValuesWithOptions(String keyPrefix, BlockingQueryOptions options)
Returns the list of key/value pairs that corresponding to the specified key prefix.io.reactivex.Single<KeyValue>
rxGetValueWithOptions(String key, BlockingQueryOptions options)
Returns key/value pair that corresponding to the specified key.io.reactivex.Single<CheckList>
rxHealthChecks(String service)
Returns the checks associated with the serviceio.reactivex.Single<CheckList>
rxHealthChecksWithOptions(String service, CheckQueryOptions options)
Returns the checks associated with the serviceio.reactivex.Single<CheckList>
rxHealthNodesWithOptions(String node, CheckQueryOptions options)
Returns the checks specific to the node provided on the path.io.reactivex.Single<ServiceEntryList>
rxHealthServiceNodes(String service, boolean passing)
Returns the nodes providing the service.io.reactivex.Single<ServiceEntryList>
rxHealthServiceNodesWithOptions(String service, boolean passing, ServiceQueryOptions options)
Returns the nodes providing the service.io.reactivex.Single<CheckList>
rxHealthState(HealthState healthState)
Returns the checks in the specified statusio.reactivex.Single<CheckList>
rxHealthStateWithOptions(HealthState healthState, CheckQueryOptions options)
Returns the checks in the specified statusio.reactivex.Single<AclToken>
rxInfoAclToken(String id)
Deprecated.io.reactivex.Single<Session>
rxInfoSession(String id)
Returns the requested session informationio.reactivex.Single<Session>
rxInfoSessionWithOptions(String id, BlockingQueryOptions options)
Returns the requested session information This is blocking query unlikeinfoSession(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.Session>>)
io.reactivex.Single<String>
rxLeaderStatus()
Get the Raft leader for the datacenter in which the agent is running.io.reactivex.Single<List<AclToken>>
rxListAclTokens()
Deprecated.io.reactivex.Single<EventList>
rxListEvents()
Returns the most recent events known by the agentio.reactivex.Single<EventList>
rxListEventsWithOptions(EventListOptions options)
Returns the most recent events known by the agent.io.reactivex.Single<SessionList>
rxListNodeSessions(String nodeId)
Returns the active sessions for a given nodeio.reactivex.Single<SessionList>
rxListNodeSessionsWithOptions(String nodeId, BlockingQueryOptions options)
Returns the active sessions for a given node This is blocking query unlikelistNodeSessions(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.SessionList>>)
io.reactivex.Single<SessionList>
rxListSessions()
Returns the active sessionsio.reactivex.Single<SessionList>
rxListSessionsWithOptions(BlockingQueryOptions options)
Returns the active sessions This is blocking query unlikelistSessions(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.SessionList>>)
io.reactivex.Single<List<Check>>
rxLocalChecks()
Return all the checks that are registered with the local agent.io.reactivex.Single<List<Service>>
rxLocalServices()
Returns list of services registered with the local agent.io.reactivex.Completable
rxMaintenanceService(MaintenanceOptions maintenanceOptions)
Places a given service into "maintenance mode"io.reactivex.Completable
rxPassCheck(String checkId)
Set status of the check to "passing".io.reactivex.Completable
rxPassCheckWithNote(String checkId, String note)
Set status of the check to "passing".io.reactivex.Single<List<String>>
rxPeersStatus()
Retrieves the Raft peers for the datacenter in which the the agent is running.io.reactivex.Single<Boolean>
rxPutValue(String key, String value)
Adds specified key/value pairio.reactivex.Single<Boolean>
rxPutValueWithOptions(String key, String value, KeyValueOptions options)
io.reactivex.Single<AclToken>
rxReadAclToken(String accessorId)
Reads an ACL token with the given Accessor IDio.reactivex.Single<AclPolicy>
rxReadPolicy(String id)
This endpoint reads an ACL policy with the given IDio.reactivex.Single<AclPolicy>
rxReadPolicyByName(String name)
This endpoint reads an ACL policy with the given nameio.reactivex.Completable
rxRegisterCatalogService(Node nodeOptions, ServiceOptions serviceOptions)
Register node with external serviceio.reactivex.Completable
rxRegisterCheck(CheckOptions checkOptions)
Add a new check to the local agent.io.reactivex.Completable
rxRegisterService(ServiceOptions serviceOptions)
Adds a new service, with an optional health check, to the local agent.io.reactivex.Single<Session>
rxRenewSession(String id)
Renews the given session.io.reactivex.Single<TxnResponse>
rxTransaction(TxnRequest request)
Manages multiple operations inside a single, atomic transaction.io.reactivex.Single<String>
rxUpdateAclToken(AclToken token)
Deprecated.io.reactivex.Single<AclToken>
rxUpdateAclToken(String accessorId, AclToken token)
Update an existing Acl tokenio.reactivex.Completable
rxUpdateCheck(String checkId, CheckStatus status)
Set status of the check to given status.io.reactivex.Completable
rxUpdateCheckWithNote(String checkId, CheckStatus status, String note)
Set status of the check to given status.io.reactivex.Single<AclPolicy>
rxUpdatePolicy(String id, AclPolicy policy)
This endpoint updates an existing ACL policyio.reactivex.Completable
rxUpdatePreparedQuery(PreparedQueryDefinition definition)
io.reactivex.Completable
rxWarnCheck(String checkId)
Set status of the check to "warning".io.reactivex.Completable
rxWarnCheckWithNote(String checkId, String note)
Set status of the check to "warning".String
toString()
ConsulClient
transaction(TxnRequest request)
Manages multiple operations inside a single, atomic transaction.ConsulClient
transaction(TxnRequest request, Handler<AsyncResult<TxnResponse>> resultHandler)
Manages multiple operations inside a single, atomic transaction.ConsulClient
updateAclToken(AclToken token)
Deprecated.ConsulClient
updateAclToken(AclToken token, Handler<AsyncResult<String>> idHandler)
Deprecated.ConsulClient
updateAclToken(String accessorId, AclToken token)
Update an existing Acl tokenConsulClient
updateAclToken(String accessorId, AclToken token, Handler<AsyncResult<AclToken>> resultHandler)
Update an existing Acl tokenConsulClient
updateCheck(String checkId, CheckStatus status)
Set status of the check to given status.ConsulClient
updateCheck(String checkId, CheckStatus status, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to given status.ConsulClient
updateCheckWithNote(String checkId, CheckStatus status, String note)
Set status of the check to given status.ConsulClient
updateCheckWithNote(String checkId, CheckStatus status, String note, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to given status.ConsulClient
updatePolicy(String id, AclPolicy policy)
This endpoint updates an existing ACL policyConsulClient
updatePolicy(String id, AclPolicy policy, Handler<AsyncResult<AclPolicy>> resultHandler)
This endpoint updates an existing ACL policyConsulClient
updatePreparedQuery(PreparedQueryDefinition definition)
ConsulClient
updatePreparedQuery(PreparedQueryDefinition definition, Handler<AsyncResult<Void>> resultHandler)
ConsulClient
warnCheck(String checkId)
Set status of the check to "warning".ConsulClient
warnCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "warning".ConsulClient
warnCheckWithNote(String checkId, String note)
Set status of the check to "warning".ConsulClient
warnCheckWithNote(String checkId, String note, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "warning".
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<ConsulClient> __TYPE_ARG
-
-
Constructor Detail
-
ConsulClient
public ConsulClient(ConsulClient delegate)
-
ConsulClient
public ConsulClient(Object delegate)
-
-
Method Detail
-
getDelegate
public ConsulClient getDelegate()
-
create
public static ConsulClient create(Vertx vertx)
Create a Consul client with default options.- Parameters:
vertx
- the Vert.x instance- Returns:
- the client
-
create
public static ConsulClient create(Vertx vertx, ConsulClientOptions options)
Create a Consul client.- Parameters:
vertx
- the Vert.x instanceoptions
- the options- Returns:
- the client
-
agentInfo
public ConsulClient agentInfo(Handler<AsyncResult<JsonObject>> resultHandler)
Returns the configuration and member information of the local agent- Parameters:
resultHandler
- will be provided with the configuration and member information of the local agent- Returns:
- reference to this, for fluency
-
agentInfo
public ConsulClient agentInfo()
Returns the configuration and member information of the local agent- Returns:
- reference to this, for fluency
-
rxAgentInfo
public io.reactivex.Single<JsonObject> rxAgentInfo()
Returns the configuration and member information of the local agent- Returns:
- reference to this, for fluency
-
coordinateNodes
public ConsulClient coordinateNodes(Handler<AsyncResult<CoordinateList>> resultHandler)
Returns the LAN network coordinates for all nodes in a given DC- Parameters:
resultHandler
- will be provided with network coordinates of nodes in datacenter- Returns:
- reference to this, for fluency
-
coordinateNodes
public ConsulClient coordinateNodes()
Returns the LAN network coordinates for all nodes in a given DC- Returns:
- reference to this, for fluency
-
rxCoordinateNodes
public io.reactivex.Single<CoordinateList> rxCoordinateNodes()
Returns the LAN network coordinates for all nodes in a given DC- Returns:
- reference to this, for fluency
-
coordinateNodesWithOptions
public ConsulClient coordinateNodesWithOptions(BlockingQueryOptions options, Handler<AsyncResult<CoordinateList>> resultHandler)
Returns the LAN network coordinates for all nodes in a given DC This is blocking query unlikecoordinateNodes(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.CoordinateList>>)
- Parameters:
options
- the blocking optionsresultHandler
- will be provided with network coordinates of nodes in datacenter- Returns:
- reference to this, for fluency
-
coordinateNodesWithOptions
public ConsulClient coordinateNodesWithOptions(BlockingQueryOptions options)
Returns the LAN network coordinates for all nodes in a given DC This is blocking query unlikecoordinateNodes(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.CoordinateList>>)
- Parameters:
options
- the blocking options- Returns:
- reference to this, for fluency
-
rxCoordinateNodesWithOptions
public io.reactivex.Single<CoordinateList> rxCoordinateNodesWithOptions(BlockingQueryOptions options)
Returns the LAN network coordinates for all nodes in a given DC This is blocking query unlikecoordinateNodes(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.CoordinateList>>)
- Parameters:
options
- the blocking options- Returns:
- reference to this, for fluency
-
coordinateDatacenters
public ConsulClient coordinateDatacenters(Handler<AsyncResult<List<DcCoordinates>>> resultHandler)
Returns the WAN network coordinates for all Consul servers, organized by DCs- Parameters:
resultHandler
- will be provided with network coordinates for all Consul servers- Returns:
- reference to this, for fluency
-
coordinateDatacenters
public ConsulClient coordinateDatacenters()
Returns the WAN network coordinates for all Consul servers, organized by DCs- Returns:
- reference to this, for fluency
-
rxCoordinateDatacenters
public io.reactivex.Single<List<DcCoordinates>> rxCoordinateDatacenters()
Returns the WAN network coordinates for all Consul servers, organized by DCs- Returns:
- reference to this, for fluency
-
getKeys
public ConsulClient getKeys(String keyPrefix, Handler<AsyncResult<List<String>>> resultHandler)
Returns the list of keys that corresponding to the specified key prefix.- Parameters:
keyPrefix
- the prefixresultHandler
- will be provided with keys list- Returns:
- reference to this, for fluency
-
getKeys
public ConsulClient getKeys(String keyPrefix)
Returns the list of keys that corresponding to the specified key prefix.- Parameters:
keyPrefix
- the prefix- Returns:
- reference to this, for fluency
-
rxGetKeys
public io.reactivex.Single<List<String>> rxGetKeys(String keyPrefix)
Returns the list of keys that corresponding to the specified key prefix.- Parameters:
keyPrefix
- the prefix- Returns:
- reference to this, for fluency
-
getKeysWithOptions
public ConsulClient getKeysWithOptions(String keyPrefix, BlockingQueryOptions options, Handler<AsyncResult<List<String>>> resultHandler)
Returns the list of keys that corresponding to the specified key prefix.- Parameters:
keyPrefix
- the prefixoptions
- the blocking optionsresultHandler
- will be provided with keys list- Returns:
- reference to this, for fluency
-
getKeysWithOptions
public ConsulClient getKeysWithOptions(String keyPrefix, BlockingQueryOptions options)
Returns the list of keys that corresponding to the specified key prefix.- Parameters:
keyPrefix
- the prefixoptions
- the blocking options- Returns:
- reference to this, for fluency
-
rxGetKeysWithOptions
public io.reactivex.Single<List<String>> rxGetKeysWithOptions(String keyPrefix, BlockingQueryOptions options)
Returns the list of keys that corresponding to the specified key prefix.- Parameters:
keyPrefix
- the prefixoptions
- the blocking options- Returns:
- reference to this, for fluency
-
getValue
public ConsulClient getValue(String key, Handler<AsyncResult<KeyValue>> resultHandler)
Returns key/value pair that corresponding to the specified key. An emptyKeyValue
object will be returned if no such key is found.- Parameters:
key
- the keyresultHandler
- will be provided with key/value pair- Returns:
- reference to this, for fluency
-
getValue
public ConsulClient getValue(String key)
Returns key/value pair that corresponding to the specified key. An emptyKeyValue
object will be returned if no such key is found.- Parameters:
key
- the key- Returns:
- reference to this, for fluency
-
rxGetValue
public io.reactivex.Single<KeyValue> rxGetValue(String key)
Returns key/value pair that corresponding to the specified key. An emptyKeyValue
object will be returned if no such key is found.- Parameters:
key
- the key- Returns:
- reference to this, for fluency
-
getValueWithOptions
public ConsulClient getValueWithOptions(String key, BlockingQueryOptions options, Handler<AsyncResult<KeyValue>> resultHandler)
Returns key/value pair that corresponding to the specified key. An emptyKeyValue
object will be returned if no such key is found. This is blocking query unlikegetValue(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.KeyValue>>)
- Parameters:
key
- the keyoptions
- the blocking optionsresultHandler
- will be provided with key/value pair- Returns:
- reference to this, for fluency
-
getValueWithOptions
public ConsulClient getValueWithOptions(String key, BlockingQueryOptions options)
Returns key/value pair that corresponding to the specified key. An emptyKeyValue
object will be returned if no such key is found. This is blocking query unlikegetValue(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.KeyValue>>)
- Parameters:
key
- the keyoptions
- the blocking options- Returns:
- reference to this, for fluency
-
rxGetValueWithOptions
public io.reactivex.Single<KeyValue> rxGetValueWithOptions(String key, BlockingQueryOptions options)
Returns key/value pair that corresponding to the specified key. An emptyKeyValue
object will be returned if no such key is found. This is blocking query unlikegetValue(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.KeyValue>>)
- Parameters:
key
- the keyoptions
- the blocking options- Returns:
- reference to this, for fluency
-
deleteValue
public ConsulClient deleteValue(String key, Handler<AsyncResult<Void>> resultHandler)
Remove the key/value pair that corresponding to the specified key- Parameters:
key
- the keyresultHandler
- will be called on complete- Returns:
- reference to this, for fluency
-
deleteValue
public ConsulClient deleteValue(String key)
Remove the key/value pair that corresponding to the specified key- Parameters:
key
- the key- Returns:
- reference to this, for fluency
-
rxDeleteValue
public io.reactivex.Completable rxDeleteValue(String key)
Remove the key/value pair that corresponding to the specified key- Parameters:
key
- the key- Returns:
- reference to this, for fluency
-
getValues
public ConsulClient getValues(String keyPrefix, Handler<AsyncResult<KeyValueList>> resultHandler)
Returns the list of key/value pairs that corresponding to the specified key prefix. An emptyKeyValueList
object will be returned if no such key prefix is found.- Parameters:
keyPrefix
- the prefixresultHandler
- will be provided with list of key/value pairs- Returns:
- reference to this, for fluency
-
getValues
public ConsulClient getValues(String keyPrefix)
Returns the list of key/value pairs that corresponding to the specified key prefix. An emptyKeyValueList
object will be returned if no such key prefix is found.- Parameters:
keyPrefix
- the prefix- Returns:
- reference to this, for fluency
-
rxGetValues
public io.reactivex.Single<KeyValueList> rxGetValues(String keyPrefix)
Returns the list of key/value pairs that corresponding to the specified key prefix. An emptyKeyValueList
object will be returned if no such key prefix is found.- Parameters:
keyPrefix
- the prefix- Returns:
- reference to this, for fluency
-
getValuesWithOptions
public ConsulClient getValuesWithOptions(String keyPrefix, BlockingQueryOptions options, Handler<AsyncResult<KeyValueList>> resultHandler)
Returns the list of key/value pairs that corresponding to the specified key prefix. An emptyKeyValueList
object will be returned if no such key prefix is found. This is blocking query unlikegetValues(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.KeyValueList>>)
- Parameters:
keyPrefix
- the prefixoptions
- the blocking optionsresultHandler
- will be provided with list of key/value pairs- Returns:
- reference to this, for fluency
-
getValuesWithOptions
public ConsulClient getValuesWithOptions(String keyPrefix, BlockingQueryOptions options)
Returns the list of key/value pairs that corresponding to the specified key prefix. An emptyKeyValueList
object will be returned if no such key prefix is found. This is blocking query unlikegetValues(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.KeyValueList>>)
- Parameters:
keyPrefix
- the prefixoptions
- the blocking options- Returns:
- reference to this, for fluency
-
rxGetValuesWithOptions
public io.reactivex.Single<KeyValueList> rxGetValuesWithOptions(String keyPrefix, BlockingQueryOptions options)
Returns the list of key/value pairs that corresponding to the specified key prefix. An emptyKeyValueList
object will be returned if no such key prefix is found. This is blocking query unlikegetValues(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.KeyValueList>>)
- Parameters:
keyPrefix
- the prefixoptions
- the blocking options- Returns:
- reference to this, for fluency
-
deleteValues
public ConsulClient deleteValues(String keyPrefix, Handler<AsyncResult<Void>> resultHandler)
Removes all the key/value pair that corresponding to the specified key prefix- Parameters:
keyPrefix
- the prefixresultHandler
- will be called on complete- Returns:
- reference to this, for fluency
-
deleteValues
public ConsulClient deleteValues(String keyPrefix)
Removes all the key/value pair that corresponding to the specified key prefix- Parameters:
keyPrefix
- the prefix- Returns:
- reference to this, for fluency
-
rxDeleteValues
public io.reactivex.Completable rxDeleteValues(String keyPrefix)
Removes all the key/value pair that corresponding to the specified key prefix- Parameters:
keyPrefix
- the prefix- Returns:
- reference to this, for fluency
-
putValue
public ConsulClient putValue(String key, String value, Handler<AsyncResult<Boolean>> resultHandler)
Adds specified key/value pair- Parameters:
key
- the keyvalue
- the valueresultHandler
- will be provided with success of operation- Returns:
- reference to this, for fluency
-
putValue
public ConsulClient putValue(String key, String value)
Adds specified key/value pair- Parameters:
key
- the keyvalue
- the value- Returns:
- reference to this, for fluency
-
rxPutValue
public io.reactivex.Single<Boolean> rxPutValue(String key, String value)
Adds specified key/value pair- Parameters:
key
- the keyvalue
- the value- Returns:
- reference to this, for fluency
-
putValueWithOptions
public ConsulClient putValueWithOptions(String key, String value, KeyValueOptions options, Handler<AsyncResult<Boolean>> resultHandler)
- Parameters:
key
- the keyvalue
- the valueoptions
- options used to push pairresultHandler
- will be provided with success of operation- Returns:
- reference to this, for fluency
-
putValueWithOptions
public ConsulClient putValueWithOptions(String key, String value, KeyValueOptions options)
- Parameters:
key
- the keyvalue
- the valueoptions
- options used to push pair- Returns:
- reference to this, for fluency
-
rxPutValueWithOptions
public io.reactivex.Single<Boolean> rxPutValueWithOptions(String key, String value, KeyValueOptions options)
- Parameters:
key
- the keyvalue
- the valueoptions
- options used to push pair- Returns:
- reference to this, for fluency
-
transaction
public ConsulClient transaction(TxnRequest request, Handler<AsyncResult<TxnResponse>> resultHandler)
Manages multiple operations inside a single, atomic transaction.- Parameters:
request
- transaction requestresultHandler
- will be provided with result of transaction- Returns:
- reference to this, for fluency
-
transaction
public ConsulClient transaction(TxnRequest request)
Manages multiple operations inside a single, atomic transaction.- Parameters:
request
- transaction request- Returns:
- reference to this, for fluency
-
rxTransaction
public io.reactivex.Single<TxnResponse> rxTransaction(TxnRequest request)
Manages multiple operations inside a single, atomic transaction.- Parameters:
request
- transaction request- Returns:
- reference to this, for fluency
-
createAclPolicy
public ConsulClient createAclPolicy(AclPolicy policy, Handler<AsyncResult<String>> resultHandler)
Creates a new ACL policy- Parameters:
policy
- properties of policyresultHandler
- will be provided with result of policy- Returns:
- reference to this, for fluency
-
createAclPolicy
public ConsulClient createAclPolicy(AclPolicy policy)
Creates a new ACL policy- Parameters:
policy
- properties of policy- Returns:
- reference to this, for fluency
-
rxCreateAclPolicy
public io.reactivex.Single<String> rxCreateAclPolicy(AclPolicy policy)
Creates a new ACL policy- Parameters:
policy
- properties of policy- Returns:
- reference to this, for fluency
-
readPolicy
public ConsulClient readPolicy(String id, Handler<AsyncResult<AclPolicy>> resultHandler)
This endpoint reads an ACL policy with the given ID- Parameters:
id
- uuid policyresultHandler
- will be provided with result of policy- Returns:
- a reference to this, for fluency
-
readPolicy
public ConsulClient readPolicy(String id)
This endpoint reads an ACL policy with the given ID- Parameters:
id
- uuid policy- Returns:
- a reference to this, for fluency
-
rxReadPolicy
public io.reactivex.Single<AclPolicy> rxReadPolicy(String id)
This endpoint reads an ACL policy with the given ID- Parameters:
id
- uuid policy- Returns:
- a reference to this, for fluency
-
readPolicyByName
public ConsulClient readPolicyByName(String name, Handler<AsyncResult<AclPolicy>> resultHandler)
This endpoint reads an ACL policy with the given name- Parameters:
name
- unique name of created policyresultHandler
- will be provided with result of policy- Returns:
- a reference to this, for fluency
-
readPolicyByName
public ConsulClient readPolicyByName(String name)
This endpoint reads an ACL policy with the given name- Parameters:
name
- unique name of created policy- Returns:
- a reference to this, for fluency
-
rxReadPolicyByName
public io.reactivex.Single<AclPolicy> rxReadPolicyByName(String name)
This endpoint reads an ACL policy with the given name- Parameters:
name
- unique name of created policy- Returns:
- a reference to this, for fluency
-
updatePolicy
public ConsulClient updatePolicy(String id, AclPolicy policy, Handler<AsyncResult<AclPolicy>> resultHandler)
This endpoint updates an existing ACL policy- Parameters:
id
- uuid of existing policypolicy
- options that will be applied to the existing policyresultHandler
- will be provided with result of policy- Returns:
- a reference to this, for fluency
-
updatePolicy
public ConsulClient updatePolicy(String id, AclPolicy policy)
This endpoint updates an existing ACL policy- Parameters:
id
- uuid of existing policypolicy
- options that will be applied to the existing policy- Returns:
- a reference to this, for fluency
-
rxUpdatePolicy
public io.reactivex.Single<AclPolicy> rxUpdatePolicy(String id, AclPolicy policy)
This endpoint updates an existing ACL policy- Parameters:
id
- uuid of existing policypolicy
- options that will be applied to the existing policy- Returns:
- a reference to this, for fluency
-
deletePolicy
public ConsulClient deletePolicy(String id, Handler<AsyncResult<Boolean>> resultHandler)
This endpoint deletes an ACL policy- Parameters:
id
- uuid of existing policyresultHandler
- will be provided with result of policy deleting- Returns:
- a reference to this, for fluency
-
getAclPolicies
public ConsulClient getAclPolicies(Handler<AsyncResult<List<AclPolicy>>> resultHandler)
This endpoint lists all the ACL policies. Note - The policies rules are not included in the listing and must be retrieved by the policy reading endpoint- Parameters:
resultHandler
- will be provided with result of policy deleting- Returns:
- a reference to this, for fluency
-
createAclToken
public ConsulClient createAclToken(AclToken token, Handler<AsyncResult<AclToken>> resultHandler)
Create an Acl token- Parameters:
token
- properties of the tokenresultHandler
- will be provided with result of token- Returns:
- reference to this, for fluency
AclToken
accessorId - required in the URL path or JSON body for getting, updating and cloning token.AclToken
secretId - using inConsulClientOptions
.
-
createAclToken
public ConsulClient createAclToken(AclToken token)
Create an Acl token- Parameters:
token
- properties of the token- Returns:
- reference to this, for fluency
AclToken
accessorId - required in the URL path or JSON body for getting, updating and cloning token.AclToken
secretId - using inConsulClientOptions
.
-
rxCreateAclToken
public io.reactivex.Single<AclToken> rxCreateAclToken(AclToken token)
Create an Acl token- Parameters:
token
- properties of the token- Returns:
- reference to this, for fluency
AclToken
accessorId - required in the URL path or JSON body for getting, updating and cloning token.AclToken
secretId - using inConsulClientOptions
.
-
updateAclToken
public ConsulClient updateAclToken(String accessorId, AclToken token, Handler<AsyncResult<AclToken>> resultHandler)
Update an existing Acl token- Parameters:
accessorId
- uuid of the tokentoken
- properties of the tokenresultHandler
- will be provided with result of token- Returns:
- reference to this, for fluency
-
updateAclToken
public ConsulClient updateAclToken(String accessorId, AclToken token)
Update an existing Acl token- Parameters:
accessorId
- uuid of the tokentoken
- properties of the token- Returns:
- reference to this, for fluency
-
rxUpdateAclToken
public io.reactivex.Single<AclToken> rxUpdateAclToken(String accessorId, AclToken token)
Update an existing Acl token- Parameters:
accessorId
- uuid of the tokentoken
- properties of the token- Returns:
- reference to this, for fluency
-
cloneAclToken
public ConsulClient cloneAclToken(String accessorId, CloneAclTokenOptions cloneAclToken, Handler<AsyncResult<AclToken>> resultHandler)
Clones an existing ACL token- Parameters:
accessorId
- uuid of the tokencloneAclToken
- properties of cloned tokenresultHandler
- will be provided with result of token- Returns:
- reference to this, for fluency
-
cloneAclToken
public ConsulClient cloneAclToken(String accessorId, CloneAclTokenOptions cloneAclToken)
Clones an existing ACL token- Parameters:
accessorId
- uuid of the tokencloneAclToken
- properties of cloned token- Returns:
- reference to this, for fluency
-
rxCloneAclToken
public io.reactivex.Single<AclToken> rxCloneAclToken(String accessorId, CloneAclTokenOptions cloneAclToken)
Clones an existing ACL token- Parameters:
accessorId
- uuid of the tokencloneAclToken
- properties of cloned token- Returns:
- reference to this, for fluency
-
getAclTokens
public ConsulClient getAclTokens(Handler<AsyncResult<List<AclToken>>> resultHandler)
Get list of Acl token- Parameters:
resultHandler
- will be provided with result of tokens- Returns:
- reference to this, for fluency
-
getAclTokens
public ConsulClient getAclTokens()
Get list of Acl token- Returns:
- reference to this, for fluency
-
rxGetAclTokens
public io.reactivex.Single<List<AclToken>> rxGetAclTokens()
Get list of Acl token- Returns:
- reference to this, for fluency
-
readAclToken
public ConsulClient readAclToken(String accessorId, Handler<AsyncResult<AclToken>> resultHandler)
Reads an ACL token with the given Accessor ID- Parameters:
accessorId
- uuid of tokenresultHandler
- will be provided with result of token- Returns:
- reference to this, for fluency
-
readAclToken
public ConsulClient readAclToken(String accessorId)
Reads an ACL token with the given Accessor ID- Parameters:
accessorId
- uuid of token- Returns:
- reference to this, for fluency
-
rxReadAclToken
public io.reactivex.Single<AclToken> rxReadAclToken(String accessorId)
Reads an ACL token with the given Accessor ID- Parameters:
accessorId
- uuid of token- Returns:
- reference to this, for fluency
-
deleteAclToken
public ConsulClient deleteAclToken(String accessorId, Handler<AsyncResult<Boolean>> resultHandler)
Deletes an ACL token- Parameters:
accessorId
- uuid of tokenresultHandler
- will be provided with result of token deleting- Returns:
- reference to this, for fluency
-
deleteAclToken
public ConsulClient deleteAclToken(String accessorId)
Deletes an ACL token- Parameters:
accessorId
- uuid of token- Returns:
- reference to this, for fluency
-
rxDeleteAclToken
public io.reactivex.Single<Boolean> rxDeleteAclToken(String accessorId)
Deletes an ACL token- Parameters:
accessorId
- uuid of token- Returns:
- reference to this, for fluency
-
createAclToken
@Deprecated public ConsulClient createAclToken(AclToken token, Handler<AsyncResult<String>> idHandler)
Deprecated.Legacy create new Acl token- Parameters:
token
- properties of the tokenidHandler
- will be provided with ID of created token- Returns:
- reference to this, for fluency
-
createAclToken
@Deprecated public ConsulClient createAclToken(AclToken token)
Deprecated.Legacy create new Acl token- Parameters:
token
- properties of the token- Returns:
- reference to this, for fluency
-
rxCreateAclToken
@Deprecated public io.reactivex.Single<String> rxCreateAclToken(AclToken token)
Deprecated.Legacy create new Acl token- Parameters:
token
- properties of the token- Returns:
- reference to this, for fluency
-
updateAclToken
@Deprecated public ConsulClient updateAclToken(AclToken token, Handler<AsyncResult<String>> idHandler)
Deprecated.Update Acl token- Parameters:
token
- properties of the token to be updatedidHandler
- will be provided with ID of updated- Returns:
- reference to this, for fluency
-
updateAclToken
@Deprecated public ConsulClient updateAclToken(AclToken token)
Deprecated.Update Acl token- Parameters:
token
- properties of the token to be updated- Returns:
- reference to this, for fluency
-
rxUpdateAclToken
@Deprecated public io.reactivex.Single<String> rxUpdateAclToken(AclToken token)
Deprecated.Update Acl token- Parameters:
token
- properties of the token to be updated- Returns:
- reference to this, for fluency
-
cloneAclToken
@Deprecated public ConsulClient cloneAclToken(String id, Handler<AsyncResult<String>> idHandler)
Deprecated.Clone Acl token- Parameters:
id
- the ID of token to be clonedidHandler
- will be provided with ID of cloned token- Returns:
- reference to this, for fluency
-
cloneAclToken
@Deprecated public ConsulClient cloneAclToken(String id)
Deprecated.Clone Acl token- Parameters:
id
- the ID of token to be cloned- Returns:
- reference to this, for fluency
-
rxCloneAclToken
@Deprecated public io.reactivex.Single<String> rxCloneAclToken(String id)
Deprecated.Clone Acl token- Parameters:
id
- the ID of token to be cloned- Returns:
- reference to this, for fluency
-
listAclTokens
@Deprecated public ConsulClient listAclTokens(Handler<AsyncResult<List<AclToken>>> resultHandler)
Deprecated.Get list of Acl token- Parameters:
resultHandler
- will be provided with list of tokens- Returns:
- reference to this, for fluency
-
listAclTokens
@Deprecated public ConsulClient listAclTokens()
Deprecated.Get list of Acl token- Returns:
- reference to this, for fluency
-
rxListAclTokens
@Deprecated public io.reactivex.Single<List<AclToken>> rxListAclTokens()
Deprecated.Get list of Acl token- Returns:
- reference to this, for fluency
-
infoAclToken
@Deprecated public ConsulClient infoAclToken(String id, Handler<AsyncResult<AclToken>> tokenHandler)
Deprecated.Get info of Acl token- Parameters:
id
- the ID of tokentokenHandler
- will be provided with token- Returns:
- reference to this, for fluency
-
infoAclToken
@Deprecated public ConsulClient infoAclToken(String id)
Deprecated.Get info of Acl token- Parameters:
id
- the ID of token- Returns:
- reference to this, for fluency
-
rxInfoAclToken
@Deprecated public io.reactivex.Single<AclToken> rxInfoAclToken(String id)
Deprecated.Get info of Acl token- Parameters:
id
- the ID of token- Returns:
- reference to this, for fluency
-
destroyAclToken
@Deprecated public ConsulClient destroyAclToken(String id, Handler<AsyncResult<Void>> resultHandler)
Deprecated.Destroy Acl token- Parameters:
id
- the ID of tokenresultHandler
- will be called on complete- Returns:
- reference to this, for fluency
-
destroyAclToken
@Deprecated public ConsulClient destroyAclToken(String id)
Deprecated.Destroy Acl token- Parameters:
id
- the ID of token- Returns:
- reference to this, for fluency
-
rxDestroyAclToken
@Deprecated public io.reactivex.Completable rxDestroyAclToken(String id)
Deprecated.Destroy Acl token- Parameters:
id
- the ID of token- Returns:
- reference to this, for fluency
-
fireEvent
public ConsulClient fireEvent(String name, Handler<AsyncResult<Event>> resultHandler)
Fires a new user event- Parameters:
name
- name of eventresultHandler
- will be provided with properties of event- Returns:
- reference to this, for fluency
-
fireEvent
public ConsulClient fireEvent(String name)
Fires a new user event- Parameters:
name
- name of event- Returns:
- reference to this, for fluency
-
rxFireEvent
public io.reactivex.Single<Event> rxFireEvent(String name)
Fires a new user event- Parameters:
name
- name of event- Returns:
- reference to this, for fluency
-
fireEventWithOptions
public ConsulClient fireEventWithOptions(String name, EventOptions options, Handler<AsyncResult<Event>> resultHandler)
Fires a new user event- Parameters:
name
- name of eventoptions
- options used to create eventresultHandler
- will be provided with properties of event- Returns:
- reference to this, for fluency
-
fireEventWithOptions
public ConsulClient fireEventWithOptions(String name, EventOptions options)
Fires a new user event- Parameters:
name
- name of eventoptions
- options used to create event- Returns:
- reference to this, for fluency
-
rxFireEventWithOptions
public io.reactivex.Single<Event> rxFireEventWithOptions(String name, EventOptions options)
Fires a new user event- Parameters:
name
- name of eventoptions
- options used to create event- Returns:
- reference to this, for fluency
-
listEvents
public ConsulClient listEvents(Handler<AsyncResult<EventList>> resultHandler)
Returns the most recent events known by the agent- Parameters:
resultHandler
- will be provided with list of events- Returns:
- reference to this, for fluency
-
listEvents
public ConsulClient listEvents()
Returns the most recent events known by the agent- Returns:
- reference to this, for fluency
-
rxListEvents
public io.reactivex.Single<EventList> rxListEvents()
Returns the most recent events known by the agent- Returns:
- reference to this, for fluency
-
listEventsWithOptions
public ConsulClient listEventsWithOptions(EventListOptions options, Handler<AsyncResult<EventList>> resultHandler)
Returns the most recent events known by the agent. This is blocking query unlikelistEvents(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.EventList>>)
. 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 insteadX-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.
- Parameters:
options
- the blocking optionsresultHandler
- will be provided with list of events- Returns:
- reference to this, for fluency
-
listEventsWithOptions
public ConsulClient listEventsWithOptions(EventListOptions options)
Returns the most recent events known by the agent. This is blocking query unlikelistEvents(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.EventList>>)
. 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 insteadX-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.
- Parameters:
options
- the blocking options- Returns:
- reference to this, for fluency
-
rxListEventsWithOptions
public io.reactivex.Single<EventList> rxListEventsWithOptions(EventListOptions options)
Returns the most recent events known by the agent. This is blocking query unlikelistEvents(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.EventList>>)
. 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 insteadX-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.
- Parameters:
options
- the blocking options- Returns:
- reference to this, for fluency
-
registerService
public ConsulClient registerService(ServiceOptions serviceOptions, Handler<AsyncResult<Void>> resultHandler)
Adds a new service, with an optional health check, to the local agent.- Parameters:
serviceOptions
- the options of new serviceresultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
registerService
public ConsulClient registerService(ServiceOptions serviceOptions)
Adds a new service, with an optional health check, to the local agent.- Parameters:
serviceOptions
- the options of new service- Returns:
- reference to this, for fluency
-
rxRegisterService
public io.reactivex.Completable rxRegisterService(ServiceOptions serviceOptions)
Adds a new service, with an optional health check, to the local agent.- Parameters:
serviceOptions
- the options of new service- Returns:
- reference to this, for fluency
-
maintenanceService
public ConsulClient maintenanceService(MaintenanceOptions maintenanceOptions, Handler<AsyncResult<Void>> resultHandler)
Places a given service into "maintenance mode"- Parameters:
maintenanceOptions
- the maintenance optionsresultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
maintenanceService
public ConsulClient maintenanceService(MaintenanceOptions maintenanceOptions)
Places a given service into "maintenance mode"- Parameters:
maintenanceOptions
- the maintenance options- Returns:
- reference to this, for fluency
-
rxMaintenanceService
public io.reactivex.Completable rxMaintenanceService(MaintenanceOptions maintenanceOptions)
Places a given service into "maintenance mode"- Parameters:
maintenanceOptions
- the maintenance options- Returns:
- reference to this, for fluency
-
deregisterService
public ConsulClient deregisterService(String id, Handler<AsyncResult<Void>> resultHandler)
Remove a service from the local agent. The agent will take care of deregistering the service with the Catalog. If there is an associated check, that is also deregistered.- Parameters:
id
- the ID of serviceresultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
deregisterService
public ConsulClient deregisterService(String id)
Remove a service from the local agent. The agent will take care of deregistering the service with the Catalog. If there is an associated check, that is also deregistered.- Parameters:
id
- the ID of service- Returns:
- reference to this, for fluency
-
rxDeregisterService
public io.reactivex.Completable rxDeregisterService(String id)
Remove a service from the local agent. The agent will take care of deregistering the service with the Catalog. If there is an associated check, that is also deregistered.- Parameters:
id
- the ID of service- Returns:
- reference to this, for fluency
-
catalogServiceNodes
public ConsulClient catalogServiceNodes(String service, Handler<AsyncResult<ServiceList>> resultHandler)
Returns the nodes providing a service- Parameters:
service
- name of serviceresultHandler
- will be provided with list of nodes providing given service- Returns:
- reference to this, for fluency
-
catalogServiceNodes
public ConsulClient catalogServiceNodes(String service)
Returns the nodes providing a service- Parameters:
service
- name of service- Returns:
- reference to this, for fluency
-
rxCatalogServiceNodes
public io.reactivex.Single<ServiceList> rxCatalogServiceNodes(String service)
Returns the nodes providing a service- Parameters:
service
- name of service- Returns:
- reference to this, for fluency
-
catalogServiceNodesWithOptions
public ConsulClient catalogServiceNodesWithOptions(String service, ServiceQueryOptions options, Handler<AsyncResult<ServiceList>> resultHandler)
Returns the nodes providing a service- Parameters:
service
- name of serviceoptions
- options used to request servicesresultHandler
- will be provided with list of nodes providing given service- Returns:
- reference to this, for fluency
-
catalogServiceNodesWithOptions
public ConsulClient catalogServiceNodesWithOptions(String service, ServiceQueryOptions options)
Returns the nodes providing a service- Parameters:
service
- name of serviceoptions
- options used to request services- Returns:
- reference to this, for fluency
-
rxCatalogServiceNodesWithOptions
public io.reactivex.Single<ServiceList> rxCatalogServiceNodesWithOptions(String service, ServiceQueryOptions options)
Returns the nodes providing a service- Parameters:
service
- name of serviceoptions
- options used to request services- Returns:
- reference to this, for fluency
-
catalogDatacenters
public ConsulClient catalogDatacenters(Handler<AsyncResult<List<String>>> resultHandler)
Return all the datacenters that are known by the Consul server- Parameters:
resultHandler
- will be provided with list of datacenters- Returns:
- reference to this, for fluency
-
catalogDatacenters
public ConsulClient catalogDatacenters()
Return all the datacenters that are known by the Consul server- Returns:
- reference to this, for fluency
-
rxCatalogDatacenters
public io.reactivex.Single<List<String>> rxCatalogDatacenters()
Return all the datacenters that are known by the Consul server- Returns:
- reference to this, for fluency
-
catalogNodes
public ConsulClient catalogNodes(Handler<AsyncResult<NodeList>> resultHandler)
Returns the nodes registered in a datacenter- Parameters:
resultHandler
- will be provided with list of nodes- Returns:
- reference to this, for fluency
-
catalogNodes
public ConsulClient catalogNodes()
Returns the nodes registered in a datacenter- Returns:
- reference to this, for fluency
-
rxCatalogNodes
public io.reactivex.Single<NodeList> rxCatalogNodes()
Returns the nodes registered in a datacenter- Returns:
- reference to this, for fluency
-
catalogNodesWithOptions
public ConsulClient catalogNodesWithOptions(NodeQueryOptions options, Handler<AsyncResult<NodeList>> resultHandler)
Returns the nodes registered in a datacenter- Parameters:
options
- options used to request nodesresultHandler
- will be provided with list of nodes- Returns:
- reference to this, for fluency
-
catalogNodesWithOptions
public ConsulClient catalogNodesWithOptions(NodeQueryOptions options)
Returns the nodes registered in a datacenter- Parameters:
options
- options used to request nodes- Returns:
- reference to this, for fluency
-
rxCatalogNodesWithOptions
public io.reactivex.Single<NodeList> rxCatalogNodesWithOptions(NodeQueryOptions options)
Returns the nodes registered in a datacenter- Parameters:
options
- options used to request nodes- Returns:
- reference to this, for fluency
-
healthChecks
public ConsulClient healthChecks(String service, Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks associated with the service- Parameters:
service
- the service nameresultHandler
- will be provided with list of checks- Returns:
- reference to this, for fluency
-
healthChecks
public ConsulClient healthChecks(String service)
Returns the checks associated with the service- Parameters:
service
- the service name- Returns:
- reference to this, for fluency
-
rxHealthChecks
public io.reactivex.Single<CheckList> rxHealthChecks(String service)
Returns the checks associated with the service- Parameters:
service
- the service name- Returns:
- reference to this, for fluency
-
healthChecksWithOptions
public ConsulClient healthChecksWithOptions(String service, CheckQueryOptions options, Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks associated with the service- Parameters:
service
- the service nameoptions
- options used to request checksresultHandler
- will be provided with list of checks- Returns:
- reference to this, for fluency
-
healthChecksWithOptions
public ConsulClient healthChecksWithOptions(String service, CheckQueryOptions options)
Returns the checks associated with the service- Parameters:
service
- the service nameoptions
- options used to request checks- Returns:
- reference to this, for fluency
-
rxHealthChecksWithOptions
public io.reactivex.Single<CheckList> rxHealthChecksWithOptions(String service, CheckQueryOptions options)
Returns the checks associated with the service- Parameters:
service
- the service nameoptions
- options used to request checks- Returns:
- reference to this, for fluency
-
healthState
public ConsulClient healthState(HealthState healthState, Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks in the specified status- Parameters:
healthState
- the health stateresultHandler
- will be provided with list of checks- Returns:
- reference to this, for fluency
-
healthState
public ConsulClient healthState(HealthState healthState)
Returns the checks in the specified status- Parameters:
healthState
- the health state- Returns:
- reference to this, for fluency
-
rxHealthState
public io.reactivex.Single<CheckList> rxHealthState(HealthState healthState)
Returns the checks in the specified status- Parameters:
healthState
- the health state- Returns:
- reference to this, for fluency
-
healthStateWithOptions
public ConsulClient healthStateWithOptions(HealthState healthState, CheckQueryOptions options, Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks in the specified status- Parameters:
healthState
- the health stateoptions
- options used to request checksresultHandler
- will be provided with list of checks- Returns:
- reference to this, for fluency
-
healthStateWithOptions
public ConsulClient healthStateWithOptions(HealthState healthState, CheckQueryOptions options)
Returns the checks in the specified status- Parameters:
healthState
- the health stateoptions
- options used to request checks- Returns:
- reference to this, for fluency
-
rxHealthStateWithOptions
public io.reactivex.Single<CheckList> rxHealthStateWithOptions(HealthState healthState, CheckQueryOptions options)
Returns the checks in the specified status- Parameters:
healthState
- the health stateoptions
- options used to request checks- Returns:
- reference to this, for fluency
-
healthServiceNodes
public ConsulClient healthServiceNodes(String service, boolean passing, Handler<AsyncResult<ServiceEntryList>> resultHandler)
Returns the nodes providing the service. This endpoint is very similar to thecatalogServiceNodes(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.- Parameters:
service
- the service namepassing
- if true, filter results to only nodes with all checks in the passing stateresultHandler
- will be provided with list of services- Returns:
- reference to this, for fluency
-
healthServiceNodes
public ConsulClient healthServiceNodes(String service, boolean passing)
Returns the nodes providing the service. This endpoint is very similar to thecatalogServiceNodes(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.- Parameters:
service
- the service namepassing
- if true, filter results to only nodes with all checks in the passing state- Returns:
- reference to this, for fluency
-
rxHealthServiceNodes
public io.reactivex.Single<ServiceEntryList> rxHealthServiceNodes(String service, boolean passing)
Returns the nodes providing the service. This endpoint is very similar to thecatalogServiceNodes(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.- Parameters:
service
- the service namepassing
- if true, filter results to only nodes with all checks in the passing state- Returns:
- reference to this, for fluency
-
healthServiceNodesWithOptions
public ConsulClient healthServiceNodesWithOptions(String service, boolean passing, ServiceQueryOptions options, Handler<AsyncResult<ServiceEntryList>> resultHandler)
Returns the nodes providing the service. This endpoint is very similar to thecatalogServiceNodesWithOptions(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.- Parameters:
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 services- Returns:
- reference to this, for fluency
-
healthServiceNodesWithOptions
public ConsulClient healthServiceNodesWithOptions(String service, boolean passing, ServiceQueryOptions options)
Returns the nodes providing the service. This endpoint is very similar to thecatalogServiceNodesWithOptions(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.- Parameters:
service
- the service namepassing
- if true, filter results to only nodes with all checks in the passing stateoptions
- options used to request services- Returns:
- reference to this, for fluency
-
rxHealthServiceNodesWithOptions
public io.reactivex.Single<ServiceEntryList> rxHealthServiceNodesWithOptions(String service, boolean passing, ServiceQueryOptions options)
Returns the nodes providing the service. This endpoint is very similar to thecatalogServiceNodesWithOptions(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.- Parameters:
service
- the service namepassing
- if true, filter results to only nodes with all checks in the passing stateoptions
- options used to request services- Returns:
- reference to this, for fluency
-
healthNodesWithOptions
public ConsulClient healthNodesWithOptions(String node, CheckQueryOptions options, Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks specific to the node provided on the path.- Parameters:
node
- the node name or IDoptions
- options used to request node health checksresultHandler
-- Returns:
- a future provided with list of services
-
healthNodesWithOptions
public ConsulClient healthNodesWithOptions(String node, CheckQueryOptions options)
Returns the checks specific to the node provided on the path.- Parameters:
node
- the node name or IDoptions
- options used to request node health checks- Returns:
- a future provided with list of services
-
rxHealthNodesWithOptions
public io.reactivex.Single<CheckList> rxHealthNodesWithOptions(String node, CheckQueryOptions options)
Returns the checks specific to the node provided on the path.- Parameters:
node
- the node name or IDoptions
- options used to request node health checks- Returns:
- a future provided with list of services
-
catalogServices
public ConsulClient catalogServices(Handler<AsyncResult<ServiceList>> resultHandler)
Returns the services registered in a datacenter- Parameters:
resultHandler
- will be provided with list of services- Returns:
- reference to this, for fluency
-
catalogServices
public ConsulClient catalogServices()
Returns the services registered in a datacenter- Returns:
- reference to this, for fluency
-
rxCatalogServices
public io.reactivex.Single<ServiceList> rxCatalogServices()
Returns the services registered in a datacenter- Returns:
- reference to this, for fluency
-
catalogServicesWithOptions
public ConsulClient catalogServicesWithOptions(BlockingQueryOptions options, Handler<AsyncResult<ServiceList>> resultHandler)
Returns the services registered in a datacenter This is blocking query unlikecatalogServices(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
- Parameters:
options
- the blocking optionsresultHandler
- will be provided with list of services- Returns:
- reference to this, for fluency
-
catalogServicesWithOptions
public ConsulClient catalogServicesWithOptions(BlockingQueryOptions options)
Returns the services registered in a datacenter This is blocking query unlikecatalogServices(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
- Parameters:
options
- the blocking options- Returns:
- reference to this, for fluency
-
rxCatalogServicesWithOptions
public io.reactivex.Single<ServiceList> rxCatalogServicesWithOptions(BlockingQueryOptions options)
Returns the services registered in a datacenter This is blocking query unlikecatalogServices(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
- Parameters:
options
- the blocking options- Returns:
- reference to this, for fluency
-
catalogNodeServices
public ConsulClient catalogNodeServices(String node, Handler<AsyncResult<ServiceList>> resultHandler)
Returns the node's registered services- Parameters:
node
- node nameresultHandler
- will be provided with list of services- Returns:
- reference to this, for fluency
-
catalogNodeServices
public ConsulClient catalogNodeServices(String node)
Returns the node's registered services- Parameters:
node
- node name- Returns:
- reference to this, for fluency
-
rxCatalogNodeServices
public io.reactivex.Single<ServiceList> rxCatalogNodeServices(String node)
Returns the node's registered services- Parameters:
node
- node name- Returns:
- reference to this, for fluency
-
catalogNodeServicesWithOptions
public ConsulClient catalogNodeServicesWithOptions(String node, BlockingQueryOptions options, Handler<AsyncResult<ServiceList>> resultHandler)
Returns the node's registered services This is blocking query unlikecatalogNodeServices(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
- Parameters:
node
- node nameoptions
- the blocking optionsresultHandler
- will be provided with list of services- Returns:
- reference to this, for fluency
-
catalogNodeServicesWithOptions
public ConsulClient catalogNodeServicesWithOptions(String node, BlockingQueryOptions options)
Returns the node's registered services This is blocking query unlikecatalogNodeServices(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
- Parameters:
node
- node nameoptions
- the blocking options- Returns:
- reference to this, for fluency
-
rxCatalogNodeServicesWithOptions
public io.reactivex.Single<ServiceList> rxCatalogNodeServicesWithOptions(String node, BlockingQueryOptions options)
Returns the node's registered services This is blocking query unlikecatalogNodeServices(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
- Parameters:
node
- node nameoptions
- the blocking options- Returns:
- reference to this, for fluency
-
localServices
public ConsulClient localServices(Handler<AsyncResult<List<Service>>> resultHandler)
Returns list of services registered with the local agent.- Parameters:
resultHandler
- will be provided with list of services- Returns:
- reference to this, for fluency
-
localServices
public ConsulClient localServices()
Returns list of services registered with the local agent.- Returns:
- reference to this, for fluency
-
rxLocalServices
public io.reactivex.Single<List<Service>> rxLocalServices()
Returns list of services registered with the local agent.- Returns:
- reference to this, for fluency
-
localChecks
public ConsulClient localChecks(Handler<AsyncResult<List<Check>>> resultHandler)
Return all the checks that are registered with the local agent.- Parameters:
resultHandler
- will be provided with list of checks- Returns:
- reference to this, for fluency
-
localChecks
public ConsulClient localChecks()
Return all the checks that are registered with the local agent.- Returns:
- reference to this, for fluency
-
rxLocalChecks
public io.reactivex.Single<List<Check>> rxLocalChecks()
Return all the checks that are registered with the local agent.- Returns:
- reference to this, for fluency
-
registerCheck
public ConsulClient registerCheck(CheckOptions checkOptions, Handler<AsyncResult<Void>> resultHandler)
Add a new check to the local agent. The agent is responsible for managing the status of the check and keeping the Catalog in sync.- Parameters:
checkOptions
- options used to register new checkresultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
registerCheck
public ConsulClient registerCheck(CheckOptions checkOptions)
Add a new check to the local agent. The agent is responsible for managing the status of the check and keeping the Catalog in sync.- Parameters:
checkOptions
- options used to register new check- Returns:
- reference to this, for fluency
-
rxRegisterCheck
public io.reactivex.Completable rxRegisterCheck(CheckOptions checkOptions)
Add a new check to the local agent. The agent is responsible for managing the status of the check and keeping the Catalog in sync.- Parameters:
checkOptions
- options used to register new check- Returns:
- reference to this, for fluency
-
deregisterCheck
public ConsulClient deregisterCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
Remove a check from the local agent. The agent will take care of deregistering the check from the Catalog.- Parameters:
checkId
- the ID of checkresultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
deregisterCheck
public ConsulClient deregisterCheck(String checkId)
Remove a check from the local agent. The agent will take care of deregistering the check from the Catalog.- Parameters:
checkId
- the ID of check- Returns:
- reference to this, for fluency
-
rxDeregisterCheck
public io.reactivex.Completable rxDeregisterCheck(String checkId)
Remove a check from the local agent. The agent will take care of deregistering the check from the Catalog.- Parameters:
checkId
- the ID of check- Returns:
- reference to this, for fluency
-
passCheck
public ConsulClient passCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "passing". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checkresultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
passCheck
public ConsulClient passCheck(String checkId)
Set status of the check to "passing". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of check- Returns:
- reference to this, for fluency
-
rxPassCheck
public io.reactivex.Completable rxPassCheck(String checkId)
Set status of the check to "passing". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of check- Returns:
- reference to this, for fluency
-
passCheckWithNote
public ConsulClient passCheckWithNote(String checkId, String note, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "passing". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check'sOutput
field.resultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
passCheckWithNote
public ConsulClient passCheckWithNote(String checkId, String note)
Set status of the check to "passing". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check'sOutput
field.- Returns:
- reference to this, for fluency
-
rxPassCheckWithNote
public io.reactivex.Completable rxPassCheckWithNote(String checkId, String note)
Set status of the check to "passing". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check'sOutput
field.- Returns:
- reference to this, for fluency
-
warnCheck
public ConsulClient warnCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "warning". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checkresultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
warnCheck
public ConsulClient warnCheck(String checkId)
Set status of the check to "warning". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of check- Returns:
- reference to this, for fluency
-
rxWarnCheck
public io.reactivex.Completable rxWarnCheck(String checkId)
Set status of the check to "warning". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of check- Returns:
- reference to this, for fluency
-
warnCheckWithNote
public ConsulClient warnCheckWithNote(String checkId, String note, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "warning". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check'sOutput
field.resultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
warnCheckWithNote
public ConsulClient warnCheckWithNote(String checkId, String note)
Set status of the check to "warning". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check'sOutput
field.- Returns:
- reference to this, for fluency
-
rxWarnCheckWithNote
public io.reactivex.Completable rxWarnCheckWithNote(String checkId, String note)
Set status of the check to "warning". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check'sOutput
field.- Returns:
- reference to this, for fluency
-
failCheck
public ConsulClient failCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "critical". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checkresultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
failCheck
public ConsulClient failCheck(String checkId)
Set status of the check to "critical". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of check- Returns:
- reference to this, for fluency
-
rxFailCheck
public io.reactivex.Completable rxFailCheck(String checkId)
Set status of the check to "critical". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of check- Returns:
- reference to this, for fluency
-
failCheckWithNote
public ConsulClient failCheckWithNote(String checkId, String note, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "critical". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check'sOutput
field.resultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
failCheckWithNote
public ConsulClient failCheckWithNote(String checkId, String note)
Set status of the check to "critical". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check'sOutput
field.- Returns:
- reference to this, for fluency
-
rxFailCheckWithNote
public io.reactivex.Completable rxFailCheckWithNote(String checkId, String note)
Set status of the check to "critical". Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check'sOutput
field.- Returns:
- reference to this, for fluency
-
updateCheck
public ConsulClient updateCheck(String checkId, CheckStatus status, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to given status. Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checkstatus
- new status of checkresultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
updateCheck
public ConsulClient updateCheck(String checkId, CheckStatus status)
Set status of the check to given status. Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checkstatus
- new status of check- Returns:
- reference to this, for fluency
-
rxUpdateCheck
public io.reactivex.Completable rxUpdateCheck(String checkId, CheckStatus status)
Set status of the check to given status. Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checkstatus
- new status of check- Returns:
- reference to this, for fluency
-
updateCheckWithNote
public ConsulClient updateCheckWithNote(String checkId, CheckStatus status, String note, Handler<AsyncResult<Void>> resultHandler)
Set status of the check to given status. Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checkstatus
- new status of checknote
- specifies a human-readable message. This will be passed through to the check'sOutput
field.resultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
updateCheckWithNote
public ConsulClient updateCheckWithNote(String checkId, CheckStatus status, String note)
Set status of the check to given status. Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checkstatus
- new status of checknote
- specifies a human-readable message. This will be passed through to the check'sOutput
field.- Returns:
- reference to this, for fluency
-
rxUpdateCheckWithNote
public io.reactivex.Completable rxUpdateCheckWithNote(String checkId, CheckStatus status, String note)
Set status of the check to given status. Used with a check that is of the TTL type. The TTL clock will be reset.- Parameters:
checkId
- the ID of checkstatus
- new status of checknote
- specifies a human-readable message. This will be passed through to the check'sOutput
field.- Returns:
- reference to this, for fluency
-
leaderStatus
public ConsulClient leaderStatus(Handler<AsyncResult<String>> resultHandler)
Get the Raft leader for the datacenter in which the agent is running. It returns an address in format "10.1.10.12:8300
"- Parameters:
resultHandler
- will be provided with address of cluster leader- Returns:
- reference to this, for fluency
-
leaderStatus
public ConsulClient leaderStatus()
Get the Raft leader for the datacenter in which the agent is running. It returns an address in format "10.1.10.12:8300
"- Returns:
- reference to this, for fluency
-
rxLeaderStatus
public io.reactivex.Single<String> rxLeaderStatus()
Get the Raft leader for the datacenter in which the agent is running. It returns an address in format "10.1.10.12:8300
"- Returns:
- reference to this, for fluency
-
peersStatus
public ConsulClient peersStatus(Handler<AsyncResult<List<String>>> resultHandler)
Retrieves the Raft peers for the datacenter in which the the agent is running. It returns a list of addresses "10.1.10.12:8300
", "10.1.10.13:8300
"- Parameters:
resultHandler
- will be provided with list of peers- Returns:
- reference to this, for fluency
-
peersStatus
public ConsulClient peersStatus()
Retrieves the Raft peers for the datacenter in which the the agent is running. It returns a list of addresses "10.1.10.12:8300
", "10.1.10.13:8300
"- Returns:
- reference to this, for fluency
-
rxPeersStatus
public io.reactivex.Single<List<String>> rxPeersStatus()
Retrieves the Raft peers for the datacenter in which the the agent is running. It returns a list of addresses "10.1.10.12:8300
", "10.1.10.13:8300
"- Returns:
- reference to this, for fluency
-
createSession
public ConsulClient createSession(Handler<AsyncResult<String>> idHandler)
Initialize a new session- Parameters:
idHandler
- will be provided with ID of new session- Returns:
- reference to this, for fluency
-
createSession
public ConsulClient createSession()
Initialize a new session- Returns:
- reference to this, for fluency
-
rxCreateSession
public io.reactivex.Single<String> rxCreateSession()
Initialize a new session- Returns:
- reference to this, for fluency
-
createSessionWithOptions
public ConsulClient createSessionWithOptions(SessionOptions options, Handler<AsyncResult<String>> idHandler)
Initialize a new session- Parameters:
options
- options used to create sessionidHandler
- will be provided with ID of new session- Returns:
- reference to this, for fluency
-
createSessionWithOptions
public ConsulClient createSessionWithOptions(SessionOptions options)
Initialize a new session- Parameters:
options
- options used to create session- Returns:
- reference to this, for fluency
-
rxCreateSessionWithOptions
public io.reactivex.Single<String> rxCreateSessionWithOptions(SessionOptions options)
Initialize a new session- Parameters:
options
- options used to create session- Returns:
- reference to this, for fluency
-
infoSession
public ConsulClient infoSession(String id, Handler<AsyncResult<Session>> resultHandler)
Returns the requested session information- Parameters:
id
- the ID of requested sessionresultHandler
- will be provided with info of requested session- Returns:
- reference to this, for fluency
-
infoSession
public ConsulClient infoSession(String id)
Returns the requested session information- Parameters:
id
- the ID of requested session- Returns:
- reference to this, for fluency
-
rxInfoSession
public io.reactivex.Single<Session> rxInfoSession(String id)
Returns the requested session information- Parameters:
id
- the ID of requested session- Returns:
- reference to this, for fluency
-
infoSessionWithOptions
public ConsulClient infoSessionWithOptions(String id, BlockingQueryOptions options, Handler<AsyncResult<Session>> resultHandler)
Returns the requested session information This is blocking query unlikeinfoSession(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.Session>>)
- Parameters:
id
- the ID of requested sessionoptions
- the blocking optionsresultHandler
- will be provided with info of requested session- Returns:
- reference to this, for fluency
-
infoSessionWithOptions
public ConsulClient infoSessionWithOptions(String id, BlockingQueryOptions options)
Returns the requested session information This is blocking query unlikeinfoSession(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.Session>>)
- Parameters:
id
- the ID of requested sessionoptions
- the blocking options- Returns:
- reference to this, for fluency
-
rxInfoSessionWithOptions
public io.reactivex.Single<Session> rxInfoSessionWithOptions(String id, BlockingQueryOptions options)
Returns the requested session information This is blocking query unlikeinfoSession(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.Session>>)
- Parameters:
id
- the ID of requested sessionoptions
- the blocking options- Returns:
- reference to this, for fluency
-
renewSession
public ConsulClient renewSession(String id, Handler<AsyncResult<Session>> resultHandler)
Renews the given session. This is used with sessions that have a TTL, and it extends the expiration by the TTL- Parameters:
id
- the ID of session that should be renewedresultHandler
- will be provided with info of renewed session- Returns:
- reference to this, for fluency
-
renewSession
public ConsulClient renewSession(String id)
Renews the given session. This is used with sessions that have a TTL, and it extends the expiration by the TTL- Parameters:
id
- the ID of session that should be renewed- Returns:
- reference to this, for fluency
-
rxRenewSession
public io.reactivex.Single<Session> rxRenewSession(String id)
Renews the given session. This is used with sessions that have a TTL, and it extends the expiration by the TTL- Parameters:
id
- the ID of session that should be renewed- Returns:
- reference to this, for fluency
-
listSessions
public ConsulClient listSessions(Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions- Parameters:
resultHandler
- will be provided with list of sessions- Returns:
- reference to this, for fluency
-
listSessions
public ConsulClient listSessions()
Returns the active sessions- Returns:
- reference to this, for fluency
-
rxListSessions
public io.reactivex.Single<SessionList> rxListSessions()
Returns the active sessions- Returns:
- reference to this, for fluency
-
listSessionsWithOptions
public ConsulClient listSessionsWithOptions(BlockingQueryOptions options, Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions This is blocking query unlikelistSessions(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.SessionList>>)
- Parameters:
options
- the blocking optionsresultHandler
- will be provided with list of sessions- Returns:
- reference to this, for fluency
-
listSessionsWithOptions
public ConsulClient listSessionsWithOptions(BlockingQueryOptions options)
Returns the active sessions This is blocking query unlikelistSessions(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.SessionList>>)
- Parameters:
options
- the blocking options- Returns:
- reference to this, for fluency
-
rxListSessionsWithOptions
public io.reactivex.Single<SessionList> rxListSessionsWithOptions(BlockingQueryOptions options)
Returns the active sessions This is blocking query unlikelistSessions(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.SessionList>>)
- Parameters:
options
- the blocking options- Returns:
- reference to this, for fluency
-
listNodeSessions
public ConsulClient listNodeSessions(String nodeId, Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions for a given node- Parameters:
nodeId
- the ID of noderesultHandler
- will be provided with list of sessions- Returns:
- reference to this, for fluency
-
listNodeSessions
public ConsulClient listNodeSessions(String nodeId)
Returns the active sessions for a given node- Parameters:
nodeId
- the ID of node- Returns:
- reference to this, for fluency
-
rxListNodeSessions
public io.reactivex.Single<SessionList> rxListNodeSessions(String nodeId)
Returns the active sessions for a given node- Parameters:
nodeId
- the ID of node- Returns:
- reference to this, for fluency
-
listNodeSessionsWithOptions
public ConsulClient listNodeSessionsWithOptions(String nodeId, BlockingQueryOptions options, Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions for a given node This is blocking query unlikelistNodeSessions(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.SessionList>>)
- Parameters:
nodeId
- the ID of nodeoptions
- the blocking optionsresultHandler
- will be provided with list of sessions- Returns:
- reference to this, for fluency
-
listNodeSessionsWithOptions
public ConsulClient listNodeSessionsWithOptions(String nodeId, BlockingQueryOptions options)
Returns the active sessions for a given node This is blocking query unlikelistNodeSessions(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.SessionList>>)
- Parameters:
nodeId
- the ID of nodeoptions
- the blocking options- Returns:
- reference to this, for fluency
-
rxListNodeSessionsWithOptions
public io.reactivex.Single<SessionList> rxListNodeSessionsWithOptions(String nodeId, BlockingQueryOptions options)
Returns the active sessions for a given node This is blocking query unlikelistNodeSessions(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.SessionList>>)
- Parameters:
nodeId
- the ID of nodeoptions
- the blocking options- Returns:
- reference to this, for fluency
-
destroySession
public ConsulClient destroySession(String id, Handler<AsyncResult<Void>> resultHandler)
Destroys the given session- Parameters:
id
- the ID of sessionresultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
destroySession
public ConsulClient destroySession(String id)
Destroys the given session- Parameters:
id
- the ID of session- Returns:
- reference to this, for fluency
-
rxDestroySession
public io.reactivex.Completable rxDestroySession(String id)
Destroys the given session- Parameters:
id
- the ID of session- Returns:
- reference to this, for fluency
-
createPreparedQuery
public ConsulClient createPreparedQuery(PreparedQueryDefinition definition, Handler<AsyncResult<String>> resultHandler)
- Parameters:
definition
- definition of the prepare queryresultHandler
- will be provided with id of created prepare query- Returns:
- reference to this, for fluency
-
createPreparedQuery
public ConsulClient createPreparedQuery(PreparedQueryDefinition definition)
- Parameters:
definition
- definition of the prepare query- Returns:
- reference to this, for fluency
-
rxCreatePreparedQuery
public io.reactivex.Single<String> rxCreatePreparedQuery(PreparedQueryDefinition definition)
- Parameters:
definition
- definition of the prepare query- Returns:
- reference to this, for fluency
-
getPreparedQuery
public ConsulClient getPreparedQuery(String id, Handler<AsyncResult<PreparedQueryDefinition>> resultHandler)
Returns an existing prepared query- Parameters:
id
- the id of the query to readresultHandler
- will be provided with definition of the prepare query- Returns:
- reference to this, for fluency
-
getPreparedQuery
public ConsulClient getPreparedQuery(String id)
Returns an existing prepared query- Parameters:
id
- the id of the query to read- Returns:
- reference to this, for fluency
-
rxGetPreparedQuery
public io.reactivex.Single<PreparedQueryDefinition> rxGetPreparedQuery(String id)
Returns an existing prepared query- Parameters:
id
- the id of the query to read- Returns:
- reference to this, for fluency
-
getAllPreparedQueries
public ConsulClient getAllPreparedQueries(Handler<AsyncResult<List<PreparedQueryDefinition>>> resultHandler)
Returns a list of all prepared queries.- Parameters:
resultHandler
- will be provided with list of definitions of the all prepare queries- Returns:
- reference to this, for fluency
-
getAllPreparedQueries
public ConsulClient getAllPreparedQueries()
Returns a list of all prepared queries.- Returns:
- reference to this, for fluency
-
rxGetAllPreparedQueries
public io.reactivex.Single<List<PreparedQueryDefinition>> rxGetAllPreparedQueries()
Returns a list of all prepared queries.- Returns:
- reference to this, for fluency
-
updatePreparedQuery
public ConsulClient updatePreparedQuery(PreparedQueryDefinition definition, Handler<AsyncResult<Void>> resultHandler)
- Parameters:
definition
- definition of the prepare queryresultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
updatePreparedQuery
public ConsulClient updatePreparedQuery(PreparedQueryDefinition definition)
- Parameters:
definition
- definition of the prepare query- Returns:
- reference to this, for fluency
-
rxUpdatePreparedQuery
public io.reactivex.Completable rxUpdatePreparedQuery(PreparedQueryDefinition definition)
- Parameters:
definition
- definition of the prepare query- Returns:
- reference to this, for fluency
-
deletePreparedQuery
public ConsulClient deletePreparedQuery(String id, Handler<AsyncResult<Void>> resultHandler)
Deletes an existing prepared query- Parameters:
id
- the id of the query to deleteresultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
deletePreparedQuery
public ConsulClient deletePreparedQuery(String id)
Deletes an existing prepared query- Parameters:
id
- the id of the query to delete- Returns:
- reference to this, for fluency
-
rxDeletePreparedQuery
public io.reactivex.Completable rxDeletePreparedQuery(String id)
Deletes an existing prepared query- Parameters:
id
- the id of the query to delete- Returns:
- reference to this, for fluency
-
executePreparedQuery
public ConsulClient executePreparedQuery(String query, Handler<AsyncResult<PreparedQueryExecuteResponse>> resultHandler)
Executes an existing prepared query.- Parameters:
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 response- Returns:
- reference to this, for fluency
-
executePreparedQuery
public ConsulClient executePreparedQuery(String query)
Executes an existing prepared query.- Parameters:
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.- Returns:
- reference to this, for fluency
-
rxExecutePreparedQuery
public io.reactivex.Single<PreparedQueryExecuteResponse> rxExecutePreparedQuery(String query)
Executes an existing prepared query.- Parameters:
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.- Returns:
- reference to this, for fluency
-
executePreparedQueryWithOptions
public ConsulClient executePreparedQueryWithOptions(String query, PreparedQueryExecuteOptions options, Handler<AsyncResult<PreparedQueryExecuteResponse>> resultHandler)
Executes an existing prepared query.- Parameters:
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 response- Returns:
- reference to this, for fluency
-
executePreparedQueryWithOptions
public ConsulClient executePreparedQueryWithOptions(String query, PreparedQueryExecuteOptions options)
Executes an existing prepared query.- Parameters:
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 query- Returns:
- reference to this, for fluency
-
rxExecutePreparedQueryWithOptions
public io.reactivex.Single<PreparedQueryExecuteResponse> rxExecutePreparedQueryWithOptions(String query, PreparedQueryExecuteOptions options)
Executes an existing prepared query.- Parameters:
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 query- Returns:
- reference to this, for fluency
-
registerCatalogService
public ConsulClient registerCatalogService(Node nodeOptions, ServiceOptions serviceOptions, Handler<AsyncResult<Void>> resultHandler)
Register node with external service- Parameters:
nodeOptions
- the options of new nodeserviceOptions
- the options of new serviceresultHandler
- will be provided with response- Returns:
- reference to this, for fluency
-
registerCatalogService
public ConsulClient registerCatalogService(Node nodeOptions, ServiceOptions serviceOptions)
Register node with external service- Parameters:
nodeOptions
- the options of new nodeserviceOptions
- the options of new service- Returns:
- reference to this, for fluency
-
rxRegisterCatalogService
public io.reactivex.Completable rxRegisterCatalogService(Node nodeOptions, ServiceOptions serviceOptions)
Register node with external service- Parameters:
nodeOptions
- the options of new nodeserviceOptions
- the options of new service- Returns:
- reference to this, for fluency
-
deregisterCatalogService
public ConsulClient deregisterCatalogService(String nodeId, String serviceId, Handler<AsyncResult<Void>> resultHandler)
Deregister entities from the node or deregister the node itself.- Parameters:
nodeId
- the ID of nodeserviceId
- the ID of the service to de-registered; if it is null, the node itself will be de-registered (as well as the entities that belongs to that node)resultHandler
- will be called when complete- Returns:
- reference to this, for fluency
-
deregisterCatalogService
public ConsulClient deregisterCatalogService(String nodeId, String serviceId)
Deregister entities from the node or deregister the node itself.- Parameters:
nodeId
- the ID of nodeserviceId
- the ID of the service to de-registered; if it is null, the node itself will be de-registered (as well as the entities that belongs to that node)- Returns:
- reference to this, for fluency
-
rxDeregisterCatalogService
public io.reactivex.Completable rxDeregisterCatalogService(String nodeId, String serviceId)
Deregister entities from the node or deregister the node itself.- Parameters:
nodeId
- the ID of nodeserviceId
- the ID of the service to de-registered; if it is null, the node itself will be de-registered (as well as the entities that belongs to that node)- Returns:
- reference to this, for fluency
-
close
public void close()
Close the client and release its resources
-
newInstance
public static ConsulClient newInstance(ConsulClient arg)
-
-