vertx / io.vertx.kotlin.ext.consul / io.vertx.ext.consul.ConsulClient

Extensions for io.vertx.ext.consul.ConsulClient

agentInfoAwait

suspend fun ConsulClient.agentInfoAwait(): JsonObject

Returns the configuration and member information of the local agent

catalogDatacentersAwait

suspend fun ConsulClient.catalogDatacentersAwait(): List<String>

Return all the datacenters that are known by the Consul server

catalogNodeServicesAwait

suspend fun ConsulClient.catalogNodeServicesAwait(node: String): ServiceList

Returns the node's registered services

catalogNodeServicesWithOptionsAwait

suspend fun ConsulClient.catalogNodeServicesWithOptionsAwait(node: String, options: BlockingQueryOptions): ServiceList

Returns the node's registered services This is blocking query unlike io.vertx.ext.consul.ConsulClient

catalogNodesAwait

suspend fun ConsulClient.catalogNodesAwait(): NodeList

Returns the nodes registered in a datacenter

catalogNodesWithOptionsAwait

suspend fun ConsulClient.catalogNodesWithOptionsAwait(options: NodeQueryOptions): NodeList

Returns the nodes registered in a datacenter

catalogServiceNodesAwait

suspend fun ConsulClient.catalogServiceNodesAwait(service: String): ServiceList

Returns the nodes providing a service

catalogServiceNodesWithOptionsAwait

suspend fun ConsulClient.catalogServiceNodesWithOptionsAwait(service: String, options: ServiceQueryOptions): ServiceList

Returns the nodes providing a service

catalogServicesAwait

suspend fun ConsulClient.catalogServicesAwait(): ServiceList

Returns the services registered in a datacenter

catalogServicesWithOptionsAwait

suspend fun ConsulClient.catalogServicesWithOptionsAwait(options: BlockingQueryOptions): ServiceList

Returns the services registered in a datacenter This is blocking query unlike io.vertx.ext.consul.ConsulClient

cloneAclTokenAwait

suspend fun ConsulClient.cloneAclTokenAwait(id: String): String

Clone Acl token

coordinateDatacentersAwait

suspend fun ConsulClient.coordinateDatacentersAwait(): List<DcCoordinates>

Returns the WAN network coordinates for all Consul servers, organized by DCs

coordinateNodesAwait

suspend fun ConsulClient.coordinateNodesAwait(): CoordinateList

Returns the LAN network coordinates for all nodes in a given DC

coordinateNodesWithOptionsAwait

suspend fun ConsulClient.coordinateNodesWithOptionsAwait(options: BlockingQueryOptions): CoordinateList

Returns the LAN network coordinates for all nodes in a given DC This is blocking query unlike io.vertx.ext.consul.ConsulClient

createAclTokenAwait

suspend fun ConsulClient.createAclTokenAwait(token: AclToken): String

Create new Acl token

createPreparedQueryAwait

suspend fun ConsulClient.createPreparedQueryAwait(definition: PreparedQueryDefinition): String

createSessionAwait

suspend fun ConsulClient.createSessionAwait(): String

Initialize a new session

createSessionWithOptionsAwait

suspend fun ConsulClient.createSessionWithOptionsAwait(options: SessionOptions): String

Initialize a new session

deletePreparedQueryAwait

suspend fun ConsulClient.deletePreparedQueryAwait(id: String): Unit

Deletes an existing prepared query

deleteValueAwait

suspend fun ConsulClient.deleteValueAwait(key: String): Unit

Remove the key/value pair that corresponding to the specified key

deleteValuesAwait

suspend fun ConsulClient.deleteValuesAwait(keyPrefix: String): Unit

Removes all the key/value pair that corresponding to the specified key prefix

deregisterCheckAwait

suspend fun ConsulClient.deregisterCheckAwait(checkId: String): Unit

Remove a check from the local agent. The agent will take care of deregistering the check from the Catalog.

deregisterServiceAwait

suspend fun ConsulClient.deregisterServiceAwait(id: String): Unit

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.

destroyAclTokenAwait

suspend fun ConsulClient.destroyAclTokenAwait(id: String): Unit

Destroy Acl token

destroySessionAwait

suspend fun ConsulClient.destroySessionAwait(id: String): Unit

Destroys the given session

executePreparedQueryAwait

suspend fun ConsulClient.executePreparedQueryAwait(query: String): PreparedQueryExecuteResponse

Executes an existing prepared query.

executePreparedQueryWithOptionsAwait

suspend fun ConsulClient.executePreparedQueryWithOptionsAwait(query: String, options: PreparedQueryExecuteOptions): PreparedQueryExecuteResponse

