Comparing version 0.33.1 to 0.34.0
@@ -13,2 +13,3 @@ /** | ||
var CatalogService = require('./catalog/service').CatalogService; | ||
var CatalogConnect = require('./catalog/connect').CatalogConnect; | ||
var utils = require('./utils'); | ||
@@ -22,2 +23,3 @@ | ||
this.consul = consul; | ||
this.connect = new Catalog.Connect(consul); | ||
this.node = new Catalog.Node(consul); | ||
@@ -27,2 +29,3 @@ this.service = new Catalog.Service(consul); | ||
Catalog.Connect = CatalogConnect; | ||
Catalog.Node = CatalogNode; | ||
@@ -29,0 +32,0 @@ Catalog.Service = CatalogService; |
{ | ||
"name": "consul", | ||
"version": "0.33.1", | ||
"version": "0.34.0", | ||
"description": "Consul client", | ||
"main": "./lib", | ||
"dependencies": { | ||
"papi": "^0.28.0" | ||
"papi": "^0.29.0" | ||
}, | ||
@@ -21,3 +21,3 @@ "devDependencies": { | ||
"should": "^13.2.1", | ||
"sinon": "^5.1.1", | ||
"sinon": "^6.1.3", | ||
"temp": "^0.8.1" | ||
@@ -24,0 +24,0 @@ }, |
@@ -21,2 +21,3 @@ # Consul [![Build Status](https://travis-ci.org/silas/node-consul.png?branch=master)](https://travis-ci.org/silas/node-consul) | ||
* [Catalog](#catalog) | ||
* [Connect](#catalog-connect) | ||
* [Node](#catalog-node) | ||
@@ -780,5 +781,6 @@ * [Service](#catalog-service) | ||
* [datacenters](#catalog-datacenters) | ||
* [connect](#catalog-connect) | ||
* [node](#catalog-node) | ||
* [service](#catalog-service) | ||
* [datacenters](#catalog-datacenters) | ||
@@ -806,2 +808,60 @@ <a name="catalog-datacenters"></a> | ||
<a name="catalog-connect"></a> | ||
### consul.catalog.connect | ||
* [nodes](#catalog-connect-nodes) | ||
<a name="catalog-connect-nodes"></a> | ||
### consul.catalog.connect.nodes(options, callback) | ||
Lists the nodes for a given Connect-capable service. | ||
Options | ||
* service (String): service name | ||
* dc (String, optional): datacenter (defaults to local for agent) | ||
Usage | ||
``` javascript | ||
consul.catalog.connect.nodes('example', function(err, result) { | ||
if (err) throw err; | ||
}); | ||
``` | ||
Result | ||
``` json | ||
[ | ||
{ | ||
"ID": "40e4a748-2192-161a-0510-9bf59fe950b5", | ||
"Node": "foobar", | ||
"Address": "192.168.10.10", | ||
"Datacenter": "dc1", | ||
"TaggedAddresses": { | ||
"lan": "192.168.10.10", | ||
"wan": "10.0.10.10" | ||
}, | ||
"NodeMeta": { | ||
"somekey": "somevalue" | ||
}, | ||
"CreateIndex": 51, | ||
"ModifyIndex": 51, | ||
"ServiceAddress": "172.17.0.3", | ||
"ServiceEnableTagOverride": false, | ||
"ServiceID": "32a2a47f7992:nodea:5000", | ||
"ServiceName": "foobar", | ||
"ServiceKind": "connect-proxy", | ||
"ServiceProxyDestination": "my-service", | ||
"ServicePort": 5000, | ||
"ServiceMeta": { | ||
"foobar_meta_value": "baz" | ||
}, | ||
"ServiceTags": [ | ||
"tacos" | ||
] | ||
} | ||
] | ||
``` | ||
<a name="catalog-node"></a> | ||
@@ -924,3 +984,3 @@ ### consul.catalog.node | ||
Lists the nodes in a given service. | ||
Lists the nodes for a given service. | ||
@@ -927,0 +987,0 @@ Options |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125756
25
2511
2134
+ Addedpapi@0.29.1(transitive)
- Removedpapi@0.28.0(transitive)
Updatedpapi@^0.29.0