public interface Watch<T>
Handler
with AsyncResult
is invoked.
As an example, you could watch the status of health checks and notify when a check is critical.Modifier and Type | Method and Description |
---|---|
static Watch<EventList> |
events(String event,
Vertx vertx)
Creates
Watch to monitoring the custom user events. |
static Watch<EventList> |
events(String event,
Vertx vertx,
ConsulClientOptions options)
Creates
Watch to monitoring the custom user events. |
static Watch<KeyValue> |
key(String key,
Vertx vertx)
Creates
Watch to monitoring a specific key in the KV store. |
static Watch<KeyValue> |
key(String key,
Vertx vertx,
ConsulClientOptions options)
Creates
Watch to monitoring a specific key in the KV store. |
static Watch<KeyValueList> |
keyPrefix(String keyPrefix,
Vertx vertx)
Creates
Watch to monitoring a prefix of keys in the KV store. |
static Watch<KeyValueList> |
keyPrefix(String keyPrefix,
Vertx vertx,
ConsulClientOptions options)
Creates
Watch to monitoring a prefix of keys in the KV store. |
static Watch<NodeList> |
nodes(Vertx vertx)
Creates
Watch to monitoring the list of available nodes. |
static Watch<NodeList> |
nodes(Vertx vertx,
ConsulClientOptions options)
Creates
Watch to monitoring the list of available nodes. |
static Watch<ServiceEntryList> |
service(String service,
Vertx vertx)
Creates
Watch to monitoring the nodes providing the service. |
static Watch<ServiceEntryList> |
service(String service,
Vertx vertx,
ConsulClientOptions options)
Creates
Watch to monitoring the nodes providing the service. |
static Watch<ServiceList> |
services(Vertx vertx)
Creates
Watch to monitoring the list of available services. |
static Watch<ServiceList> |
services(Vertx vertx,
ConsulClientOptions options)
Creates
Watch to monitoring the list of available services. |
Watch<T> |
setHandler(Handler<WatchResult<T>> handler)
Set the result handler.
|
Watch<T> |
start()
Start this
Watch |
void |
stop()
Stop the watch and release its resources
|
static Watch<KeyValue> key(String key, Vertx vertx)
Watch
to monitoring a specific key in the KV store.
The underlying Consul client will be created with default options.
This maps to the /v1/kv/ API internally.key
- the keyvertx
- the Vertx
instanceWatch
instancestatic Watch<KeyValue> key(String key, Vertx vertx, ConsulClientOptions options)
Watch
to monitoring a specific key in the KV store.
This maps to the /v1/kv/ API internally.key
- the keyvertx
- the Vertx
instanceoptions
- the options to create underlying Consul clientWatch
instancestatic Watch<KeyValueList> keyPrefix(String keyPrefix, Vertx vertx)
Watch
to monitoring a prefix of keys in the KV store.
The underlying Consul client will be created with default options.
This maps to the /v1/kv/ API internally.keyPrefix
- the keyvertx
- the Vertx
instanceWatch
instancestatic Watch<KeyValueList> keyPrefix(String keyPrefix, Vertx vertx, ConsulClientOptions options)
Watch
to monitoring a prefix of keys in the KV store.
This maps to the /v1/kv/ API internally.keyPrefix
- the keyvertx
- the Vertx
instanceoptions
- the options to create underlying Consul clientWatch
instancestatic Watch<ServiceList> services(Vertx vertx)
Watch
to monitoring the list of available services.
The underlying Consul client will be created with default options.
This maps to the /v1/catalog/services API internally.vertx
- the Vertx
instanceWatch
instancestatic Watch<ServiceList> services(Vertx vertx, ConsulClientOptions options)
Watch
to monitoring the list of available services.
This maps to the /v1/catalog/services API internally.vertx
- the Vertx
instanceoptions
- the options to create underlying Consul clientWatch
instancestatic Watch<ServiceEntryList> service(String service, Vertx vertx)
Watch
to monitoring the nodes providing the service.
The underlying Consul client will be created with default options.
This maps to the /v1/health/service/<service> API internally.service
- the service namevertx
- the Vertx
instanceWatch
instancestatic Watch<ServiceEntryList> service(String service, Vertx vertx, ConsulClientOptions options)
Watch
to monitoring the nodes providing the service.
This maps to the /v1/health/service/<service> API internally.service
- the service namevertx
- the Vertx
instanceoptions
- the options to create underlying Consul clientWatch
instancestatic Watch<EventList> events(String event, Vertx vertx)
Watch
to monitoring the custom user events.
The underlying Consul client will be created with default options.
This maps to the /v1/event/list API internally.event
- the event namevertx
- the Vertx
instanceWatch
instancestatic Watch<EventList> events(String event, Vertx vertx, ConsulClientOptions options)
Watch
to monitoring the custom user events.
This maps to the /v1/event/list API internally.event
- the event namevertx
- the Vertx
instanceoptions
- the options to create underlying Consul clientWatch
instancestatic Watch<NodeList> nodes(Vertx vertx)
Watch
to monitoring the list of available nodes.
The underlying Consul client will be created with default options.
This maps to the /v1/catalog/nodes API internally.vertx
- the Vertx
instanceWatch
instancestatic Watch<NodeList> nodes(Vertx vertx, ConsulClientOptions options)
Watch
to monitoring the list of available nodes.
This maps to the /v1/catalog/nodes API internally.vertx
- the Vertx
instanceoptions
- the options to create underlying Consul clientWatch
instanceWatch<T> setHandler(Handler<WatchResult<T>> handler)
handler
- the result handlervoid stop()
Copyright © 2018 Eclipse. All rights reserved.