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
| ✅ |[Tracking](#tracking)| Associate user actions with feature flag evaluations. |
76
76
| ❌ |[Logging](#logging)| Integrate with popular logging packages. |
77
77
| ❌ |[Named clients](#named-clients)| Utilize multiple providers in a single application. |
78
-
|✅|[Eventing](#eventing)| React to state changes in the provider or flag management system. |
78
+
|❌|[Eventing](#eventing)| React to state changes in the provider or flag management system. |
79
79
| ✅ |[Shutdown](#shutdown)| Gracefully clean up a provider during application shutdown. |
80
80
| ⚠️ |[Extending](#extending)| Extend OpenFeature with custom providers and hooks. |
81
81
@@ -90,10 +90,21 @@ If the provider you're looking for hasn't been created yet, see the [develop a p
90
90
Once you've added a provider as a dependency, it can be registered with OpenFeature like this:
91
91
92
92
```kotlin
93
-
OpenFeatureAPI.setProviderAndWait(MyProvider())
93
+
coroutineScope.launch(Dispatchers.IO) {
94
+
OpenFeatureAPI.setProviderAndWait(MyProvider())
95
+
}
94
96
```
95
97
96
-
> Asynchronous API that doesn't wait is also available
98
+
Asynchronous API that doesn't wait is also available. It's useful when you want to set a provider and continue with other tasks.
99
+
100
+
However, flag evaluations are only possible after the provider is Ready.
101
+
102
+
```kotlin
103
+
OpenFeatureAPI.setProvider(MyProvider()) // can pass a dispatcher here
104
+
// The provider initialization happens on a coroutine launched on the IO dispatcher.
105
+
val status =OpenFeatureAPI.getStatus()
106
+
// When status is Ready, flag evaluations can be made
107
+
```
97
108
98
109
99
110
### Targeting
@@ -164,35 +175,6 @@ Logging customization is not yet available in the Kotlin SDK.
164
175
165
176
Support for named clients is not yet available in the Kotlin SDK.
166
177
167
-
### Eventing
168
-
169
-
Events allow you to react to state changes in the provider or underlying flag management system, such as flag definition changes, provider readiness, or error conditions.
170
-
Initialization events (`PROVIDER_READY` on success, `PROVIDER_ERROR` on failure) are dispatched for every provider.
171
-
Some providers support additional events, such as `PROVIDER_CONFIGURATION_CHANGED`.
172
-
173
-
Please refer to the documentation of the provider you're using to see what events are supported.
0 commit comments