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 20a2e6c commit 4e67314Copy full SHA for 4e67314
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