Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 20 additions & 41 deletions docs/reference/technologies/client/kotlin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ This content has been automatically generated from kotlin-sdk.
Edits should be made here: https://github.com/open-feature/kotlin-sdk
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs

Last updated at Thu Feb 06 2025 08:09:46 GMT+0000 (Coordinated Universal Time)
Last updated at Wed Feb 19 2025 13:28:34 GMT+0000 (Coordinated Universal Time)
-->

<p align="center" class="github-badges">
<a href="https://github.com/open-feature/spec/releases/tag/v0.6.0">
<img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.6.0&color=yellow&style=for-the-badge" />
<a href="https://github.com/open-feature/spec/releases/tag/v0.8.0">
<img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.8.0&color=yellow&style=for-the-badge" />
</a>

<a href="https://github.com/open-feature/kotlin-sdk/releases/tag/v0.3.3">
Expand Down Expand Up @@ -72,7 +72,7 @@ coroutineScope.launch(Dispatchers.IO) {
| ✅ | [Tracking](#tracking) | Associate user actions with feature flag evaluations. |
| ❌ | [Logging](#logging) | Integrate with popular logging packages. |
| ❌ | [Named clients](#named-clients) | Utilize multiple providers in a single application. |
| | [Eventing](#eventing) | React to state changes in the provider or flag management system. |
| | [Eventing](#eventing) | React to state changes in the provider or flag management system. |
| ✅ | [Shutdown](#shutdown) | Gracefully clean up a provider during application shutdown. |
| ⚠️ | [Extending](#extending) | Extend OpenFeature with custom providers and hooks. |

Expand All @@ -87,10 +87,21 @@ If the provider you're looking for hasn't been created yet, see the [develop a p
Once you've added a provider as a dependency, it can be registered with OpenFeature like this:

```kotlin
OpenFeatureAPI.setProviderAndWait(MyProvider())
coroutineScope.launch(Dispatchers.IO) {
OpenFeatureAPI.setProviderAndWait(MyProvider())
}
```

> Asynchronous API that doesn't wait is also available
Asynchronous API that doesn't wait is also available. It's useful when you want to set a provider and continue with other tasks.

However, flag evaluations are only possible after the provider is Ready.

```kotlin
OpenFeatureAPI.setProvider(MyProvider()) // can pass a dispatcher here
// The provider initialization happens on a coroutine launched on the IO dispatcher.
val status = OpenFeatureAPI.getStatus()
// When status is Ready, flag evaluations can be made
```

### Targeting

Expand Down Expand Up @@ -162,31 +173,7 @@ Support for named clients is not yet available in the Kotlin SDK.

### Eventing

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.
Initialization events (`PROVIDER_READY` on success, `PROVIDER_ERROR` on failure) are dispatched for every provider.
Some providers support additional events, such as `PROVIDER_CONFIGURATION_CHANGED`.

Please refer to the documentation of the provider you're using to see what events are supported.

Example usage:
```kotlin
viewModelScope.launch {
OpenFeatureAPI.observe<OpenFeatureEvents.ProviderReady>().collect {
println(">> ProviderReady event received")
}
}

viewModelScope.launch {
OpenFeatureAPI.setProviderAndWait(
ConfidenceFeatureProvider.create(
applicationContext,
clientSecret
),
Dispatchers.IO,
myEvaluationContext
)
}
```
Support for eventing is not yet available in the Kotlin SDK.

### Shutdown

Expand Down Expand Up @@ -246,21 +233,13 @@ class NewProvider(override val hooks: List<Hook<*>>, override val metadata: Meta
// resolve a string flag value
}

override fun initialize(initialContext: EvaluationContext?) {
override suspend fun initialize(initialContext: EvaluationContext?) {
// add context-aware provider initialization
}

override fun onContextSet(oldContext: EvaluationContext?, newContext: EvaluationContext) {
override suspend fun onContextSet(oldContext: EvaluationContext?, newContext: EvaluationContext) {
// add necessary changes on context change
}

override fun observe(): Flow<OpenFeatureEvents> {
// return a `Flow` of the Events
}

override fun getProviderStatus(): OpenFeatureEvents {
// return the event representative of the current Provider Status
}
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/technologies/client/swift.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This content has been automatically generated from swift-sdk.
Edits should be made here: https://github.com/open-feature/swift-sdk
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs

Last updated at Thu Feb 06 2025 08:09:46 GMT+0000 (Coordinated Universal Time)
Last updated at Wed Feb 19 2025 13:28:34 GMT+0000 (Coordinated Universal Time)
-->

<p align="center" class="github-badges">
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/technologies/client/web/angular.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ This content has been automatically generated from js-sdk.
Edits should be made here: https://github.com/open-feature/js-sdk
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs

Last updated at Thu Feb 06 2025 08:09:47 GMT+0000 (Coordinated Universal Time)
Last updated at Wed Feb 19 2025 13:28:34 GMT+0000 (Coordinated Universal Time)
-->

<p align="center" class="github-badges">
<a href="https://github.com/open-feature/spec/releases/tag/v0.8.0">
<img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.8.0&color=yellow&style=for-the-badge" />
</a>

<a href="https://github.com/open-feature/js-sdk/releases/tag/angular-sdk-v0.0.9-experimental">
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v0.0.9-experimental&color=blue&style=for-the-badge" />
<a href="https://github.com/open-feature/js-sdk/releases/tag/angular-sdk-v0.0.10">
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v0.0.10&color=blue&style=for-the-badge" />
</a>

<br/>
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/technologies/client/web/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ This content has been automatically generated from js-sdk.
Edits should be made here: https://github.com/open-feature/js-sdk
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs

Last updated at Thu Feb 06 2025 08:09:46 GMT+0000 (Coordinated Universal Time)
Last updated at Wed Feb 19 2025 13:28:33 GMT+0000 (Coordinated Universal Time)
-->

<p align="center" class="github-badges">
<a href="https://github.com/open-feature/spec/releases/tag/v0.8.0">
<img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.8.0&color=yellow&style=for-the-badge" />
</a>

<a href="https://github.com/open-feature/js-sdk/releases/tag/web-sdk-v1.4.0">
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.4.0&color=blue&style=for-the-badge" />
<a href="https://github.com/open-feature/js-sdk/releases/tag/web-sdk-v1.4.1">
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.4.1&color=blue&style=for-the-badge" />
</a>

<br/>
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/technologies/client/web/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ This content has been automatically generated from js-sdk.
Edits should be made here: https://github.com/open-feature/js-sdk
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs

Last updated at Thu Feb 06 2025 08:09:46 GMT+0000 (Coordinated Universal Time)
Last updated at Wed Feb 19 2025 13:28:33 GMT+0000 (Coordinated Universal Time)
-->

<p align="center" class="github-badges">
<a href="https://github.com/open-feature/spec/releases/tag/v0.8.0">
<img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.8.0&color=yellow&style=for-the-badge" />
</a>

<a href="https://github.com/open-feature/js-sdk/releases/tag/react-sdk-v0.4.10">
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v0.4.10&color=blue&style=for-the-badge" />
<a href="https://github.com/open-feature/js-sdk/releases/tag/react-sdk-v0.4.11">
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v0.4.11&color=blue&style=for-the-badge" />
</a>

<br/>
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/technologies/server/dotnet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This content has been automatically generated from dotnet-sdk.
Edits should be made here: https://github.com/open-feature/dotnet-sdk
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs

Last updated at Thu Feb 06 2025 08:09:45 GMT+0000 (Coordinated Universal Time)
Last updated at Wed Feb 19 2025 13:28:32 GMT+0000 (Coordinated Universal Time)
-->

[![Specification](https://img.shields.io/static/v1?label=specification&message=v0.7.0&color=yellow&style=for-the-badge)](https://github.com/open-feature/spec/releases/tag/v0.7.0)
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/technologies/server/go.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This content has been automatically generated from go-sdk.
Edits should be made here: https://github.com/open-feature/go-sdk
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs

Last updated at Thu Feb 06 2025 08:09:45 GMT+0000 (Coordinated Universal Time)
Last updated at Wed Feb 19 2025 13:28:33 GMT+0000 (Coordinated Universal Time)
-->

<p align="center" class="github-badges">
Expand Down
10 changes: 5 additions & 5 deletions docs/reference/technologies/server/java.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This content has been automatically generated from java-sdk.
Edits should be made here: https://github.com/open-feature/java-sdk
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs

Last updated at Thu Feb 06 2025 08:09:44 GMT+0000 (Coordinated Universal Time)
Last updated at Wed Feb 19 2025 13:28:32 GMT+0000 (Coordinated Universal Time)
-->

<p align="center" class="github-badges">
Expand All @@ -18,8 +18,8 @@ Last updated at Thu Feb 06 2025 08:09:44 GMT+0000 (Coordinated Universal Time)
</a>


<a href="https://github.com/open-feature/java-sdk/releases/tag/v1.14.0">
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.14.0&color=blue&style=for-the-badge" />
<a href="https://github.com/open-feature/java-sdk/releases/tag/v1.14.1">
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.14.1&color=blue&style=for-the-badge" />
</a>


Expand Down Expand Up @@ -54,7 +54,7 @@ Note that this library is intended to be used in server-side contexts and has no
<dependency>
<groupId>dev.openfeature</groupId>
<artifactId>sdk</artifactId>
<version>1.14.0</version>
<version>1.14.1</version>
</dependency>
```

Expand All @@ -77,7 +77,7 @@ If you would like snapshot builds, this is the relevant repository information:

```groovy
dependencies {
implementation 'dev.openfeature:sdk:1.14.0'
implementation 'dev.openfeature:sdk:1.14.1'
}
```

Expand Down
6 changes: 3 additions & 3 deletions docs/reference/technologies/server/javascript/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ This content has been automatically generated from js-sdk.
Edits should be made here: https://github.com/open-feature/js-sdk
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs

Last updated at Thu Feb 06 2025 08:09:44 GMT+0000 (Coordinated Universal Time)
Last updated at Wed Feb 19 2025 13:28:32 GMT+0000 (Coordinated Universal Time)
-->

<p align="center" class="github-badges">
<a href="https://github.com/open-feature/spec/releases/tag/v0.8.0">
<img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.8.0&color=yellow&style=for-the-badge" />
</a>

<a href="https://github.com/open-feature/js-sdk/releases/tag/server-sdk-v1.17.0">
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.17.0&color=blue&style=for-the-badge" />
<a href="https://github.com/open-feature/js-sdk/releases/tag/server-sdk-v1.17.1">
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.17.1&color=blue&style=for-the-badge" />
</a>

<br/>
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/technologies/server/javascript/nestjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk.
Edits should be made here: https://github.com/open-feature/js-sdk
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs

Last updated at Thu Feb 06 2025 08:09:44 GMT+0000 (Coordinated Universal Time)
Last updated at Wed Feb 19 2025 13:28:32 GMT+0000 (Coordinated Universal Time)
-->

<p align="center" class="github-badges">
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/technologies/server/php.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This content has been automatically generated from php-sdk.
Edits should be made here: https://github.com/open-feature/php-sdk
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs

Last updated at Thu Feb 06 2025 08:09:46 GMT+0000 (Coordinated Universal Time)
Last updated at Wed Feb 19 2025 13:28:33 GMT+0000 (Coordinated Universal Time)
-->

<p align="center" class="github-badges">
Expand Down
Loading
Loading