You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/extras.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -229,7 +229,7 @@ Adding `zio-openfeature-ofrep` pulls in Jackson (core/databind/jsr310), Guava, C
229
229
230
230
## Circuit Breaker Provider
231
231
232
-
A decorator that wraps any provider with circuit breaker logic for fast failover. When the delegate provider fails repeatedly or becomes unhealthy, the circuit opens and evaluations fail immediately (< 1ms) — enabling instant fallback when composed with `MultiProvider` and `FirstSuccessfulStrategy`.
232
+
A decorator that wraps any provider with circuit breaker logic for fast failover. When the delegate provider fails repeatedly or becomes unhealthy, the circuit opens and evaluations fail immediately (< 1ms) — enabling instant fallback when composed with `MultiProvider` and `MultiProviderStrategy.firstSuccessful`.
233
233
234
234
### When to use
235
235
@@ -256,7 +256,6 @@ The circuit breaker has three states:
Copy file name to clipboardExpand all lines: docs/providers.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -446,7 +446,7 @@ val layer = FeatureFlags.fromProviderWithHooks(provider, hooks)
446
446
447
447
### fromMultiProvider
448
448
449
-
Create from multiple providers using the SDK's MultiProvider support. The firstprovider that returns without error is used:
449
+
Create from multiple providers using the SDK's MultiProvider support. By default this uses the first-match strategy — the first provider whose result is not a default value is returned (a provider error from any source aborts the chain):
450
450
451
451
```scala
452
452
importdev.openfeature.sdk.FeatureProvider
@@ -458,17 +458,19 @@ val remoteProvider: FeatureProvider = // remote service
You can also supply a custom strategy. The two built-in strategies are exposed via `MultiProviderStrategy` so you don't need to import the Java SDK's multiprovider package directly:
`MultiProviderStrategy.firstMatch` and `MultiProviderStrategy.firstSuccessful` are the two built-ins. For a custom strategy, implement the `MultiProviderStrategy.Strategy` interface (an alias for the Java SDK's `Strategy`) and pass an instance the same way.
473
+
472
474
### Async Variants (Non-Blocking Initialization)
473
475
474
476
Every factory method has an async counterpart that uses the Java SDK's non-blocking `setProvider` instead of `setProviderAndWait`. The provider initializes in the background; evaluations fail with `ProviderNotReady` until the provider is ready.
0 commit comments