Comparing version 1.1.0 to 1.2.0
@@ -112,3 +112,3 @@ 'use strict'; | ||
if (err) { | ||
if (err && self.settings.isFailure(err)) { | ||
self.emit('failure', err); | ||
@@ -115,0 +115,0 @@ self._onFailure(); |
@@ -7,3 +7,6 @@ 'use strict'; | ||
timeout: 10000, | ||
resetTimeout: 60000 | ||
resetTimeout: 60000, | ||
isFailure: function () { | ||
return true; | ||
} | ||
}; |
{ | ||
"name": "levee", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "A circuitbreaker implementation for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -139,2 +139,5 @@ Levee | ||
##### `isFailure` | ||
function that returns true if an error should be considered a failure (receives the error object returned by your command.) This allows for non-critical errors to be ignored by the circuit breaker. | ||
#### Properties | ||
@@ -186,2 +189,2 @@ ##### `fallback` | ||
Reset samples for the provided name. If no name is provided, resets all samples. | ||
- `name` - the label of the sample to reset. | ||
- `name` - the label of the sample to reset. |
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
14969
255
189