abstract class OpenFeature::Provider
- OpenFeature::Provider
- Reference
- Object
Overview
The provider API defines interfaces that Provider Authors can use to abstract a particular flag management system, thus enabling the use of the evaluation API by Application Authors.
Providers are the "translator" between the flag evaluation calls made in application code, and the flag management system that stores flags and in some cases evaluates flags. At a minimum, providers should implement some basic evaluation methods which return flag values of the expected type. In addition, providers may transform the evaluation context appropriately in order to be used in dynamic evaluation of their associated flag management system, provide insight into why evaluation proceeded the way it did, and expose configuration options for their associated flag management system. Hypothetical provider implementations might wrap a vendor SDK, embed an REST client, or read flags from a local file.
Direct Known Subclasses
Defined in:
openfeature/provider.crConstructors
Instance Method Summary
-
#add_client(client : Client)
adds the passed client to the list of clients
- #evaluation_context : EvaluationContext
- #metadata : Metadata
- #name : String
-
#remove_client(client : Client)
remove the clinet from the provider
- #resolve_boolean_value(flag_key : FlagKey, default : Bool = true, ctx : EvaluationContext | Nil = nil) : ResolutionDetails
- #resolve_number_value(flag_key : FlagKey, default : Number = 0, ctx : EvaluationContext | Nil = nil) : ResolutionDetails
- #resolve_object_value(flag_key : FlagKey, default : Structure, ctx : EvaluationContext | Nil = nil) : ResolutionDetails
- #resolve_string_value(flag_key : FlagKey, default : String = "", ctx : EvaluationContext | Nil = nil) : ResolutionDetails
- #state : ProviderEvent