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
## This PR
- Removes event APIs at the client level (will be re-introduced when
multiple clients/providers are supported)
- Adds an EventHandler implementation that Providers can use to emit
events (a `FeatureProvider` now extends the `EventPublisher` protocol)
- Adds **Combine** as the API for eventing
## Notes
Following patterns implemented in the [Kotlin
SDK](https://github.com/open-feature/kotlin-sdk/blob/cce8368f090b335b7b29c66479aaebb44c58ca5b/android/src/main/java/dev/openfeature/sdk/events/EventHandler.kt)
as much as possible, for consistency
### Follow-up Tasks
- Add `setProviderAndWait` function in OpenFeatureAPI
- Events should contain more metadata than just their type
- Introduce ProviderStatus as an entity separated from ProviderEvent
(also for Kotlin)
---------
Signed-off-by: Fabrizio Demaria <[email protected]>
Signed-off-by: vahid torkaman <[email protected]>
Co-authored-by: vahid torkaman <[email protected]>
Copy file name to clipboardexpand all lines: README.md
+8-7
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ let client = OpenFeatureAPI.shared.getClient()
91
91
let flagValue = client.getBooleanValue(key: "boolFlag", defaultValue: false)
92
92
```
93
93
94
-
Setting a new provider or setting a new evaluation context might trigger asynchronous operations (e.g. fetching flag evaluations from the backend and store them in a local cache). It's advised to not interact with the OpenFeature client until the `ProviderReady` event has been emitted (see [Eventing](#eventing) below).
94
+
Setting a new provider or setting a new evaluation context might trigger asynchronous operations (e.g. fetching flag evaluations from the backend and store them in a local cache). It's advised to not interact with the OpenFeature client until the `ProviderReady` event has been sent (see [Eventing](#eventing) below).
95
95
96
96
## 🌟 Features
97
97
@@ -174,12 +174,13 @@ Some providers support additional events, such as `PROVIDER_CONFIGURATION_CHANGE
174
174
Please refer to the documentation of the provider you're using to see what events are supported.
0 commit comments