Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OF Requirement 1.1.1 & 1.1.2 #6

Closed
scalabl3 opened this issue Oct 7, 2022 · 0 comments
Closed

OF Requirement 1.1.1 & 1.1.2 #6

scalabl3 opened this issue Oct 7, 2022 · 0 comments

Comments

@scalabl3
Copy link

scalabl3 commented Oct 7, 2022

https://docs.openfeature.dev/docs/specification/sections/flag-evaluation

Requirement 1.1.1
The API, and any state it maintains SHOULD exist as a global singleton, even in cases wherein multiple versions of the API are present at runtime.

It's important that multiple instances of the API not be active, so that state stored therein, such as the registered provider, static global evaluation context, and globally configured hooks allow the API to behave predictably. This can be difficult in some runtimes or languages, but implementors should make their best effort to ensure that only a single instance of the API is used.

Requirement 1.1.2
The API MUST provide a function to set the global provider singleton, which accepts an API-conformant provider implementation.

// example provider mutator
OpenFeature.setProvider(new MyProvider());

Pseudo:
OpenFeature.setProvider(new HarnessFF());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant