interface Watch<T : Any>
Watches are a way of specifying a view of data (e.g. list of nodes, KV pairs, health checks) which is monitored for updates. When an update is detected, an Handler with AsyncResult is invoked. As an example, you could watch the status of health checks and notify when a check is critical.
Author
Ruslan Sennov
open static fun events(event: String, vertx: Vertx): Watch<EventList>
Creates open static fun events(event: String, vertx: Vertx, options: ConsulClientOptions): Watch<EventList>
Creates |
|
open static fun key(key: String, vertx: Vertx): Watch<KeyValue>
Creates open static fun key(key: String, vertx: Vertx, options: ConsulClientOptions): Watch<KeyValue>
Creates |
|
open static fun keyPrefix(keyPrefix: String, vertx: Vertx): Watch<KeyValueList>
Creates open static fun keyPrefix(keyPrefix: String, vertx: Vertx, options: ConsulClientOptions): Watch<KeyValueList>
Creates |
|
open static fun nodes(vertx: Vertx): Watch<NodeList>
Creates open static fun nodes(vertx: Vertx, options: ConsulClientOptions): Watch<NodeList>
Creates |
|
open static fun service(service: String, vertx: Vertx): Watch<ServiceEntryList>
Creates open static fun service(service: String, vertx: Vertx, options: ConsulClientOptions): Watch<ServiceEntryList>
Creates |
|
open static fun services(vertx: Vertx): Watch<ServiceList>
Creates open static fun services(vertx: Vertx, options: ConsulClientOptions): Watch<ServiceList>
Creates |
|
abstract fun setHandler(handler: Handler<WatchResult<T>>): Watch<T>
Set the result handler. As data is changed, the handler will be called with the result. |
|
abstract fun start(): Watch<T>
Start this |
|
abstract fun stop(): Unit
Stop the watch and release its resources |