Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

consul

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

consul - npm Package Compare versions

Comparing version 0.33.1 to 0.34.0

lib/catalog/connect.js

3

lib/catalog.js

@@ -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;

6

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc