Comparing version 1.0.1 to 1.0.2
@@ -8,3 +8,2 @@ const ms = require('ms'); | ||
cooldown: '15s', | ||
maxCooldown: '60s', | ||
monitor: () => {} | ||
@@ -11,0 +10,0 @@ }; |
{ | ||
"name": "disyuntor", | ||
"description": "A circuit-breaker implementation with exponential backoff.", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"author": "José F. Romaniello <jfromaniello@gmail.com> (http://joseoncode.com)", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -29,3 +29,3 @@ A [circuit-breaker](http://martinfowler.com/bliki/CircuitBreaker.html) implementation for node.js with exponential backoff. | ||
const dnsSafeLookup = disyuntor(dns.lookup, { | ||
//Maximum time that the underlying function can take before is considered faulty. | ||
//Timeout for the protected function. | ||
timeout: '2s', | ||
@@ -37,13 +37,13 @@ | ||
//The minimum time the circuit will be open before doing another attempt. | ||
//The minimum time the circuit remains open before doing another attempt. | ||
cooldown: '15s', | ||
//The maximum amount of time the circuit will be open before doing a new attempt. | ||
//The maximum amount of time the circuit remains open before doing a new attempt. | ||
maxCooldown: '60s', | ||
//this is used in error messages. | ||
//This is used in error messages. | ||
name: 'dns.lookup', | ||
//optionally log errors | ||
monitor: (err) => logger.panic({ err }, 'Error on dns.lookup') | ||
monitor: (details) => logger.panic({ err: details.err, args: details.args }, 'Error on dns.lookup') | ||
}); | ||
@@ -50,0 +50,0 @@ ``` |
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
12288
229