open-feature / open-feature/swift-sdk

Support isolated API instances

Open
#115 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
31
Forks
14
Avg merge
1d 12h
Merged PRs (30d)
2

Description

The spec now supports creating independent, non-singleton instances of the OpenFeature API. Each instance has its own providers, context, hooks, and events; totally separate from the global singleton and from each other. This is useful for things like DI frameworks and testing.

### What needs to happen

- Add a factory function (or equivalent) that creates new, independent API instances
- Each instance should conform to the same API contract as the existing singleton
- Ideally the factory lives in its own module for discoverability (recommended, not required)
- A single provider instance shouldn't be bound to more than one API instance at a time

### Links

- Parent issue: https://github.com/open-feature/spec/issues/374
- Spec section: https://openfeature.dev/specification/sections/flag-evaluation#18-isolated-api-instances

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.