Protected
_apiProtected
_clientProtected
_contextProtected
_defaultProtected
_domainProtected
_domainProtected
_hooksProtected
_loggerProtected
_runsProtected
_statusProvider Metadata
Protected
_createAdds a handler for the given provider event type. The handlers are called in the order they have been added. API (global) events run for all providers.
The provider event type to listen to
The handler to run on occurrence of the event type
Adds hooks that will run during flag evaluations on this receiver. Hooks are executed in the order they were registered. Adding additional hooks will not remove existing hooks. Hooks registered on the global API object run with all evaluations. Hooks registered on the client run with all evaluations on that client.
Rest
...hooks: Hook[]A list of hooks that should always run
The receiver (this object)
Protected
buildOptional
domain: stringResets the global evaluation context to an empty object.
Removes the evaluation context for a specific named client.
An identifier which logically binds clients with providers
Protected
clearProtected
getA factory function for creating new named OpenFeature clients. Clients can contain their own state (e.g. logger, hook, context). Multiple clients can be used to segment feature flag configuration.
If there is already a provider bound to this name via this.setProvider setProvider, this provider will be used. Otherwise, the default provider is used until a provider is assigned to that name.
Optional
domain: stringAn identifier which logically binds clients with providers
Optional
version: stringThe version of the client (only used for metadata)
OpenFeature Client
Access the global evaluation context.
Evaluation context
Access the evaluation context for a specific named client. The global evaluation context is returned if a matching named client is not found.
Optional
domain: stringAn identifier which logically binds clients with providers
Evaluation context
Gets the current handlers for the given provider event type.
The provider event type to get the current handlers for
The handlers currently attached to the given provider event type
Protected
getGet metadata about a registered provider using the client name. An unbound or empty client name will return metadata from the default provider.
Optional
domain: stringAn identifier which logically binds clients with providers
Provider Metadata
Removes a handler for the given provider event type.
The provider event type to remove the listener for
The handler to remove for the provider event type
Protected
setSets the evaluation context globally. This will be used by all providers that have not bound to a domain.
Evaluation context
Sets the evaluation context for a specific provider. This will only affect providers bound to a domain.
An identifier which logically binds clients with providers
Evaluation context
Sets a logger on this receiver. This logger supersedes to the global logger and is passed to various components in the SDK. The logger configured on the global API object will be used for all evaluations, unless overridden in a particular client.
The logger to be used
The receiver (this object)
Sets the default provider for flag evaluations. This provider will be used by domainless clients and clients associated with domains to which no provider is bound. Setting a provider supersedes the current provider used in new and existing unbound clients.
The provider responsible for flag evaluations.
OpenFeature API
Sets the default provider and evaluation context for flag evaluations. This provider will be used by domainless clients and clients associated with domains to which no provider is bound. Setting a provider supersedes the current provider used in new and existing unbound clients.
The provider responsible for flag evaluations.
{EvaluationContext} The evaluation context to use for flag evaluations.
OpenFeature API
Sets the provider for flag evaluations of providers with the given name. Setting a provider supersedes the current provider used in new and existing clients bound to the same domain.
The name to identify the client
The provider responsible for flag evaluations.
OpenFeature API
Sets the provider and evaluation context flag evaluations of providers with the given name. Setting a provider supersedes the current provider used in new and existing clients bound to the same domain.
The name to identify the client
The provider responsible for flag evaluations.
{EvaluationContext} The evaluation context to use for flag evaluations.
OpenFeature API
Sets the default provider for flag evaluations and returns a promise that resolves when the provider is ready. This provider will be used by domainless clients and clients associated with domains to which no provider is bound. Setting a provider supersedes the current provider used in new and existing unbound clients.
The provider responsible for flag evaluations.
Sets the default provider for flag evaluations and returns a promise that resolves when the provider is ready. This provider will be used by domainless clients and clients associated with domains to which no provider is bound. Setting a provider supersedes the current provider used in new and existing unbound clients.
The provider responsible for flag evaluations.
The evaluation context to use for flag evaluations.
Sets the provider that OpenFeature will use for flag evaluations on clients bound to the same domain. A promise is returned that resolves when the provider is ready. Setting a provider supersedes the current provider used in new and existing clients bound to the same domain.
The name to identify the client
The provider responsible for flag evaluations.
Sets the provider that OpenFeature will use for flag evaluations on clients bound to the same domain. A promise is returned that resolves when the provider is ready. Setting a provider supersedes the current provider used in new and existing clients bound to the same domain.
The name to identify the client
The provider responsible for flag evaluations.
The evaluation context to use for flag evaluations.
Get metadata about the default provider.