Domains allow logical (late) binding of clients with providers, enabling multiple providers in a single application.
Specification References:
- 1.1.3: The API MUST provide a function to bind a given provider to one or more clients using a domain.
- 1.1.6: The API MUST provide a function for creating a client which accepts an optional domain parameter.
- 3.2.2.3: The API MUST have a method for setting evaluation context for a domain.
- 3.2.2.4: The API MUST have a mechanism to manage evaluation context for an associated domain.
Implementation Notes:
OpenFeatureAPI.setProvider(domain, provider) - Set provider for a domain
OpenFeatureAPI.setProviderAndWait(domain, provider) - Set provider for a domain (blocking)
OpenFeatureAPI.getClient(domain) - Get client bound to domain
OpenFeatureAPI.setContext(domain, context) - Set context for a domain
- Client event handlers should only fire for events from associated provider
Domains allow logical (late) binding of clients with providers, enabling multiple providers in a single application.
Specification References:
Implementation Notes:
OpenFeatureAPI.setProvider(domain, provider)- Set provider for a domainOpenFeatureAPI.setProviderAndWait(domain, provider)- Set provider for a domain (blocking)OpenFeatureAPI.getClient(domain)- Get client bound to domainOpenFeatureAPI.setContext(domain, context)- Set context for a domain