Skip to content

Support isolated API instances #584

Description

@toddbaert

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions