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

vault-high-availability

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vault-high-availability - npm Package Compare versions

Comparing version 1.0.64 to 1.0.65

4

index.js

@@ -19,3 +19,2 @@ /**

this.addressResolver = new vaultLeaderResolver(vaultAddress);
//this.addressResolver.findActiveIp();
}catch(err){

@@ -26,2 +25,3 @@ logger.error("An error happened while trying to resolve the leader",err);

setStrategey(this.addressResolver);
return this.addressResolver.findActiveIp();
}

@@ -43,3 +43,3 @@

logger.debug("Going to find the vault leader task");
return addressResolver.findActiveIp();
addressResolver.findActiveIp();
});

@@ -46,0 +46,0 @@

{
"name": "vault-high-availability",
"version": "1.0.64",
"version": "1.0.65",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -5,17 +5,26 @@ /**

var request;
var vaultHighAvailability = require('./index')("http://demo7061723.mockable.io");
var request = vaultHighAvailability.request;
vaultHighAvailability.then(function (object) {
request = object.request;
var options = {
method: "GET",
url :"http://demo7061723.mockable.io/v1/sys/leader",
retryStrategy: vaultHighAvailability.networkOrHttpErrorTriggerResolveDNS,
addressResolver: vaultHighAvailability.replaceDnsWithIp
}
var options = {
method: "GET",
url :"http://demo7061723.mockable.io/v1/sys/leader",
retryStrategy: vaultHighAvailability.networkOrHttpErrorTriggerResolveDNS,
addressResolver: vaultHighAvailability.replaceDnsWithIp
}
request(options,function (error,response,body) {
console.log(response.body);
})
request(options,function (error,response,body) {
}).catch(function (error) {
console.log(error);
})

@@ -107,3 +107,3 @@ 'use strict';

log.error("An error happened while trying to get vault leader", err);
return generalReject()
return generalReject("An error happened while trying to get vault leader")
})

@@ -200,4 +200,2 @@ };

url = urlLib.format(urlObject);
log.debug("URL after resolving:" + url);
return url

@@ -207,11 +205,7 @@ } else { // in case dns resolving failed on startup we still want to find the active. otherwise it will wait until the first failure.

findActiveIp.call(this).then(function () {
log.debug("Found the ip, going to replace the url with the ip:" + this.ip);
var urlObject = urlLib.parse(url);
urlObject.host = undefined;
urlObject.hostname = this.ip;
url = urlLib.format(urlObject);
log.debug("URL after resolving:" + url);
return url
})
}
log.debug("URL after resolving:" + url);
return url

@@ -218,0 +212,0 @@

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