Executes an existing prepared query.

failCheckAwait

suspend fun ConsulClient.failCheckAwait(checkId: String): Unit

Set status of the check to "critical". Used with a check that is of the TTL type. The TTL clock will be reset.

failCheckWithNoteAwait

suspend fun ConsulClient.failCheckWithNoteAwait(checkId: String, note: String): Unit

Set status of the check to "critical". Used with a check that is of the TTL type. The TTL clock will be reset.

fireEventAwait

suspend fun ConsulClient.fireEventAwait(name: String): Event

Fires a new user event

fireEventWithOptionsAwait

suspend fun ConsulClient.fireEventWithOptionsAwait(name: String, options: EventOptions): Event

Fires a new user event

getAllPreparedQueriesAwait

suspend fun ConsulClient.getAllPreparedQueriesAwait(): List<PreparedQueryDefinition>

Returns a list of all prepared queries.

getKeysAwait

suspend fun ConsulClient.getKeysAwait(keyPrefix: String): List<String>

Returns the list of keys that corresponding to the specified key prefix.

getKeysWithOptionsAwait

suspend fun ConsulClient.getKeysWithOptionsAwait(keyPrefix: String, options: BlockingQueryOptions): List<String>

Returns the list of keys that corresponding to the specified key prefix.

getPreparedQueryAwait

suspend fun ConsulClient.getPreparedQueryAwait(id: String): PreparedQueryDefinition

Returns an existing prepared query

getValueAwait

suspend fun ConsulClient.getValueAwait(key: String): KeyValue

Returns key/value pair that corresponding to the specified key. An empty io.vertx.ext.consul.KeyValue object will be returned if no such key is found.

getValueWithOptionsAwait

suspend fun ConsulClient.getValueWithOptionsAwait(key: String, options: BlockingQueryOptions): KeyValue

Returns key/value pair that corresponding to the specified key. An empty io.vertx.ext.consul.KeyValue object will be returned if no such key is found. This is blocking query unlike io.vertx.ext.consul.ConsulClient

getValuesAwait

suspend fun ConsulClient.getValuesAwait(keyPrefix: String): KeyValueList

Returns the list of key/value pairs that corresponding to the specified key prefix. An empty io.vertx.ext.consul.KeyValueList object will be returned if no such key prefix is found.

getValuesWithOptionsAwait

suspend fun ConsulClient.getValuesWithOptionsAwait(keyPrefix: String, options: BlockingQueryOptions): KeyValueList

Returns the list of key/value pairs that corresponding to the specified key prefix. An empty io.vertx.ext.consul.KeyValueList object will be returned if no such key prefix is found. This is blocking query unlike io.vertx.ext.consul.ConsulClient

healthChecksAwait

suspend fun ConsulClient.healthChecksAwait(service: String): CheckList

Returns the checks associated with the service

healthChecksWithOptionsAwait

suspend fun ConsulClient.healthChecksWithOptionsAwait(service: String, options: CheckQueryOptions): CheckList

Returns the checks associated with the service

healthServiceNodesAwait

suspend fun ConsulClient.healthServiceNodesAwait(service: String, passing: Boolean): ServiceEntryList

Returns the nodes providing the service. This endpoint is very similar to the io.vertx.ext.consul.ConsulClient endpoint; however, this endpoint automatically returns the status of the associated health check as well as any system level health checks.

healthServiceNodesWithOptionsAwait

suspend fun ConsulClient.healthServiceNodesWithOptionsAwait(service: String, passing: Boolean, options: ServiceQueryOptions): ServiceEntryList

Returns the nodes providing the service. This endpoint is very similar to the io.vertx.ext.consul.ConsulClient endpoint; however, this endpoint automatically returns the status of the associated health check as well as any system level health checks.

healthStateAwait

suspend fun ConsulClient.healthStateAwait(healthState: HealthState): CheckList

Returns the checks in the specified status

healthStateWithOptionsAwait

suspend fun ConsulClient.healthStateWithOptionsAwait(healthState: HealthState, options: CheckQueryOptions): CheckList

Returns the checks in the specified status

infoAclTokenAwait

suspend fun ConsulClient.infoAclTokenAwait(id: String): AclToken

Get info of Acl token

infoSessionAwait

suspend fun ConsulClient.infoSessionAwait(id: String): Session

Returns the requested session information

infoSessionWithOptionsAwait

suspend fun ConsulClient.infoSessionWithOptionsAwait(id: String, options: BlockingQueryOptions): Session

