mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
src: update opossum to have volumeThreshold
This commit is contained in:
Vendored
+5
-2
@@ -1,6 +1,7 @@
|
||||
// Type definitions for opossum 1.8
|
||||
// Project: https://github.com/bucharest-gold/opossum
|
||||
// Type definitions for opossum 1.9
|
||||
// Project: https://github.com/nodeshift/opossum
|
||||
// Definitions by: Quinn Langille <https://github.com/quinnlangille>
|
||||
// Lance Ball <https://github.com/lance>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
@@ -31,6 +32,7 @@ export class CircuitBreaker {
|
||||
static readonly hystrixStats: symbol;
|
||||
static readonly enabled: symbol;
|
||||
static readonly warmUp: symbol;
|
||||
static readonly volumeThreshold: symbol;
|
||||
}
|
||||
|
||||
export interface CircuitBreakerOptions {
|
||||
@@ -45,6 +47,7 @@ export interface CircuitBreakerOptions {
|
||||
errorThresholdPercentage?: number;
|
||||
enabled?: boolean;
|
||||
allowWarmUp?: boolean;
|
||||
volumeThreshold?: number;
|
||||
}
|
||||
|
||||
export default function circuitBreaker(
|
||||
|
||||
@@ -17,7 +17,8 @@ const options: CircuitBreakerOptions = {
|
||||
capacity: 1,
|
||||
errorThresholdPercentage: 1,
|
||||
enabled: true,
|
||||
allowWarmUp: true
|
||||
allowWarmUp: true,
|
||||
volumeThreshold: 1
|
||||
};
|
||||
|
||||
const testWithOptions: CircuitBreaker = circuitBreaker(_blank, options);
|
||||
@@ -44,3 +45,4 @@ const shouldBeSymbol7: symbol = CircuitBreaker.hystrixStats;
|
||||
const shouldBeSymbol8: symbol = CircuitBreaker.status;
|
||||
const shouldBeSymbol9: symbol = CircuitBreaker.enabled;
|
||||
const shouldBeSymbol10: symbol = CircuitBreaker.warmUp;
|
||||
const shouldBeSymbol11: symbol = CircuitBreaker.volumeThreshold;
|
||||
|
||||
Reference in New Issue
Block a user