# Packages
No description provided by the author
# Functions
AddHandler allows to add API level event handler.
AddHooks appends to the collection of any previously added hooks.
GetApiInstance returns the current singleton IEvaluation instance.
MergeTransactionContext merges the provided EvaluationContext with the current TransactionContext (if it exists)
ctx - the context to pull existing TransactionContext from ec - the EvaluationContext to merge with the existing TransactionContext.
NamedProviderMetadata returns the named provider's Metadata.
NewClient returns a new Client.
NewClientMetadata constructs ClientMetadata Allows for simplified hook test cases while maintaining immutability.
NewEvaluationContext constructs an EvaluationContext
targetingKey - uniquely identifying the subject (end-user, or client service) of a flag evaluation attributes - contextual data used in flag evaluation.
NewFlagNotFoundResolutionError constructs a resolution error with code FLAG_NOT_FOUND
Explanation - The flag could not be found.
NewGeneralResolutionError constructs a resolution error with code GENERAL
Explanation - The error was for a reason not enumerated above.
NewHookContext constructs HookContext Allows for simplified hook test cases while maintaining immutability.
NewHookHints constructs HookHints.
NewInvalidContextResolutionError constructs a resolution error with code INVALID_CONTEXT
Explanation - The evaluation context does not meet provider requirements.
NewParseErrorResolutionError constructs a resolution error with code PARSE_ERROR
Explanation - An error was encountered parsing data, such as a flag configuration.
NewProviderNotReadyResolutionError constructs a resolution error with code PROVIDER_NOT_READY
Explanation - The value was resolved before the provider was ready.
NewTargetingKeyMissingResolutionError constructs a resolution error with code TARGETING_KEY_MISSING
Explanation - The provider requires a targeting key and one was not provided in the evaluation context.
NewTargetlessEvaluationContext constructs an EvaluationContext with an empty targeting key
attributes - contextual data used in flag evaluation.
NewTypeMismatchResolutionError constructs a resolution error with code TYPE_MISMATCH
Explanation - The type of the flag value does not match the expected type.
ProviderMetadata returns the default provider's metadata.
RemoveHandler allows to remove API level event handler.
SetEvaluationContext sets the global evaluation context.
SetLogger sets the global Logger.
SetNamedProvider sets a provider mapped to the given Client domain.
SetNamedProviderAndWait sets a provider mapped to the given Client domain and waits for its initialization.
SetProvider sets the default provider.
SetProviderAndWait sets the default provider and waits for its initialization.
Shutdown active providers.
TransactionContext extracts a EvaluationContext from the current golang.org/x/net/context.
WithHookHints applies provided hook hints.
WithHooks applies provided hooks.
NewTransactionContext constructs a TransactionContext
ctx - the context to embed the EvaluationContext in ec - the EvaluationContext to embed into the context.
# Constants
No description provided by the author
CachedReason - the resolved value was retrieved from cache.
DefaultReason - the resolved value was configured statically, or otherwise fell back to a pre-configured value.
DisabledReason - the resolved value was the result of the flag being disabled in the management system.
ErrorReason - the resolved value was the result of an error.
No description provided by the author
FlagNotFoundCode - the flag could not be found.
No description provided by the author
GeneralCode - the error was for a reason not enumerated above.
No description provided by the author
InvalidContextCode - the evaluation context does not meet provider requirements.
No description provided by the author
No description provided by the author
ParseErrorCode - an error was encountered parsing data, such as a flag configuration.
No description provided by the author
No description provided by the author
ProviderNotReadyCode - the value was resolved before the provider was ready.
No description provided by the author
No description provided by the author
No description provided by the author
SplitReason - the resolved value was the result of pseudorandom assignment.
No description provided by the author
StaticReason - the resolved value is static (no dynamic evaluation).
No description provided by the author
evaluation context map key.
TargetingKeyMissingCode - the provider requires a targeting key and one was not provided in the evaluation context.
TargetingMatchReason - the resolved value was the result of a dynamic evaluation, such as a rule or specific user-targeting.
TypeMismatchCode - the type of the flag value does not match the expected type.
UnknownReason - the reason for the resolved value could not be determined.
# Structs
No description provided by the author
BoolResolutionDetail provides a resolution detail with boolean type.
Client implements the behaviour required of an openfeature client.
ClientMetadata provides a client's metadata.
EvaluationContext provides ambient information for the purposes of flag evaluation The use of the constructor, NewEvaluationContext, is enforced to set EvaluationContext's fields in order to enforce immutability.
No description provided by the author
EvaluationOptions should contain a list of hooks to be executed for a flag evaluation.
Event is an event emitted by a FeatureProvider.
No description provided by the author
No description provided by the author
FloatResolutionDetail provides a resolution detail with float64 type.
HookContext defines the base level fields of a hook context.
HookHints contains a map of hints for hooks.
No description provided by the author
InterfaceResolutionDetail provides a resolution detail with interface{} type.
No description provided by the author
IntResolutionDetail provides a resolution detail with int64 type.
Metadata provides provider name.
NoopEventHandler is the out-of-the-box EventHandler which is noop.
NoopProvider implements the FeatureProvider interface and provides functions for evaluating flags.
NoopStateHandler is a noop StateHandler implementation Status always set to ReadyState to comply with specification.
ProviderEventDetails is the event payload emitted by FeatureProvider.
ProviderResolutionDetail is a structure which contains a subset of the fields defined in the EvaluationDetail, representing the result of the provider's flag resolution process see https://github.com/open-feature/spec/blob/main/specification/types.md#resolution-details N.B we could use generics but to support older versions of go for now we will have type specific resolution detail.
No description provided by the author
ResolutionError is an enumerated error code with an optional message.
No description provided by the author
StringResolutionDetail provides a resolution detail with string type.
UnimplementedHook implements all hook methods with empty functions Include UnimplementedHook in your hook struct to avoid defining empty functions e.g.
# Interfaces
EventHandler is the eventing contract enforced for FeatureProvider.
FeatureProvider interface defines a set of functions that can be called in order to evaluate a flag.
Hook allows application developers to add arbitrary behavior to the flag evaluation lifecycle.
IClient defines the behaviour required of an OpenFeature client.
IEvaluation defines the OpenFeature API contract.
IEventing defines the OpenFeature eventing contract.
StateHandler is the contract for initialization & shutdown.
# Type aliases
No description provided by the author
EventType emitted by a provider implementation.
FlagMetadata is a structure which supports definition of arbitrary properties, with keys of type string, and values of type boolean, string, int64 or float64.
FlattenedContext contains metadata for a given flag evaluation in a flattened structure.
Option applies a change to EvaluationOptions.
Reason indicates the semantic reason for a returned flag value.
State represents the status of the provider.
Type represents the type of a flag.