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 Future<JsonObject>agentInfo()Returns the configuration and member information of the local agentFuture<List<String>>catalogDatacenters()Return all the datacenters that are known by the Consul serverFuture<NodeList>catalogNodes()Returns the nodes registered in a datacenterFuture<ServiceList>catalogNodeServices(String node)Returns the node's registered servicesFuture<ServiceList>catalogNodeServicesWithOptions(String node, BlockingQueryOptions options)Returns the node's registered services This is blocking query unlikecatalogNodeServices(java.lang.String)Future<NodeList>catalogNodesWithOptions(NodeQueryOptions options)Returns the nodes registered in a datacenterFuture<ServiceList>catalogServiceNodes(String service)Returns the nodes providing a serviceFuture<ServiceList>catalogServiceNodesWithOptions(String service, ServiceQueryOptions options)Returns the nodes providing a serviceFuture<ServiceList>catalogServices()Returns the services registered in a datacenterFuture<ServiceList>catalogServicesWithOptions(BlockingQueryOptions options)Returns the services registered in a datacenter This is blocking query unlikecatalogServices()Future<String>cloneAclToken(String id)Deprecated.Future<AclToken>cloneAclToken(String accessorId, CloneAclTokenOptions cloneAclTokenOptions)Clones an existing ACL tokenvoidclose()Close the client and release its resourcesFuture<List<DcCoordinates>>coordinateDatacenters()Returns the WAN network coordinates for all Consul servers, organized by DCsFuture<CoordinateList>coordinateNodes()Returns the LAN network coordinates for all nodes in a given DCFuture<CoordinateList>coordinateNodesWithOptions(BlockingQueryOptions options)Returns the LAN network coordinates for all nodes in a given DC This is blocking query unlikecoordinateNodes()static ConsulClientcreate(io.vertx.reactivex.core.Vertx vertx)Create a Consul client with default options.static ConsulClientcreate(io.vertx.reactivex.core.Vertx vertx, ConsulClientOptions options)Create a Consul client.Future<String>createAclPolicy(AclPolicy policy)Creates a new ACL policyFuture<String>createAclToken(AclToken token)Deprecated.Future<AclToken>createAclToken(AclToken token)Create an Acl tokenFuture<String>createPreparedQuery(PreparedQueryDefinition definition)Future<String>createSession()Initialize a new sessionFuture<String>createSessionWithOptions(SessionOptions options)Initialize a new sessionFuture<Boolean>deleteAclToken(String accessorId)Deletes an ACL tokenFuture<Boolean>deletePolicy(String id)This endpoint deletes an ACL policyFuture<Void>deletePreparedQuery(String id)Deletes an existing prepared queryFuture<Void>deleteValue(String key)Remove the key/value pair that corresponding to the specified keyFuture<Void>deleteValues(String keyPrefix)Removes all the key/value pair that corresponding to the specified key prefixFuture<Void>deregisterCatalogService(String nodeId, String serviceId)Deregister entities from the node or deregister the node itself.Future<Void>deregisterCheck(String checkId)Remove a check from the local agent.Future<Void>deregisterService(String id)Remove a service from the local agent.Future<Void>destroyAclToken(String id)Deprecated.Future<Void>destroySession(String id)Destroys the given sessionbooleanequals(Object o)Future<PreparedQueryExecuteResponse>executePreparedQuery(String query)Executes an existing prepared query.Future<PreparedQueryExecuteResponse>executePreparedQueryWithOptions(String query, PreparedQueryExecuteOptions options)Executes an existing prepared query.Future<Void>failCheck(String checkId)Set status of the check to "critical".Future<Void>failCheckWithNote(String checkId, String note)Set status of the check to "critical".Future<Event>fireEvent(String name)Fires a new user eventFuture<Event>fireEventWithOptions(String name, EventOptions options)Fires a new user eventFuture<List<AclPolicy>>getAclPolicies()This endpoint lists all the ACL policies.Future<List<AclToken>>getAclTokens()Get list of Acl tokenFuture<List<PreparedQueryDefinition>>getAllPreparedQueries()Returns a list of all prepared queries.ConsulClientgetDelegate()Future<List<String>>getKeys(String keyPrefix)Returns the list of keys that corresponding to the specified key prefix.Future<List<String>>getKeysWithOptions(String keyPrefix, BlockingQueryOptions options)Returns the list of keys that corresponding to the specified key prefix.Future<PreparedQueryDefinition>getPreparedQuery(String id)Returns an existing prepared queryFuture<KeyValue>getValue(String key)Returns key/value pair that corresponding to the specified key.Future<KeyValueList>getValues(String keyPrefix)Returns the list of key/value pairs that corresponding to the specified key prefix.Future<KeyValueList>getValuesWithOptions(String keyPrefix, BlockingQueryOptions options)Returns the list of key/value pairs that corresponding to the specified key prefix.Future<KeyValue>getValueWithOptions(String key, BlockingQueryOptions options)Returns key/value pair that corresponding to the specified key.inthashCode()Future<CheckList>healthChecks(String service)Returns the checks associated with the serviceFuture<CheckList>healthChecksWithOptions(String service, CheckQueryOptions options)Returns the checks associated with the serviceFuture<CheckList>healthNodesWithOptions(String node, CheckQueryOptions options)Returns the checks specific to the node provided on the path.Future<ServiceEntryList>healthServiceNodes(String service, boolean passing)Returns the nodes providing the service.Future<ServiceEntryList>healthServiceNodesWithOptions(String service, boolean passing, ServiceQueryOptions options)Returns the nodes providing the service.Future<CheckList>healthState(HealthState healthState)Returns the checks in the specified statusFuture<CheckList>healthStateWithOptions(HealthState healthState, CheckQueryOptions options)Returns the checks in the specified statusFuture<AclToken>infoAclToken(String id)Deprecated.Future<Session>infoSession(String id)Returns the requested session informationFuture<Session>infoSessionWithOptions(String id, BlockingQueryOptions options)Returns the requested session information This is blocking query unlikeinfoSession(java.lang.String)Future<String>leaderStatus()Get the Raft leader for the datacenter in which the agent is running.Future<List<AclToken>>listAclTokens()Deprecated.Future<EventList>listEvents()Returns the most recent events known by the agentFuture<EventList>listEventsWithOptions(EventListOptions options)Returns the most recent events known by the agent.Future<SessionList>listNodeSessions(String nodeId)Returns the active sessions for a given nodeFuture<SessionList>listNodeSessionsWithOptions(String nodeId, BlockingQueryOptions options)Returns the active sessions for a given node This is blocking query unlikelistNodeSessions(java.lang.String)Future<SessionList>listSessions()Returns the active sessionsFuture<SessionList>listSessionsWithOptions(BlockingQueryOptions options)Returns the active sessions This is blocking query unlikelistSessions()Future<List<Check>>localChecks()Return all the checks that are registered with the local agent.Future<List<Service>>localServices()Returns list of services registered with the local agent.Future<Void>maintenanceService(MaintenanceOptions maintenanceOptions)Places a given service into "maintenance mode"static ConsulClientnewInstance(ConsulClient arg)Future<Void>passCheck(String checkId)Set status of the check to "passing".Future<Void>passCheckWithNote(String checkId, String note)Set status of the check to "passing".Future<List<String>>peersStatus()Retrieves the Raft peers for the datacenter in which the the agent is running.Future<Boolean>putValue(String key, String value)Adds specified key/value pairFuture<Boolean>putValueWithOptions(String key, String value, KeyValueOptions options)Future<AclToken>readAclToken(String accessorId)Reads an ACL token with the given Accessor IDFuture<AclPolicy>readPolicy(String id)This endpoint reads an ACL policy with the given IDFuture<AclPolicy>readPolicyByName(String name)This endpoint reads an ACL policy with the given nameFuture<Void>registerCatalogService(Node nodeOptions, ServiceOptions serviceOptions)Register node with external serviceFuture<Void>registerCheck(CheckOptions checkOptions)Add a new check to the local agent.Future<Void>registerService(ServiceOptions serviceOptions)Adds a new service, with an optional health check, to the local agent.Future<Session>renewSession(String id)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.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.reactivex.Single<String>rxCloneAclToken(String id)Deprecated.io.reactivex.Single<AclToken>rxCloneAclToken(String accessorId, CloneAclTokenOptions cloneAclTokenOptions)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.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.Single<Boolean>rxDeletePolicy(String id)This endpoint deletes an ACL policyio.reactivex.CompletablerxDeletePreparedQuery(String id)Deletes an existing prepared queryio.reactivex.CompletablerxDeleteValue(String key)Remove the key/value pair that corresponding to the specified keyio.reactivex.CompletablerxDeleteValues(String keyPrefix)Removes all the key/value pair that corresponding to the specified key prefixio.reactivex.CompletablerxDeregisterCatalogService(String nodeId, String serviceId)Deregister entities from the node or deregister the node itself.io.reactivex.CompletablerxDeregisterCheck(String checkId)Remove a check from the local agent.io.reactivex.CompletablerxDeregisterService(String id)Remove a service from the local agent.io.reactivex.CompletablerxDestroyAclToken(String id)Deprecated.io.reactivex.CompletablerxDestroySession(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.CompletablerxFailCheck(String checkId)Set status of the check to "critical".io.reactivex.CompletablerxFailCheckWithNote(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<AclPolicy>>rxGetAclPolicies()This endpoint lists all the ACL policies.io.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.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.reactivex.Single<SessionList>rxListSessions()Returns the active sessionsio.reactivex.Single<SessionList>rxListSessionsWithOptions(BlockingQueryOptions options)Returns the active sessions This is blocking query unlikelistSessions()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.CompletablerxMaintenanceService(MaintenanceOptions maintenanceOptions)Places a given service into "maintenance mode"io.reactivex.CompletablerxPassCheck(String checkId)Set status of the check to "passing".io.reactivex.CompletablerxPassCheckWithNote(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.CompletablerxRegisterCatalogService(Node nodeOptions, ServiceOptions serviceOptions)Register node with external serviceio.reactivex.CompletablerxRegisterCheck(CheckOptions checkOptions)Add a new check to the local agent.io.reactivex.CompletablerxRegisterService(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.CompletablerxUpdateCheck(String checkId, CheckStatus status)Set status of the check to given status.io.reactivex.CompletablerxUpdateCheckWithNote(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.CompletablerxUpdatePreparedQuery(PreparedQueryDefinition definition)io.reactivex.CompletablerxWarnCheck(String checkId)Set status of the check to "warning".io.reactivex.CompletablerxWarnCheckWithNote(String checkId, String note)Set status of the check to "warning".StringtoString()Future<TxnResponse>transaction(TxnRequest request)Manages multiple operations inside a single, atomic transaction.Future<String>updateAclToken(AclToken token)Deprecated.Future<AclToken>updateAclToken(String accessorId, AclToken token)Update an existing Acl tokenFuture<Void>updateCheck(String checkId, CheckStatus status)Set status of the check to given status.Future<Void>updateCheckWithNote(String checkId, CheckStatus status, String note)Set status of the check to given status.Future<AclPolicy>updatePolicy(String id, AclPolicy policy)This endpoint updates an existing ACL policyFuture<Void>updatePreparedQuery(PreparedQueryDefinition definition)Future<Void>warnCheck(String checkId)Set status of the check to "warning".Future<Void>warnCheckWithNote(String checkId, String note)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(io.vertx.reactivex.core.Vertx vertx)
Create a Consul client with default options.- Parameters:
vertx- the Vert.x instance- Returns:
- the client
-
create
public static ConsulClient create(io.vertx.reactivex.core.Vertx vertx, ConsulClientOptions options)
Create a Consul client.- Parameters:
vertx- the Vert.x instanceoptions- the options- Returns:
- the client
-
agentInfo
public Future<JsonObject> agentInfo()
Returns the configuration and member information of the local agent- Returns:
- a future provided with the configuration and member information of the local agent
-
rxAgentInfo
public io.reactivex.Single<JsonObject> rxAgentInfo()
Returns the configuration and member information of the local agent- Returns:
- a future provided with the configuration and member information of the local agent
-
coordinateNodes
public Future<CoordinateList> coordinateNodes()
Returns the LAN network coordinates for all nodes in a given DC- Returns:
- a future provided with network coordinates of nodes in datacenter
-
rxCoordinateNodes
public io.reactivex.Single<CoordinateList> rxCoordinateNodes()
Returns the LAN network coordinates for all nodes in a given DC- Returns:
- a future provided with network coordinates of nodes in datacenter
-
coordinateNodesWithOptions
public Future<CoordinateList> coordinateNodesWithOptions(BlockingQueryOptions options)
Returns the LAN network coordinates for all nodes in a given DC This is blocking query unlikecoordinateNodes()- Parameters:
options- the blocking options- Returns:
- a future provided with network coordinates of nodes in datacenter
-
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()- Parameters:
options- the blocking options- Returns:
- a future provided with network coordinates of nodes in datacenter
-
coordinateDatacenters
public Future<List<DcCoordinates>> coordinateDatacenters()
Returns the WAN network coordinates for all Consul servers, organized by DCs- Returns:
- a future provided with network coordinates for all Consul servers
-
rxCoordinateDatacenters
public io.reactivex.Single<List<DcCoordinates>> rxCoordinateDatacenters()
Returns the WAN network coordinates for all Consul servers, organized by DCs- Returns:
- a future provided with network coordinates for all Consul servers
-
getKeys
public Future<List<String>> getKeys(String keyPrefix)
Returns the list of keys that corresponding to the specified key prefix.- Parameters:
keyPrefix- the prefix- Returns:
- a future provided with keys list
-
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:
- a future provided with keys list
-
getKeysWithOptions
public Future<List<String>> 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:
- a future provided with keys list
-
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:
- a future provided with keys list
-
getValue
public Future<KeyValue> getValue(String key)
Returns key/value pair that corresponding to the specified key. An emptyKeyValueobject will be returned if no such key is found.- Parameters:
key- the key- Returns:
- a future provided with key/value pair
-
rxGetValue
public io.reactivex.Single<KeyValue> rxGetValue(String key)
Returns key/value pair that corresponding to the specified key. An emptyKeyValueobject will be returned if no such key is found.- Parameters:
key- the key- Returns:
- a future provided with key/value pair
-
getValueWithOptions
public Future<KeyValue> getValueWithOptions(String key, BlockingQueryOptions options)
Returns key/value pair that corresponding to the specified key. An emptyKeyValueobject will be returned if no such key is found. This is blocking query unlikegetValue(java.lang.String)- Parameters:
key- the keyoptions- the blocking options- Returns:
- a future provided with key/value pair
-
rxGetValueWithOptions
public io.reactivex.Single<KeyValue> rxGetValueWithOptions(String key, BlockingQueryOptions options)
Returns key/value pair that corresponding to the specified key. An emptyKeyValueobject will be returned if no such key is found. This is blocking query unlikegetValue(java.lang.String)- Parameters:
key- the keyoptions- the blocking options- Returns:
- a future provided with key/value pair
-
deleteValue
public Future<Void> deleteValue(String key)
Remove the key/value pair that corresponding to the specified key- Parameters:
key- the key- Returns:
- a future notified on complete
-
rxDeleteValue
public io.reactivex.Completable rxDeleteValue(String key)
Remove the key/value pair that corresponding to the specified key- Parameters:
key- the key- Returns:
- a future notified on complete
-
getValues
public Future<KeyValueList> getValues(String keyPrefix)
Returns the list of key/value pairs that corresponding to the specified key prefix. An emptyKeyValueListobject will be returned if no such key prefix is found.- Parameters:
keyPrefix- the prefix- Returns:
- a future provided with list of key/value pairs
-
rxGetValues
public io.reactivex.Single<KeyValueList> rxGetValues(String keyPrefix)
Returns the list of key/value pairs that corresponding to the specified key prefix. An emptyKeyValueListobject will be returned if no such key prefix is found.- Parameters:
keyPrefix- the prefix- Returns:
- a future provided with list of key/value pairs
-
getValuesWithOptions
public Future<KeyValueList> getValuesWithOptions(String keyPrefix, BlockingQueryOptions options)
Returns the list of key/value pairs that corresponding to the specified key prefix. An emptyKeyValueListobject will be returned if no such key prefix is found. This is blocking query unlikegetValues(java.lang.String)- Parameters:
keyPrefix- the prefixoptions- the blocking options- Returns:
- a future provided with list of key/value pairs
-
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 emptyKeyValueListobject will be returned if no such key prefix is found. This is blocking query unlikegetValues(java.lang.String)- Parameters:
keyPrefix- the prefixoptions- the blocking options- Returns:
- a future provided with list of key/value pairs
-
deleteValues
public Future<Void> deleteValues(String keyPrefix)
Removes all the key/value pair that corresponding to the specified key prefix- Parameters:
keyPrefix- the prefix- Returns:
- a future notified on complete
-
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:
- a future notified on complete
-
putValue
public Future<Boolean> putValue(String key, String value)
Adds specified key/value pair- Parameters:
key- the keyvalue- the value- Returns:
- a future provided with success of operation
-
rxPutValue
public io.reactivex.Single<Boolean> rxPutValue(String key, String value)
Adds specified key/value pair- Parameters:
key- the keyvalue- the value- Returns:
- a future provided with success of operation
-
putValueWithOptions
public Future<Boolean> putValueWithOptions(String key, String value, KeyValueOptions options)
- Parameters:
key- the keyvalue- the valueoptions- options used to push pair- Returns:
- a future provided with success of operation
-
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:
- a future provided with success of operation
-
transaction
public Future<TxnResponse> transaction(TxnRequest request)
Manages multiple operations inside a single, atomic transaction.- Parameters:
request- transaction request- Returns:
- a future provided with result of transaction
-
rxTransaction
public io.reactivex.Single<TxnResponse> rxTransaction(TxnRequest request)
Manages multiple operations inside a single, atomic transaction.- Parameters:
request- transaction request- Returns:
- a future provided with result of transaction
-
createAclPolicy
public Future<String> createAclPolicy(AclPolicy policy)
Creates a new ACL policy- Parameters:
policy- properties of policy- Returns:
- a future provided with ID of created policy
-
rxCreateAclPolicy
public io.reactivex.Single<String> rxCreateAclPolicy(AclPolicy policy)
Creates a new ACL policy- Parameters:
policy- properties of policy- Returns:
- a future provided with ID of created policy
-
readPolicy
public Future<AclPolicy> readPolicy(String id)
This endpoint reads an ACL policy with the given ID- Parameters:
id- uuid policy- Returns:
- a future of AclPolicy
-
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 future of AclPolicy
-
readPolicyByName
public Future<AclPolicy> readPolicyByName(String name)
This endpoint reads an ACL policy with the given name- Parameters:
name- unique name of created policy- Returns:
- a future of AclPolicy like in
readPolicy(java.lang.String)
-
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 future of AclPolicy like in
readPolicy(java.lang.String)
-
updatePolicy
public Future<AclPolicy> 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 future of AclPolicy
-
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 future of AclPolicy
-
deletePolicy
public Future<Boolean> deletePolicy(String id)
This endpoint deletes an ACL policy- Parameters:
id- uuid of existing policy- Returns:
- a future boolean value: true or false, indicating whether the deletion was successful
-
rxDeletePolicy
public io.reactivex.Single<Boolean> rxDeletePolicy(String id)
This endpoint deletes an ACL policy- Parameters:
id- uuid of existing policy- Returns:
- a future boolean value: true or false, indicating whether the deletion was successful
-
getAclPolicies
public Future<List<AclPolicy>> getAclPolicies()
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- Returns:
- a future of all acl policies
-
rxGetAclPolicies
public io.reactivex.Single<List<AclPolicy>> rxGetAclPolicies()
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- Returns:
- a future of all acl policies
-
createAclToken
public Future<AclToken> createAclToken(AclToken token)
Create an Acl token- Parameters:
token- properties of the token- Returns:
- a future NewAclToken in which two fields accessorId and secretId.
AclTokenaccessorId - required in the URL path or JSON body for getting, updating and cloning token.AclTokensecretId - using inConsulClientOptions.
-
rxCreateAclToken
public io.reactivex.Single<AclToken> rxCreateAclToken(AclToken token)
Create an Acl token- Parameters:
token- properties of the token- Returns:
- a future NewAclToken in which two fields accessorId and secretId.
AclTokenaccessorId - required in the URL path or JSON body for getting, updating and cloning token.AclTokensecretId - using inConsulClientOptions.
-
updateAclToken
public Future<AclToken> updateAclToken(String accessorId, AclToken token)
Update an existing Acl token- Parameters:
accessorId- uuid of the tokentoken- properties of the token- Returns:
- a future NewAclToken like in
createAclToken(io.vertx.ext.consul.token.AclToken)
-
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:
- a future NewAclToken like in
createAclToken(io.vertx.ext.consul.token.AclToken)
-
cloneAclToken
public Future<AclToken> cloneAclToken(String accessorId, CloneAclTokenOptions cloneAclTokenOptions)
Clones an existing ACL token- Parameters:
accessorId- uuid of the tokencloneAclTokenOptions- properties of cloned token- Returns:
- a future NewAclToken like in
createAclToken(io.vertx.ext.consul.token.AclToken)
-
rxCloneAclToken
public io.reactivex.Single<AclToken> rxCloneAclToken(String accessorId, CloneAclTokenOptions cloneAclTokenOptions)
Clones an existing ACL token- Parameters:
accessorId- uuid of the tokencloneAclTokenOptions- properties of cloned token- Returns:
- a future NewAclToken like in
createAclToken(io.vertx.ext.consul.token.AclToken)
-
getAclTokens
public Future<List<AclToken>> getAclTokens()
Get list of Acl token- Returns:
- a future provided with list of tokens
-
rxGetAclTokens
public io.reactivex.Single<List<AclToken>> rxGetAclTokens()
Get list of Acl token- Returns:
- a future provided with list of tokens
-
readAclToken
public Future<AclToken> readAclToken(String accessorId)
Reads an ACL token with the given Accessor ID- Parameters:
accessorId- uuid of token- Returns:
- a future provided with token
-
rxReadAclToken
public io.reactivex.Single<AclToken> rxReadAclToken(String accessorId)
Reads an ACL token with the given Accessor ID- Parameters:
accessorId- uuid of token- Returns:
- a future provided with token
-
deleteAclToken
public Future<Boolean> deleteAclToken(String accessorId)
Deletes an ACL token- Parameters:
accessorId- uuid of token- Returns:
- a future boolean value: true or false, indicating whether the deletion was successful.
-
rxDeleteAclToken
public io.reactivex.Single<Boolean> rxDeleteAclToken(String accessorId)
Deletes an ACL token- Parameters:
accessorId- uuid of token- Returns:
- a future boolean value: true or false, indicating whether the deletion was successful.
-
createAclToken
@Deprecated public Future<String> createAclToken(AclToken token)
Deprecated.Legacy create new Acl token- Parameters:
token- properties of the token- Returns:
- a future provided with ID of created token
-
rxCreateAclToken
@Deprecated public io.reactivex.Single<String> rxCreateAclToken(AclToken token)
Deprecated.Legacy create new Acl token- Parameters:
token- properties of the token- Returns:
- a future provided with ID of created token
-
updateAclToken
@Deprecated public Future<String> updateAclToken(AclToken token)
Deprecated.Update Acl token- Parameters:
token- properties of the token to be updated- Returns:
- a future provided with ID of updated
-
rxUpdateAclToken
@Deprecated public io.reactivex.Single<String> rxUpdateAclToken(AclToken token)
Deprecated.Update Acl token- Parameters:
token- properties of the token to be updated- Returns:
- a future provided with ID of updated
-
cloneAclToken
@Deprecated public Future<String> cloneAclToken(String id)
Deprecated.Clone Acl token- Parameters:
id- the ID of token to be cloned- Returns:
- a future provided with ID of cloned token
-
rxCloneAclToken
@Deprecated public io.reactivex.Single<String> rxCloneAclToken(String id)
Deprecated.Clone Acl token- Parameters:
id- the ID of token to be cloned- Returns:
- a future provided with ID of cloned token
-
listAclTokens
@Deprecated public Future<List<AclToken>> listAclTokens()
Deprecated.Get list of Acl token- Returns:
- a future provided with list of tokens
-
rxListAclTokens
@Deprecated public io.reactivex.Single<List<AclToken>> rxListAclTokens()
Deprecated.Get list of Acl token- Returns:
- a future provided with list of tokens
-
infoAclToken
@Deprecated public Future<AclToken> infoAclToken(String id)
Deprecated.Get info of Acl token- Parameters:
id- the ID of token- Returns:
- a future provided with token
-
rxInfoAclToken
@Deprecated public io.reactivex.Single<AclToken> rxInfoAclToken(String id)
Deprecated.Get info of Acl token- Parameters:
id- the ID of token- Returns:
- a future provided with token
-
destroyAclToken
@Deprecated public Future<Void> destroyAclToken(String id)
Deprecated.Destroy Acl token- Parameters:
id- the ID of token- Returns:
- a future notified on complete
-
rxDestroyAclToken
@Deprecated public io.reactivex.Completable rxDestroyAclToken(String id)
Deprecated.Destroy Acl token- Parameters:
id- the ID of token- Returns:
- a future notified on complete
-
fireEvent
public Future<Event> fireEvent(String name)
Fires a new user event- Parameters:
name- name of event- Returns:
- a future provided with properties of event
-
rxFireEvent
public io.reactivex.Single<Event> rxFireEvent(String name)
Fires a new user event- Parameters:
name- name of event- Returns:
- a future provided with properties of event
-
fireEventWithOptions
public Future<Event> fireEventWithOptions(String name, EventOptions options)
Fires a new user event- Parameters:
name- name of eventoptions- options used to create event- Returns:
- a future provided with properties of event
-
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:
- a future provided with properties of event
-
listEvents
public Future<EventList> listEvents()
Returns the most recent events known by the agent- Returns:
- a future provided with list of events
-
rxListEvents
public io.reactivex.Single<EventList> rxListEvents()
Returns the most recent events known by the agent- Returns:
- a future provided with list of events
-
listEventsWithOptions
public Future<EventList> listEventsWithOptions(EventListOptions options)
Returns the most recent events known by the agent. This is blocking query unlikelistEvents(). 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-Indexmaps 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:
- a future provided with list of events
-
rxListEventsWithOptions
public io.reactivex.Single<EventList> rxListEventsWithOptions(EventListOptions options)
Returns the most recent events known by the agent. This is blocking query unlikelistEvents(). 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-Indexmaps 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:
- a future provided with list of events
-
registerService
public Future<Void> registerService(ServiceOptions serviceOptions)
Adds a new service, with an optional health check, to the local agent.- Parameters:
serviceOptions- the options of new service- Returns:
- a future notified when complete
-
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:
- a future notified when complete
-
maintenanceService
public Future<Void> maintenanceService(MaintenanceOptions maintenanceOptions)
Places a given service into "maintenance mode"- Parameters:
maintenanceOptions- the maintenance options- Returns:
- a future notified when complete
-
rxMaintenanceService
public io.reactivex.Completable rxMaintenanceService(MaintenanceOptions maintenanceOptions)
Places a given service into "maintenance mode"- Parameters:
maintenanceOptions- the maintenance options- Returns:
- a future notified when complete
-
deregisterService
public Future<Void> 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:
- a future notified when complete
-
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:
- a future notified when complete
-
catalogServiceNodes
public Future<ServiceList> catalogServiceNodes(String service)
Returns the nodes providing a service- Parameters:
service- name of service- Returns:
- a future provided with list of nodes providing given service
-
rxCatalogServiceNodes
public io.reactivex.Single<ServiceList> rxCatalogServiceNodes(String service)
Returns the nodes providing a service- Parameters:
service- name of service- Returns:
- a future provided with list of nodes providing given service
-
catalogServiceNodesWithOptions
public Future<ServiceList> catalogServiceNodesWithOptions(String service, ServiceQueryOptions options)
Returns the nodes providing a service- Parameters:
service- name of serviceoptions- options used to request services- Returns:
- a future provided with list of nodes providing given service
-
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:
- a future provided with list of nodes providing given service
-
catalogDatacenters
public Future<List<String>> catalogDatacenters()
Return all the datacenters that are known by the Consul server- Returns:
- a future provided with list of datacenters
-
rxCatalogDatacenters
public io.reactivex.Single<List<String>> rxCatalogDatacenters()
Return all the datacenters that are known by the Consul server- Returns:
- a future provided with list of datacenters
-
catalogNodes
public Future<NodeList> catalogNodes()
Returns the nodes registered in a datacenter- Returns:
- a future provided with list of nodes
-
rxCatalogNodes
public io.reactivex.Single<NodeList> rxCatalogNodes()
Returns the nodes registered in a datacenter- Returns:
- a future provided with list of nodes
-
catalogNodesWithOptions
public Future<NodeList> catalogNodesWithOptions(NodeQueryOptions options)
Returns the nodes registered in a datacenter- Parameters:
options- options used to request nodes- Returns:
- a future provided with list of nodes
-
rxCatalogNodesWithOptions
public io.reactivex.Single<NodeList> rxCatalogNodesWithOptions(NodeQueryOptions options)
Returns the nodes registered in a datacenter- Parameters:
options- options used to request nodes- Returns:
- a future provided with list of nodes
-
healthChecks
public Future<CheckList> healthChecks(String service)
Returns the checks associated with the service- Parameters:
service- the service name- Returns:
- a future provided with list of checks
-
rxHealthChecks
public io.reactivex.Single<CheckList> rxHealthChecks(String service)
Returns the checks associated with the service- Parameters:
service- the service name- Returns:
- a future provided with list of checks
-
healthChecksWithOptions
public Future<CheckList> healthChecksWithOptions(String service, CheckQueryOptions options)
Returns the checks associated with the service- Parameters:
service- the service nameoptions- options used to request checks- Returns:
- a future provided with list of checks
-
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:
- a future provided with list of checks
-
healthState
public Future<CheckList> healthState(HealthState healthState)
Returns the checks in the specified status- Parameters:
healthState- the health state- Returns:
- a future provided with list of checks
-
rxHealthState
public io.reactivex.Single<CheckList> rxHealthState(HealthState healthState)
Returns the checks in the specified status- Parameters:
healthState- the health state- Returns:
- a future provided with list of checks
-
healthStateWithOptions
public Future<CheckList> healthStateWithOptions(HealthState healthState, CheckQueryOptions options)
Returns the checks in the specified status- Parameters:
healthState- the health stateoptions- options used to request checks- Returns:
- a future provided with list of checks
-
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:
- a future provided with list of checks
-
healthServiceNodes
public Future<ServiceEntryList> healthServiceNodes(String service, boolean passing)
Returns the nodes providing the service. This endpoint is very similar to thecatalogServiceNodes(java.lang.String)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:
- a future provided with list of services
-
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)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:
- a future provided with list of services
-
healthServiceNodesWithOptions
public Future<ServiceEntryList> 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)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:
- a future provided with list of services
-
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)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:
- a future provided with list of services
-
healthNodesWithOptions
public Future<CheckList> 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 Future<ServiceList> catalogServices()
Returns the services registered in a datacenter- Returns:
- a future provided with list of services
-
rxCatalogServices
public io.reactivex.Single<ServiceList> rxCatalogServices()
Returns the services registered in a datacenter- Returns:
- a future provided with list of services
-
catalogServicesWithOptions
public Future<ServiceList> catalogServicesWithOptions(BlockingQueryOptions options)
Returns the services registered in a datacenter This is blocking query unlikecatalogServices()- Parameters:
options- the blocking options- Returns:
- a future provided with list of services
-
rxCatalogServicesWithOptions
public io.reactivex.Single<ServiceList> rxCatalogServicesWithOptions(BlockingQueryOptions options)
Returns the services registered in a datacenter This is blocking query unlikecatalogServices()- Parameters:
options- the blocking options- Returns:
- a future provided with list of services
-
catalogNodeServices
public Future<ServiceList> catalogNodeServices(String node)
Returns the node's registered services- Parameters:
node- node name- Returns:
- a future provided with list of services
-
rxCatalogNodeServices
public io.reactivex.Single<ServiceList> rxCatalogNodeServices(String node)
Returns the node's registered services- Parameters:
node- node name- Returns:
- a future provided with list of services
-
catalogNodeServicesWithOptions
public Future<ServiceList> catalogNodeServicesWithOptions(String node, BlockingQueryOptions options)
Returns the node's registered services This is blocking query unlikecatalogNodeServices(java.lang.String)- Parameters:
node- node nameoptions- the blocking options- Returns:
- a future provided with list of services
-
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)- Parameters:
node- node nameoptions- the blocking options- Returns:
- a future provided with list of services
-
localServices
public Future<List<Service>> localServices()
Returns list of services registered with the local agent.- Returns:
- a future provided with list of services
-
rxLocalServices
public io.reactivex.Single<List<Service>> rxLocalServices()
Returns list of services registered with the local agent.- Returns:
- a future provided with list of services
-
localChecks
public Future<List<Check>> localChecks()
Return all the checks that are registered with the local agent.- Returns:
- a future provided with list of checks
-
rxLocalChecks
public io.reactivex.Single<List<Check>> rxLocalChecks()
Return all the checks that are registered with the local agent.- Returns:
- a future provided with list of checks
-
registerCheck
public Future<Void> 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:
- a future notified when complete
-
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:
- a future notified when complete
-
deregisterCheck
public Future<Void> 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:
- a future notified when complete
-
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:
- a future notified when complete
-
passCheck
public Future<Void> 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:
- a future notified when complete
-
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:
- a future notified when complete
-
passCheckWithNote
public Future<Void> 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'sOutputfield.- Returns:
- a future notified when complete
-
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'sOutputfield.- Returns:
- a future notified when complete
-
warnCheck
public Future<Void> 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:
- a future notified when complete
-
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:
- a future notified when complete
-
warnCheckWithNote
public Future<Void> 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'sOutputfield.- Returns:
- a future notified when complete
-
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'sOutputfield.- Returns:
- a future notified when complete
-
failCheck
public Future<Void> 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:
- a future notified when complete
-
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:
- a future notified when complete
-
failCheckWithNote
public Future<Void> 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'sOutputfield.- Returns:
- a future notified when complete
-
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'sOutputfield.- Returns:
- a future notified when complete
-
updateCheck
public Future<Void> 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:
- a future notified when complete
-
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:
- a future notified when complete
-
updateCheckWithNote
public Future<Void> 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'sOutputfield.- Returns:
- a future notified when complete
-
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'sOutputfield.- Returns:
- a future notified when complete
-
leaderStatus
public Future<String> 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:
- a future provided with address of cluster leader
-
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:
- a future provided with address of cluster leader
-
peersStatus
public Future<List<String>> 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:
- a future provided with list of peers
-
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:
- a future provided with list of peers
-
createSession
public Future<String> createSession()
Initialize a new session- Returns:
- a future provided with ID of new session
-
rxCreateSession
public io.reactivex.Single<String> rxCreateSession()
Initialize a new session- Returns:
- a future provided with ID of new session
-
createSessionWithOptions
public Future<String> createSessionWithOptions(SessionOptions options)
Initialize a new session- Parameters:
options- options used to create session- Returns:
- a future provided with ID of new session
-
rxCreateSessionWithOptions
public io.reactivex.Single<String> rxCreateSessionWithOptions(SessionOptions options)
Initialize a new session- Parameters:
options- options used to create session- Returns:
- a future provided with ID of new session
-
infoSession
public Future<Session> infoSession(String id)
Returns the requested session information- Parameters:
id- the ID of requested session- Returns:
- a future provided with info of requested session
-
rxInfoSession
public io.reactivex.Single<Session> rxInfoSession(String id)
Returns the requested session information- Parameters:
id- the ID of requested session- Returns:
- a future provided with info of requested session
-
infoSessionWithOptions
public Future<Session> infoSessionWithOptions(String id, BlockingQueryOptions options)
Returns the requested session information This is blocking query unlikeinfoSession(java.lang.String)- Parameters:
id- the ID of requested sessionoptions- the blocking options- Returns:
- a future provided with info of requested session
-
rxInfoSessionWithOptions
public io.reactivex.Single<Session> rxInfoSessionWithOptions(String id, BlockingQueryOptions options)
Returns the requested session information This is blocking query unlikeinfoSession(java.lang.String)- Parameters:
id- the ID of requested sessionoptions- the blocking options- Returns:
- a future provided with info of requested session
-
renewSession
public Future<Session> 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:
- a future provided with info of renewed session
-
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:
- a future provided with info of renewed session
-
listSessions
public Future<SessionList> listSessions()
Returns the active sessions- Returns:
- a future provided with list of sessions
-
rxListSessions
public io.reactivex.Single<SessionList> rxListSessions()
Returns the active sessions- Returns:
- a future provided with list of sessions
-
listSessionsWithOptions
public Future<SessionList> listSessionsWithOptions(BlockingQueryOptions options)
Returns the active sessions This is blocking query unlikelistSessions()- Parameters:
options- the blocking options- Returns:
- a future provided with list of sessions
-
rxListSessionsWithOptions
public io.reactivex.Single<SessionList> rxListSessionsWithOptions(BlockingQueryOptions options)
Returns the active sessions This is blocking query unlikelistSessions()- Parameters:
options- the blocking options- Returns:
- a future provided with list of sessions
-
listNodeSessions
public Future<SessionList> listNodeSessions(String nodeId)
Returns the active sessions for a given node- Parameters:
nodeId- the ID of node- Returns:
- a future provided with list of sessions
-
rxListNodeSessions
public io.reactivex.Single<SessionList> rxListNodeSessions(String nodeId)
Returns the active sessions for a given node- Parameters:
nodeId- the ID of node- Returns:
- a future provided with list of sessions
-
listNodeSessionsWithOptions
public Future<SessionList> listNodeSessionsWithOptions(String nodeId, BlockingQueryOptions options)
Returns the active sessions for a given node This is blocking query unlikelistNodeSessions(java.lang.String)- Parameters:
nodeId- the ID of nodeoptions- the blocking options- Returns:
- a future provided with list of sessions
-
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)- Parameters:
nodeId- the ID of nodeoptions- the blocking options- Returns:
- a future provided with list of sessions
-
destroySession
public Future<Void> destroySession(String id)
Destroys the given session- Parameters:
id- the ID of session- Returns:
- a future notified when complete
-
rxDestroySession
public io.reactivex.Completable rxDestroySession(String id)
Destroys the given session- Parameters:
id- the ID of session- Returns:
- a future notified when complete
-
createPreparedQuery
public Future<String> createPreparedQuery(PreparedQueryDefinition definition)
- Parameters:
definition- definition of the prepare query- Returns:
- a future provided with id of created prepare query
-
rxCreatePreparedQuery
public io.reactivex.Single<String> rxCreatePreparedQuery(PreparedQueryDefinition definition)
- Parameters:
definition- definition of the prepare query- Returns:
- a future provided with id of created prepare query
-
getPreparedQuery
public Future<PreparedQueryDefinition> getPreparedQuery(String id)
Returns an existing prepared query- Parameters:
id- the id of the query to read- Returns:
- a future provided with definition of the prepare query
-
rxGetPreparedQuery
public io.reactivex.Single<PreparedQueryDefinition> rxGetPreparedQuery(String id)
Returns an existing prepared query- Parameters:
id- the id of the query to read- Returns:
- a future provided with definition of the prepare query
-
getAllPreparedQueries
public Future<List<PreparedQueryDefinition>> getAllPreparedQueries()
Returns a list of all prepared queries.- Returns:
- a future provided with list of definitions of the all prepare queries
-
rxGetAllPreparedQueries
public io.reactivex.Single<List<PreparedQueryDefinition>> rxGetAllPreparedQueries()
Returns a list of all prepared queries.- Returns:
- a future provided with list of definitions of the all prepare queries
-
updatePreparedQuery
public Future<Void> updatePreparedQuery(PreparedQueryDefinition definition)
- Parameters:
definition- definition of the prepare query- Returns:
- a future notified when complete
-
rxUpdatePreparedQuery
public io.reactivex.Completable rxUpdatePreparedQuery(PreparedQueryDefinition definition)
- Parameters:
definition- definition of the prepare query- Returns:
- a future notified when complete
-
deletePreparedQuery
public Future<Void> deletePreparedQuery(String id)
Deletes an existing prepared query- Parameters:
id- the id of the query to delete- Returns:
- a future notified when complete
-
rxDeletePreparedQuery
public io.reactivex.Completable rxDeletePreparedQuery(String id)
Deletes an existing prepared query- Parameters:
id- the id of the query to delete- Returns:
- a future notified when complete
-
executePreparedQuery
public Future<PreparedQueryExecuteResponse> 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:
- a future provided with response
-
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:
- a future provided with response
-
executePreparedQueryWithOptions
public Future<PreparedQueryExecuteResponse> 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:
- a future provided with response
-
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:
- a future provided with response
-
registerCatalogService
public Future<Void> registerCatalogService(Node nodeOptions, ServiceOptions serviceOptions)
Register node with external service- Parameters:
nodeOptions- the options of new nodeserviceOptions- the options of new service- Returns:
- a future provided with response
-
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:
- a future provided with response
-
deregisterCatalogService
public Future<Void> 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:
- a future notified when complete
-
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:
- a future notified when complete
-
close
public void close()
Close the client and release its resources
-
newInstance
public static ConsulClient newInstance(ConsulClient arg)
-
-