Returns the requested session information This is blocking query unlike io.vertx.ext.consul.ConsulClient

leaderStatusAwait

suspend fun ConsulClient.leaderStatusAwait(): String

Get the Raft leader for the datacenter in which the agent is running. It returns an address in format "10.1.10.12:8300"

listAclTokensAwait

suspend fun ConsulClient.listAclTokensAwait(): List<AclToken>

Get list of Acl token

listEventsAwait

suspend fun ConsulClient.listEventsAwait(): EventList

Returns the most recent events known by the agent

listEventsWithOptionsAwait

suspend fun ConsulClient.listEventsWithOptionsAwait(options: EventListOptions): EventList

Returns the most recent events known by the agent. This is blocking query unlike io.vertx.ext.consul.ConsulClient. 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.

listNodeSessionsAwait

suspend fun ConsulClient.listNodeSessionsAwait(nodeId: String): SessionList

Returns the active sessions for a given node

listNodeSessionsWithOptionsAwait

suspend fun ConsulClient.listNodeSessionsWithOptionsAwait(nodeId: String, options: BlockingQueryOptions): SessionList

Returns the active sessions for a given node This is blocking query unlike io.vertx.ext.consul.ConsulClient

listSessionsAwait

suspend fun ConsulClient.listSessionsAwait(): SessionList

Returns the active sessions

listSessionsWithOptionsAwait

suspend fun ConsulClient.listSessionsWithOptionsAwait(options: BlockingQueryOptions): SessionList

Returns the active sessions This is blocking query unlike io.vertx.ext.consul.ConsulClient

localChecksAwait

suspend fun ConsulClient.localChecksAwait(): List<Check>

Return all the checks that are registered with the local agent.

localServicesAwait

suspend fun ConsulClient.localServicesAwait(): List<Service>

Returns list of services registered with the local agent.

maintenanceServiceAwait

suspend fun ConsulClient.maintenanceServiceAwait(maintenanceOptions: MaintenanceOptions): Unit

Places a given service into "maintenance mode"

passCheckAwait

suspend fun ConsulClient.passCheckAwait(checkId: String): Unit

Set status of the check to "passing". Used with a check that is of the TTL type. The TTL clock will be reset.

passCheckWithNoteAwait

suspend fun ConsulClient.passCheckWithNoteAwait(checkId: String, note: String): Unit

Set status of the check to "passing". Used with a check that is of the TTL type. The TTL clock will be reset.

peersStatusAwait

suspend fun ConsulClient.peersStatusAwait(): List<String>

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"

putValueAwait

suspend fun ConsulClient.putValueAwait(key: String, value: String): Boolean

Adds specified key/value pair

putValueWithOptionsAwait

suspend fun ConsulClient.putValueWithOptionsAwait(key: String, value: String, options: KeyValueOptions): Boolean

registerCheckAwait

suspend fun ConsulClient.registerCheckAwait(checkOptions: CheckOptions): Unit

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.

registerServiceAwait

suspend fun ConsulClient.registerServiceAwait(serviceOptions: ServiceOptions): Unit

Adds a new service, with an optional health check, to the local agent.

renewSessionAwait

suspend fun ConsulClient.renewSessionAwait(id: String): Session

Renews the given session. This is used with sessions that have a TTL, and it extends the expiration by the TTL

transactionAwait

suspend fun ConsulClient.transactionAwait(request: TxnRequest): TxnResponse

Manages multiple operations inside a single, atomic transaction.

updateAclTokenAwait

suspend fun ConsulClient.updateAclTokenAwait(token: AclToken): String

Update Acl token

updateCheckAwait

suspend fun ConsulClient.updateCheckAwait(checkId: String, status: CheckStatus): Unit

Set status of the check to given status. Used with a check that is of the TTL type. The TTL clock will be reset.

updateCheckWithNoteAwait

suspend fun ConsulClient.updateCheckWithNoteAwait(checkId: String, status: CheckStatus, note: String): Unit

Set status of the check to given status. Used with a check that is of the TTL type. The TTL clock will be reset.

updatePreparedQueryAwait

suspend fun ConsulClient.updatePreparedQueryAwait(definition: PreparedQueryDefinition): Unit

warnCheckAwait

suspend fun ConsulClient.warnCheckAwait(checkId: String): Unit

Set status of the check to "warning". Used with a check that is of the TTL type. The TTL clock will be reset.

warnCheckWithNoteAwait

suspend fun ConsulClient.warnCheckWithNoteAwait(checkId: String, note: String): Unit

Set status of the check to "warning". Used with a check that is of the TTL type. The TTL clock will be reset.