We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ea6238 commit 9d5b12aCopy full SHA for 9d5b12a
packages/libraries/core/src/client/circuit-breaker.ts
@@ -0,0 +1,23 @@
1
+export type CircuitBreakerConfiguration = {
2
+ /**
3
+ * Percentage after what the circuit breaker should kick in.
4
+ * Default: 50
5
+ */
6
+ errorThresholdPercentage: number;
7
8
+ * Count of requests before starting evaluating.
9
+ * Default: 5
10
11
+ volumeThreshold: number;
12
13
+ * After what time the circuit breaker is attempting to retry sending requests in milliseconds
14
+ * Default: 30_000
15
16
+ resetTimeout: number;
17
+};
18
+
19
+export const defaultCircuitBreakerConfiguration: CircuitBreakerConfiguration = {
20
+ errorThresholdPercentage: 50,
21
+ volumeThreshold: 10,
22
+ resetTimeout: 30_000,
23
0 commit comments