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

In order to make sure that your request going to vault leader node, you can use these package instead of request. This Package is extend of requestRetry package with an option to replace the dns with ip.

  • 1.0.74
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-52.38%
Maintainers
1
Weekly downloads
 
Created
Source

In order to make sure that your request going to vault leader node, you can use these package instead of request. This Package is extend of requestRetry package with an option to replace the dns with ip.

HOW TO USE:

1- replace request package with:

var vaultHighAvailability = require('vault-high-availability')(server_address);
var request = vaultHighAvailability.request;

2- In your request option add these lines:

var options:{
..
..
time: true,
maxAttempts: process.env.MAX_ATTEMPT_RETRY || defaultRetryTimes,   // (default) try 5 times
retryDelay: process.env.RETRY_DELAY || 500,  // (default) wait for 5s before trying again
retryStrategy: vaultHighAvailability.networkOrHttpErrorTriggerResolveDNS,
addressResolver: vaultHighAvailability.replaceDnsWithIp
}

This will handle network Or Http Error & will replace the dns with the leader ip

FAQs

Package last updated on 21 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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