Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<ConsulClient> |
__TYPE_ARG |
Constructor and Description |
---|
ConsulClient(ConsulClient delegate) |
ConsulClient(Object delegate) |
Modifier and Type | Method and Description |
---|---|
Single<JsonObject> |
agentInfo()
Returns the configuration and member information of the local agent
|
Single<List<String>> |
catalogDatacenters()
Return all the datacenters that are known by the Consul server
|
Single<NodeList> |
catalogNodes()
Returns the nodes registered in a datacenter
|
Single<ServiceList> |
catalogNodeServices(String node)
Returns the node's registered services
|
Single<ServiceList> |
catalogNodeServicesWithOptions(String node,
BlockingQueryOptions options)
Returns the node's registered services
This is blocking query unlike
catalogNodeServices(java.lang.String) |
Single<NodeList> |
catalogNodesWithOptions(NodeQueryOptions options)
Returns the nodes registered in a datacenter
|
Single<ServiceList> |
catalogServiceNodes(String service)
Returns the nodes providing a service
|
Single<ServiceList> |
catalogServiceNodesWithOptions(String service,
ServiceQueryOptions options)
Returns the nodes providing a service
|
Single<ServiceList> |
catalogServices()
Returns the services registered in a datacenter
|
Single<ServiceList> |
catalogServicesWithOptions(BlockingQueryOptions options)
Returns the services registered in a datacenter
This is blocking query unlike
catalogServices() |
Single<String> |
cloneAclToken(String id)
Clone Acl token
|
void |
close()
Close the client and release its resources
|
Single<List<DcCoordinates>> |
coordinateDatacenters()
Returns the WAN network coordinates for all Consul servers, organized by DCs
|
Single<CoordinateList> |
coordinateNodes()
Returns the LAN network coordinates for all nodes in a given DC
|
Single<CoordinateList> |
coordinateNodesWithOptions(BlockingQueryOptions options)
Returns the LAN network coordinates for all nodes in a given DC
This is blocking query unlike
coordinateNodes() |
static ConsulClient |
create(Vertx vertx)
Create a Consul client with default options.
|
static ConsulClient |
create(Vertx vertx,
ConsulClientOptions options)
Create a Consul client.
|
Single<String> |
createAclToken(AclToken token)
Create new Acl token
|
Single<String> |
createPreparedQuery(PreparedQueryDefinition definition) |
Single<String> |
createSession()
Initialize a new session
|
Single<String> |
createSessionWithOptions(SessionOptions options)
Initialize a new session
|
Completable |
deletePreparedQuery(String id)
Deletes an existing prepared query
|
Completable |
deleteValue(String key)
Remove the key/value pair that corresponding to the specified key
|
Completable |
deleteValues(String keyPrefix)
Removes all the key/value pair that corresponding to the specified key prefix
|
Completable |
deregisterCatalogService(String nodeId,
String serviceId)
Deregister entities from the node or deregister the node itself.
|
Completable |
deregisterCheck(String checkId)
Remove a check from the local agent.
|
Completable |
deregisterService(String id)
Remove a service from the local agent.
|
Completable |
destroyAclToken(String id)
Destroy Acl token
|
Completable |
destroySession(String id)
Destroys the given session
|
boolean |
equals(Object o) |
Single<PreparedQueryExecuteResponse> |
executePreparedQuery(String query)
Executes an existing prepared query.
|
Single<PreparedQueryExecuteResponse> |
executePreparedQueryWithOptions(String query,
PreparedQueryExecuteOptions options)
Executes an existing prepared query.
|
Completable |
failCheck(String checkId)
Set status of the check to "critical".
|
Completable |
failCheckWithNote(String checkId,
String note)
Set status of the check to "critical".
|
Single<Event> |
fireEvent(String name)
Fires a new user event
|
Single<Event> |
fireEventWithOptions(String name,
EventOptions options)
Fires a new user event
|
Single<List<PreparedQueryDefinition>> |
getAllPreparedQueries()
Returns a list of all prepared queries.
|
ConsulClient |
getDelegate() |
Single<List<String>> |
getKeys(String keyPrefix)
Returns the list of keys that corresponding to the specified key prefix.
|
Single<List<String>> |
getKeysWithOptions(String keyPrefix,
BlockingQueryOptions options)
Returns the list of keys that corresponding to the specified key prefix.
|
Single<PreparedQueryDefinition> |
getPreparedQuery(String id)
Returns an existing prepared query
|
Single<KeyValue> |
getValue(String key)
Returns key/value pair that corresponding to the specified key.
|
Single<KeyValueList> |
getValues(String keyPrefix)
Returns the list of key/value pairs that corresponding to the specified key prefix.
|
Single<KeyValueList> |
getValuesWithOptions(String keyPrefix,
BlockingQueryOptions options)
Returns the list of key/value pairs that corresponding to the specified key prefix.
|
Single<KeyValue> |
getValueWithOptions(String key,
BlockingQueryOptions options)
Returns key/value pair that corresponding to the specified key.
|
int |
hashCode() |
Single<CheckList> |
healthChecks(String service)
Returns the checks associated with the service
|
Single<CheckList> |
healthChecksWithOptions(String service,
CheckQueryOptions options)
Returns the checks associated with the service
|
Single<ServiceEntryList> |
healthServiceNodes(String service,
boolean passing)
Returns the nodes providing the service.
|
Single<ServiceEntryList> |
healthServiceNodesWithOptions(String service,
boolean passing,
ServiceQueryOptions options)
Returns the nodes providing the service.
|
Single<CheckList> |
healthState(HealthState healthState)
Returns the checks in the specified status
|
Single<CheckList> |
healthStateWithOptions(HealthState healthState,
CheckQueryOptions options)
Returns the checks in the specified status
|
Single<AclToken> |
infoAclToken(String id)
Get info of Acl token
|
Single<Session> |
infoSession(String id)
Returns the requested session information
|
Single<Session> |
infoSessionWithOptions(String id,
BlockingQueryOptions options)
Returns the requested session information
This is blocking query unlike
infoSession(java.lang.String) |
Single<String> |
leaderStatus()
Get the Raft leader for the datacenter in which the agent is running.
|
Single<List<AclToken>> |
listAclTokens()
Get list of Acl token
|
Single<EventList> |
listEvents()
Returns the most recent events known by the agent
|
Single<EventList> |
listEventsWithOptions(EventListOptions options)
Returns the most recent events known by the agent.
|
Single<SessionList> |
listNodeSessions(String nodeId)
Returns the active sessions for a given node
|
Single<SessionList> |
listNodeSessionsWithOptions(String nodeId,
BlockingQueryOptions options)
Returns the active sessions for a given node
This is blocking query unlike
listNodeSessions(java.lang.String) |
Single<SessionList> |
listSessions()
Returns the active sessions
|
Single<SessionList> |
listSessionsWithOptions(BlockingQueryOptions options)
Returns the active sessions
This is blocking query unlike
listSessions() |
Single<List<Check>> |
localChecks()
Return all the checks that are registered with the local agent.
|
Single<List<Service>> |
localServices()
Returns list of services registered with the local agent.
|
Completable |
maintenanceService(MaintenanceOptions maintenanceOptions)
Places a given service into "maintenance mode"
|
static ConsulClient |
newInstance(ConsulClient arg) |
Completable |
passCheck(String checkId)
Set status of the check to "passing".
|
Completable |
passCheckWithNote(String checkId,
String note)
Set status of the check to "passing".
|
Single<List<String>> |
peersStatus()
Retrieves the Raft peers for the datacenter in which the the agent is running.
|
Single<Boolean> |
putValue(String key,
String value)
Adds specified key/value pair
|
Single<Boolean> |
putValueWithOptions(String key,
String value,
KeyValueOptions options) |
Completable |
registerCatalogService(Node nodeOptions,
ServiceOptions serviceOptions)
Register node with external service
|
Completable |
registerCheck(CheckOptions checkOptions)
Add a new check to the local agent.
|
Completable |
registerService(ServiceOptions serviceOptions)
Adds a new service, with an optional health check, to the local agent.
|
Single<Session> |
renewSession(String id)
Renews the given session.
|
Single<JsonObject> |
rxAgentInfo()
Returns the configuration and member information of the local agent
|
Single<List<String>> |
rxCatalogDatacenters()
Return all the datacenters that are known by the Consul server
|
Single<NodeList> |
rxCatalogNodes()
Returns the nodes registered in a datacenter
|
Single<ServiceList> |
rxCatalogNodeServices(String node)
Returns the node's registered services
|
Single<ServiceList> |
rxCatalogNodeServicesWithOptions(String node,
BlockingQueryOptions options)
Returns the node's registered services
This is blocking query unlike
catalogNodeServices(java.lang.String) |
Single<NodeList> |
rxCatalogNodesWithOptions(NodeQueryOptions options)
Returns the nodes registered in a datacenter
|
Single<ServiceList> |
rxCatalogServiceNodes(String service)
Returns the nodes providing a service
|
Single<ServiceList> |
rxCatalogServiceNodesWithOptions(String service,
ServiceQueryOptions options)
Returns the nodes providing a service
|
Single<ServiceList> |
rxCatalogServices()
Returns the services registered in a datacenter
|
Single<ServiceList> |
rxCatalogServicesWithOptions(BlockingQueryOptions options)
Returns the services registered in a datacenter
This is blocking query unlike
catalogServices() |
Single<String> |
rxCloneAclToken(String id)
Clone Acl token
|
Single<List<DcCoordinates>> |
rxCoordinateDatacenters()
Returns the WAN network coordinates for all Consul servers, organized by DCs
|
Single<CoordinateList> |
rxCoordinateNodes()
Returns the LAN network coordinates for all nodes in a given DC
|
Single<CoordinateList> |
rxCoordinateNodesWithOptions(BlockingQueryOptions options)
Returns the LAN network coordinates for all nodes in a given DC
This is blocking query unlike
coordinateNodes() |
Single<String> |
rxCreateAclToken(AclToken token)
Create new Acl token
|
Single<String> |
rxCreatePreparedQuery(PreparedQueryDefinition definition) |
Single<String> |
rxCreateSession()
Initialize a new session
|
Single<String> |
rxCreateSessionWithOptions(SessionOptions options)
Initialize a new session
|
Completable |
rxDeletePreparedQuery(String id)
Deletes an existing prepared query
|
Completable |
rxDeleteValue(String key)
Remove the key/value pair that corresponding to the specified key
|
Completable |
rxDeleteValues(String keyPrefix)
Removes all the key/value pair that corresponding to the specified key prefix
|
Completable |
rxDeregisterCatalogService(String nodeId,
String serviceId)
Deregister entities from the node or deregister the node itself.
|
Completable |
rxDeregisterCheck(String checkId)
Remove a check from the local agent.
|
Completable |
rxDeregisterService(String id)
Remove a service from the local agent.
|
Completable |
rxDestroyAclToken(String id)
Destroy Acl token
|
Completable |
rxDestroySession(String id)
Destroys the given session
|
Single<PreparedQueryExecuteResponse> |
rxExecutePreparedQuery(String query)
Executes an existing prepared query.
|
Single<PreparedQueryExecuteResponse> |
rxExecutePreparedQueryWithOptions(String query,
PreparedQueryExecuteOptions options)
Executes an existing prepared query.
|
Completable |
rxFailCheck(String checkId)
Set status of the check to "critical".
|
Completable |
rxFailCheckWithNote(String checkId,
String note)
Set status of the check to "critical".
|
Single<Event> |
rxFireEvent(String name)
Fires a new user event
|
Single<Event> |
rxFireEventWithOptions(String name,
EventOptions options)
Fires a new user event
|
Single<List<PreparedQueryDefinition>> |
rxGetAllPreparedQueries()
Returns a list of all prepared queries.
|
Single<List<String>> |
rxGetKeys(String keyPrefix)
Returns the list of keys that corresponding to the specified key prefix.
|
Single<List<String>> |
rxGetKeysWithOptions(String keyPrefix,
BlockingQueryOptions options)
Returns the list of keys that corresponding to the specified key prefix.
|
Single<PreparedQueryDefinition> |
rxGetPreparedQuery(String id)
Returns an existing prepared query
|
Single<KeyValue> |
rxGetValue(String key)
Returns key/value pair that corresponding to the specified key.
|
Single<KeyValueList> |
rxGetValues(String keyPrefix)
Returns the list of key/value pairs that corresponding to the specified key prefix.
|
Single<KeyValueList> |
rxGetValuesWithOptions(String keyPrefix,
BlockingQueryOptions options)
Returns the list of key/value pairs that corresponding to the specified key prefix.
|
Single<KeyValue> |
rxGetValueWithOptions(String key,
BlockingQueryOptions options)
Returns key/value pair that corresponding to the specified key.
|
Single<CheckList> |
rxHealthChecks(String service)
Returns the checks associated with the service
|
Single<CheckList> |
rxHealthChecksWithOptions(String service,
CheckQueryOptions options)
Returns the checks associated with the service
|
Single<ServiceEntryList> |
rxHealthServiceNodes(String service,
boolean passing)
Returns the nodes providing the service.
|
Single<ServiceEntryList> |
rxHealthServiceNodesWithOptions(String service,
boolean passing,
ServiceQueryOptions options)
Returns the nodes providing the service.
|
Single<CheckList> |
rxHealthState(HealthState healthState)
Returns the checks in the specified status
|
Single<CheckList> |
rxHealthStateWithOptions(HealthState healthState,
CheckQueryOptions options)
Returns the checks in the specified status
|
Single<AclToken> |
rxInfoAclToken(String id)
Get info of Acl token
|
Single<Session> |
rxInfoSession(String id)
Returns the requested session information
|
Single<Session> |
rxInfoSessionWithOptions(String id,
BlockingQueryOptions options)
Returns the requested session information
This is blocking query unlike
infoSession(java.lang.String) |
Single<String> |
rxLeaderStatus()
Get the Raft leader for the datacenter in which the agent is running.
|
Single<List<AclToken>> |
rxListAclTokens()
Get list of Acl token
|
Single<EventList> |
rxListEvents()
Returns the most recent events known by the agent
|
Single<EventList> |
rxListEventsWithOptions(EventListOptions options)
Returns the most recent events known by the agent.
|
Single<SessionList> |
rxListNodeSessions(String nodeId)
Returns the active sessions for a given node
|
Single<SessionList> |
rxListNodeSessionsWithOptions(String nodeId,
BlockingQueryOptions options)
Returns the active sessions for a given node
This is blocking query unlike
listNodeSessions(java.lang.String) |
Single<SessionList> |
rxListSessions()
Returns the active sessions
|
Single<SessionList> |
rxListSessionsWithOptions(BlockingQueryOptions options)
Returns the active sessions
This is blocking query unlike
listSessions() |
Single<List<Check>> |
rxLocalChecks()
Return all the checks that are registered with the local agent.
|
Single<List<Service>> |
rxLocalServices()
Returns list of services registered with the local agent.
|
Completable |
rxMaintenanceService(MaintenanceOptions maintenanceOptions)
Places a given service into "maintenance mode"
|
Completable |
rxPassCheck(String checkId)
Set status of the check to "passing".
|
Completable |
rxPassCheckWithNote(String checkId,
String note)
Set status of the check to "passing".
|
Single<List<String>> |
rxPeersStatus()
Retrieves the Raft peers for the datacenter in which the the agent is running.
|
Single<Boolean> |
rxPutValue(String key,
String value)
Adds specified key/value pair
|
Single<Boolean> |
rxPutValueWithOptions(String key,
String value,
KeyValueOptions options) |
Completable |
rxRegisterCatalogService(Node nodeOptions,
ServiceOptions serviceOptions)
Register node with external service
|
Completable |
rxRegisterCheck(CheckOptions checkOptions)
Add a new check to the local agent.
|
Completable |
rxRegisterService(ServiceOptions serviceOptions)
Adds a new service, with an optional health check, to the local agent.
|
Single<Session> |
rxRenewSession(String id)
Renews the given session.
|
Single<TxnResponse> |
rxTransaction(TxnRequest request)
Manages multiple operations inside a single, atomic transaction.
|
Single<String> |
rxUpdateAclToken(AclToken token)
Update Acl token
|
Completable |
rxUpdateCheck(String checkId,
CheckStatus status)
Set status of the check to given status.
|
Completable |
rxUpdateCheckWithNote(String checkId,
CheckStatus status,
String note)
Set status of the check to given status.
|
Completable |
rxUpdatePreparedQuery(PreparedQueryDefinition definition) |
Completable |
rxWarnCheck(String checkId)
Set status of the check to "warning".
|
Completable |
rxWarnCheckWithNote(String checkId,
String note)
Set status of the check to "warning".
|
String |
toString() |
Single<TxnResponse> |
transaction(TxnRequest request)
Manages multiple operations inside a single, atomic transaction.
|
Single<String> |
updateAclToken(AclToken token)
Update Acl token
|
Completable |
updateCheck(String checkId,
CheckStatus status)
Set status of the check to given status.
|
Completable |
updateCheckWithNote(String checkId,
CheckStatus status,
String note)
Set status of the check to given status.
|
Completable |
updatePreparedQuery(PreparedQueryDefinition definition) |
Completable |
warnCheck(String checkId)
Set status of the check to "warning".
|
Completable |
warnCheckWithNote(String checkId,
String note)
Set status of the check to "warning".
|
public static final io.vertx.lang.rx.TypeArg<ConsulClient> __TYPE_ARG
public ConsulClient(ConsulClient delegate)
public ConsulClient(Object delegate)
public ConsulClient getDelegate()
public static ConsulClient create(Vertx vertx)
vertx
- the Vert.x instancepublic static ConsulClient create(Vertx vertx, ConsulClientOptions options)
vertx
- the Vert.x instanceoptions
- the optionspublic Single<JsonObject> agentInfo()
public Single<JsonObject> rxAgentInfo()
public Single<CoordinateList> coordinateNodes()
public Single<CoordinateList> rxCoordinateNodes()
public Single<CoordinateList> coordinateNodesWithOptions(BlockingQueryOptions options)
coordinateNodes()
options
- the blocking optionspublic Single<CoordinateList> rxCoordinateNodesWithOptions(BlockingQueryOptions options)
coordinateNodes()
options
- the blocking optionspublic Single<List<DcCoordinates>> coordinateDatacenters()
public Single<List<DcCoordinates>> rxCoordinateDatacenters()
public Single<List<String>> getKeys(String keyPrefix)
keyPrefix
- the prefixpublic Single<List<String>> rxGetKeys(String keyPrefix)
keyPrefix
- the prefixpublic Single<List<String>> getKeysWithOptions(String keyPrefix, BlockingQueryOptions options)
keyPrefix
- the prefixoptions
- the blocking optionspublic Single<List<String>> rxGetKeysWithOptions(String keyPrefix, BlockingQueryOptions options)
keyPrefix
- the prefixoptions
- the blocking optionspublic Single<KeyValue> getValue(String key)
KeyValue
object will be returned if no such key is found.key
- the keypublic Single<KeyValue> rxGetValue(String key)
KeyValue
object will be returned if no such key is found.key
- the keypublic Single<KeyValue> getValueWithOptions(String key, BlockingQueryOptions options)
KeyValue
object will be returned if no such key is found.
This is blocking query unlike getValue(java.lang.String)
key
- the keyoptions
- the blocking optionspublic Single<KeyValue> rxGetValueWithOptions(String key, BlockingQueryOptions options)
KeyValue
object will be returned if no such key is found.
This is blocking query unlike getValue(java.lang.String)
key
- the keyoptions
- the blocking optionspublic Completable deleteValue(String key)
key
- the keypublic Completable rxDeleteValue(String key)
key
- the keypublic Single<KeyValueList> getValues(String keyPrefix)
KeyValueList
object will be returned if no such key prefix is found.keyPrefix
- the prefixpublic Single<KeyValueList> rxGetValues(String keyPrefix)
KeyValueList
object will be returned if no such key prefix is found.keyPrefix
- the prefixpublic Single<KeyValueList> getValuesWithOptions(String keyPrefix, BlockingQueryOptions options)
KeyValueList
object will be returned if no such key prefix is found.
This is blocking query unlike getValues(java.lang.String)
keyPrefix
- the prefixoptions
- the blocking optionspublic Single<KeyValueList> rxGetValuesWithOptions(String keyPrefix, BlockingQueryOptions options)
KeyValueList
object will be returned if no such key prefix is found.
This is blocking query unlike getValues(java.lang.String)
keyPrefix
- the prefixoptions
- the blocking optionspublic Completable deleteValues(String keyPrefix)
keyPrefix
- the prefixpublic Completable rxDeleteValues(String keyPrefix)
keyPrefix
- the prefixpublic Single<Boolean> putValue(String key, String value)
key
- the keyvalue
- the valuepublic Single<Boolean> rxPutValue(String key, String value)
key
- the keyvalue
- the valuepublic Single<Boolean> putValueWithOptions(String key, String value, KeyValueOptions options)
key
- the keyvalue
- the valueoptions
- options used to push pairpublic Single<Boolean> rxPutValueWithOptions(String key, String value, KeyValueOptions options)
key
- the keyvalue
- the valueoptions
- options used to push pairpublic Single<TxnResponse> transaction(TxnRequest request)
request
- transaction requestpublic Single<TxnResponse> rxTransaction(TxnRequest request)
request
- transaction requestpublic Single<String> createAclToken(AclToken token)
token
- properties of the tokenpublic Single<String> rxCreateAclToken(AclToken token)
token
- properties of the tokenpublic Single<String> updateAclToken(AclToken token)
token
- properties of the token to be updatedpublic Single<String> rxUpdateAclToken(AclToken token)
token
- properties of the token to be updatedpublic Single<String> cloneAclToken(String id)
id
- the ID of token to be clonedpublic Single<String> rxCloneAclToken(String id)
id
- the ID of token to be clonedpublic Single<List<AclToken>> listAclTokens()
public Single<List<AclToken>> rxListAclTokens()
public Single<AclToken> infoAclToken(String id)
id
- the ID of tokenpublic Single<AclToken> rxInfoAclToken(String id)
id
- the ID of tokenpublic Completable destroyAclToken(String id)
id
- the ID of tokenpublic Completable rxDestroyAclToken(String id)
id
- the ID of tokenpublic Single<Event> fireEvent(String name)
name
- name of eventpublic Single<Event> rxFireEvent(String name)
name
- name of eventpublic Single<Event> fireEventWithOptions(String name, EventOptions options)
name
- name of eventoptions
- options used to create eventpublic Single<Event> rxFireEventWithOptions(String name, EventOptions options)
name
- name of eventoptions
- options used to create eventpublic Single<EventList> listEvents()
public Single<EventList> rxListEvents()
public Single<EventList> listEventsWithOptions(EventListOptions options)
listEvents()
. However, the semantics of this endpoint
are slightly different. Most blocking queries provide a monotonic index and block until a newer index is available.
This can be supported as a consequence of the total ordering of the consensus protocol. With gossip,
there is no ordering, and instead X-Consul-Index
maps to the newest event that matches the query.
In practice, this means the index is only useful when used against a single agent and has no meaning globally. Because Consul defines the index as being opaque, clients should not be expecting a natural ordering either.
options
- the blocking optionspublic Single<EventList> rxListEventsWithOptions(EventListOptions options)
listEvents()
. However, the semantics of this endpoint
are slightly different. Most blocking queries provide a monotonic index and block until a newer index is available.
This can be supported as a consequence of the total ordering of the consensus protocol. With gossip,
there is no ordering, and instead X-Consul-Index
maps to the newest event that matches the query.
In practice, this means the index is only useful when used against a single agent and has no meaning globally. Because Consul defines the index as being opaque, clients should not be expecting a natural ordering either.
options
- the blocking optionspublic Completable registerService(ServiceOptions serviceOptions)
serviceOptions
- the options of new servicepublic Completable rxRegisterService(ServiceOptions serviceOptions)
serviceOptions
- the options of new servicepublic Completable maintenanceService(MaintenanceOptions maintenanceOptions)
maintenanceOptions
- the maintenance optionspublic Completable rxMaintenanceService(MaintenanceOptions maintenanceOptions)
maintenanceOptions
- the maintenance optionspublic Completable deregisterService(String id)
id
- the ID of servicepublic Completable rxDeregisterService(String id)
id
- the ID of servicepublic Single<ServiceList> catalogServiceNodes(String service)
service
- name of servicepublic Single<ServiceList> rxCatalogServiceNodes(String service)
service
- name of servicepublic Single<ServiceList> catalogServiceNodesWithOptions(String service, ServiceQueryOptions options)
service
- name of serviceoptions
- options used to request servicespublic Single<ServiceList> rxCatalogServiceNodesWithOptions(String service, ServiceQueryOptions options)
service
- name of serviceoptions
- options used to request servicespublic Single<List<String>> catalogDatacenters()
public Single<List<String>> rxCatalogDatacenters()
public Single<NodeList> catalogNodes()
public Single<NodeList> rxCatalogNodes()
public Single<NodeList> catalogNodesWithOptions(NodeQueryOptions options)
options
- options used to request nodespublic Single<NodeList> rxCatalogNodesWithOptions(NodeQueryOptions options)
options
- options used to request nodespublic Single<CheckList> healthChecks(String service)
service
- the service namepublic Single<CheckList> rxHealthChecks(String service)
service
- the service namepublic Single<CheckList> healthChecksWithOptions(String service, CheckQueryOptions options)
service
- the service nameoptions
- options used to request checkspublic Single<CheckList> rxHealthChecksWithOptions(String service, CheckQueryOptions options)
service
- the service nameoptions
- options used to request checkspublic Single<CheckList> healthState(HealthState healthState)
healthState
- the health statepublic Single<CheckList> rxHealthState(HealthState healthState)
healthState
- the health statepublic Single<CheckList> healthStateWithOptions(HealthState healthState, CheckQueryOptions options)
healthState
- the health stateoptions
- options used to request checkspublic Single<CheckList> rxHealthStateWithOptions(HealthState healthState, CheckQueryOptions options)
healthState
- the health stateoptions
- options used to request checkspublic Single<ServiceEntryList> healthServiceNodes(String service, boolean passing)
catalogServiceNodes(java.lang.String)
endpoint;
however, this endpoint automatically returns the status of the associated health check as well as any system level health checks.service
- the service namepassing
- if true, filter results to only nodes with all checks in the passing statepublic Single<ServiceEntryList> rxHealthServiceNodes(String service, boolean passing)
catalogServiceNodes(java.lang.String)
endpoint;
however, this endpoint automatically returns the status of the associated health check as well as any system level health checks.service
- the service namepassing
- if true, filter results to only nodes with all checks in the passing statepublic Single<ServiceEntryList> healthServiceNodesWithOptions(String service, boolean passing, ServiceQueryOptions options)
catalogServiceNodesWithOptions(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.service
- the service namepassing
- if true, filter results to only nodes with all checks in the passing stateoptions
- options used to request servicespublic Single<ServiceEntryList> rxHealthServiceNodesWithOptions(String service, boolean passing, ServiceQueryOptions options)
catalogServiceNodesWithOptions(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.service
- the service namepassing
- if true, filter results to only nodes with all checks in the passing stateoptions
- options used to request servicespublic Single<ServiceList> catalogServices()
public Single<ServiceList> rxCatalogServices()
public Single<ServiceList> catalogServicesWithOptions(BlockingQueryOptions options)
catalogServices()
options
- the blocking optionspublic Single<ServiceList> rxCatalogServicesWithOptions(BlockingQueryOptions options)
catalogServices()
options
- the blocking optionspublic Single<ServiceList> catalogNodeServices(String node)
node
- node namepublic Single<ServiceList> rxCatalogNodeServices(String node)
node
- node namepublic Single<ServiceList> catalogNodeServicesWithOptions(String node, BlockingQueryOptions options)
catalogNodeServices(java.lang.String)
node
- node nameoptions
- the blocking optionspublic Single<ServiceList> rxCatalogNodeServicesWithOptions(String node, BlockingQueryOptions options)
catalogNodeServices(java.lang.String)
node
- node nameoptions
- the blocking optionspublic Single<List<Service>> localServices()
public Single<List<Service>> rxLocalServices()
public Single<List<Check>> localChecks()
public Single<List<Check>> rxLocalChecks()
public Completable registerCheck(CheckOptions checkOptions)
checkOptions
- options used to register new checkpublic Completable rxRegisterCheck(CheckOptions checkOptions)
checkOptions
- options used to register new checkpublic Completable deregisterCheck(String checkId)
checkId
- the ID of checkpublic Completable rxDeregisterCheck(String checkId)
checkId
- the ID of checkpublic Completable passCheck(String checkId)
checkId
- the ID of checkpublic Completable rxPassCheck(String checkId)
checkId
- the ID of checkpublic Completable passCheckWithNote(String checkId, String note)
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.public Completable rxPassCheckWithNote(String checkId, String note)
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.public Completable warnCheck(String checkId)
checkId
- the ID of checkpublic Completable rxWarnCheck(String checkId)
checkId
- the ID of checkpublic Completable warnCheckWithNote(String checkId, String note)
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.public Completable rxWarnCheckWithNote(String checkId, String note)
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.public Completable failCheck(String checkId)
checkId
- the ID of checkpublic Completable rxFailCheck(String checkId)
checkId
- the ID of checkpublic Completable failCheckWithNote(String checkId, String note)
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.public Completable rxFailCheckWithNote(String checkId, String note)
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.public Completable updateCheck(String checkId, CheckStatus status)
checkId
- the ID of checkstatus
- new status of checkpublic Completable rxUpdateCheck(String checkId, CheckStatus status)
checkId
- the ID of checkstatus
- new status of checkpublic Completable updateCheckWithNote(String checkId, CheckStatus status, String note)
checkId
- the ID of checkstatus
- new status of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.public Completable rxUpdateCheckWithNote(String checkId, CheckStatus status, String note)
checkId
- the ID of checkstatus
- new status of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.public Single<String> leaderStatus()
10.1.10.12:8300
"public Single<String> rxLeaderStatus()
10.1.10.12:8300
"public Single<List<String>> peersStatus()
10.1.10.12:8300
", "10.1.10.13:8300
"public Single<List<String>> rxPeersStatus()
10.1.10.12:8300
", "10.1.10.13:8300
"public Single<String> createSession()
public Single<String> rxCreateSession()
public Single<String> createSessionWithOptions(SessionOptions options)
options
- options used to create sessionpublic Single<String> rxCreateSessionWithOptions(SessionOptions options)
options
- options used to create sessionpublic Single<Session> infoSession(String id)
id
- the ID of requested sessionpublic Single<Session> rxInfoSession(String id)
id
- the ID of requested sessionpublic Single<Session> infoSessionWithOptions(String id, BlockingQueryOptions options)
infoSession(java.lang.String)
id
- the ID of requested sessionoptions
- the blocking optionspublic Single<Session> rxInfoSessionWithOptions(String id, BlockingQueryOptions options)
infoSession(java.lang.String)
id
- the ID of requested sessionoptions
- the blocking optionspublic Single<Session> renewSession(String id)
id
- the ID of session that should be renewedpublic Single<Session> rxRenewSession(String id)
id
- the ID of session that should be renewedpublic Single<SessionList> listSessions()
public Single<SessionList> rxListSessions()
public Single<SessionList> listSessionsWithOptions(BlockingQueryOptions options)
listSessions()
options
- the blocking optionspublic Single<SessionList> rxListSessionsWithOptions(BlockingQueryOptions options)
listSessions()
options
- the blocking optionspublic Single<SessionList> listNodeSessions(String nodeId)
nodeId
- the ID of nodepublic Single<SessionList> rxListNodeSessions(String nodeId)
nodeId
- the ID of nodepublic Single<SessionList> listNodeSessionsWithOptions(String nodeId, BlockingQueryOptions options)
listNodeSessions(java.lang.String)
nodeId
- the ID of nodeoptions
- the blocking optionspublic Single<SessionList> rxListNodeSessionsWithOptions(String nodeId, BlockingQueryOptions options)
listNodeSessions(java.lang.String)
nodeId
- the ID of nodeoptions
- the blocking optionspublic Completable destroySession(String id)
id
- the ID of sessionpublic Completable rxDestroySession(String id)
id
- the ID of sessionpublic Single<String> createPreparedQuery(PreparedQueryDefinition definition)
definition
- definition of the prepare querypublic Single<String> rxCreatePreparedQuery(PreparedQueryDefinition definition)
definition
- definition of the prepare querypublic Single<PreparedQueryDefinition> getPreparedQuery(String id)
id
- the id of the query to readpublic Single<PreparedQueryDefinition> rxGetPreparedQuery(String id)
id
- the id of the query to readpublic Single<List<PreparedQueryDefinition>> getAllPreparedQueries()
public Single<List<PreparedQueryDefinition>> rxGetAllPreparedQueries()
public Completable updatePreparedQuery(PreparedQueryDefinition definition)
definition
- definition of the prepare querypublic Completable rxUpdatePreparedQuery(PreparedQueryDefinition definition)
definition
- definition of the prepare querypublic Completable deletePreparedQuery(String id)
id
- the id of the query to deletepublic Completable rxDeletePreparedQuery(String id)
id
- the id of the query to deletepublic Single<PreparedQueryExecuteResponse> executePreparedQuery(String query)
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.public Single<PreparedQueryExecuteResponse> rxExecutePreparedQuery(String query)
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.public Single<PreparedQueryExecuteResponse> executePreparedQueryWithOptions(String query, PreparedQueryExecuteOptions options)
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 querypublic Single<PreparedQueryExecuteResponse> rxExecutePreparedQueryWithOptions(String query, PreparedQueryExecuteOptions options)
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 querypublic Completable registerCatalogService(Node nodeOptions, ServiceOptions serviceOptions)
nodeOptions
- the options of new nodeserviceOptions
- the options of new servicepublic Completable rxRegisterCatalogService(Node nodeOptions, ServiceOptions serviceOptions)
nodeOptions
- the options of new nodeserviceOptions
- the options of new servicepublic Completable deregisterCatalogService(String nodeId, String serviceId)
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)public Completable rxDeregisterCatalogService(String nodeId, String serviceId)
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)public void close()
public static ConsulClient newInstance(ConsulClient arg)
Copyright © 2021 Eclipse. All rights reserved.