Module: vertx-consul-js/watch

Classes

Watch

Methods

(static) Watch.key(key, vertx, options) → {Watch}

Creates Watch to monitoring a specific key in the KV store. This maps to the /v1/kv/<key> API internally.
Parameters:
Name Type Description
key string the key
vertx Vertx the Vertx instance
options Object the options to create underlying Consul client
Source:
Returns:
the Watch instance
Type
Watch

(static) Watch.service(service, vertx, options) → {Watch}

Creates Watch to monitoring the nodes providing the service. This maps to the /v1/health/service/<service> API internally.
Parameters:
Name Type Description
service string the service name
vertx Vertx the Vertx instance
options Object the options to create underlying Consul client
Source:
Returns:
the Watch instance
Type
Watch

(static) Watch.services(vertx, options) → {Watch}

Creates Watch to monitoring the list of available services. This maps to the /v1/catalog/services API internally.
Parameters:
Name Type Description
vertx Vertx the Vertx instance
options Object the options to create underlying Consul client
Source:
Returns:
the Watch instance
Type
Watch