package
1.13.0
Repository: https://github.com/open-feature/go-sdk.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

AddHandler allows to add API level event handler Deprecated: use github.com/open-feature/go-sdk/openfeature.AddHandler, instead.
AddHooks appends to the collection of any previously added hooks Deprecated: use github.com/open-feature/go-sdk/openfeature.AddHooks, instead.
NewClient returns a new Client.
NewClientMetadata constructs ClientMetadata Allows for simplified hook test cases while maintaining immutability Deprecated: use github.com/open-feature/go-sdk/openfeature.NewClientMetadata, instead.
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 Deprecated: use github.com/open-feature/go-sdk/openfeature.NewEvaluationContext, instead.
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 Deprecated: use github.com/open-feature/go-sdk/openfeature.NewHookContext, instead.
NewHookHints constructs HookHints Deprecated: use github.com/open-feature/go-sdk/openfeature.NewHookHints, instead.
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 Deprecated: use github.com/open-feature/go-sdk/openfeature.NewTargetlessEvaluationContext, instead.
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 Deprecated: use github.com/open-feature/go-sdk/openfeature.ProviderMetadata, instead.
RemoveHandler allows to remove API level event handler Deprecated: use github.com/open-feature/go-sdk/openfeature.RemoveHandler, instead.
SetEvaluationContext sets the global evaluation context.
SetLogger sets the global Logger.
SetNamedProvider sets a provider mapped to the given Client name.
SetProvider sets the default provider.
Shutdown active providers Deprecated: use github.com/open-feature/go-sdk/openfeature.Shutdown, instead.
WithHookHints applies provided hook hints.
WithHooks applies provided hooks.

# Constants

Deprecated: use github.com/open-feature/go-sdk/openfeature.Boolean, instead.
CachedReason - the resolved value was retrieved from cache Deprecated: use github.com/open-feature/go-sdk/openfeature.CachedReason, instead.
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.
Deprecated: use github.com/open-feature/go-sdk/openfeature.ErrorState, instead.
FlagNotFoundCode - the flag could not be found.
Deprecated: use github.com/open-feature/go-sdk/openfeature.Float, instead.
GeneralCode - the error was for a reason not enumerated above.
Deprecated: use github.com/open-feature/go-sdk/openfeature.Int, instead.
InvalidContextCode - the evaluation context does not meet provider requirements.
Deprecated: use github.com/open-feature/go-sdk/openfeature.NotReadyState, instead.
Deprecated: use github.com/open-feature/go-sdk/openfeature.Object, instead.
ParseErrorCode - an error was encountered parsing data, such as a flag configuration.
Deprecated: use github.com/open-feature/go-sdk/openfeature.ProviderConfigChange, instead.
Deprecated: use github.com/open-feature/go-sdk/openfeature.ProviderError, instead.
ProviderNotReadyCode - the value was resolved before the provider was ready.
Deprecated: use github.com/open-feature/go-sdk/openfeature.ProviderReady, instead.
Deprecated: use github.com/open-feature/go-sdk/openfeature.ProviderStale, instead.
Deprecated: use github.com/open-feature/go-sdk/openfeature.ReadyState, instead.
SplitReason - the resolved value was the result of pseudorandom assignment.
Deprecated: use github.com/open-feature/go-sdk/openfeature.StaleState, instead.
StaticReason - the resolved value is static (no dynamic evaluation) Deprecated: use github.com/open-feature/go-sdk/openfeature.StaticReason, instead.
Deprecated: use github.com/open-feature/go-sdk/openfeature.String, instead.
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.

# Type aliases

Deprecated: use github.com/open-feature/go-sdk/openfeature.BooleanEvaluationDetails, instead.
BoolResolutionDetail provides a resolution detail with boolean type Deprecated: use github.com/open-feature/go-sdk/openfeature.BoolResolutionDetail, instead.
Client implements the behaviour required of an openfeature client Deprecated: use github.com/open-feature/go-sdk/openfeature.Client, instead.
ClientMetadata provides a client's metadata Deprecated: use github.com/open-feature/go-sdk/openfeature.ClientMetadata, instead.
Deprecated: use github.com/open-feature/go-sdk/openfeature.ErrorCode, instead.
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.
Deprecated: use github.com/open-feature/go-sdk/openfeature.EvaluationDetails, instead.
EvaluationOptions should contain a list of hooks to be executed for a flag evaluation Deprecated: use github.com/open-feature/go-sdk/openfeature.EvaluationOptions, instead.
Event is an event emitted by a FeatureProvider.
Deprecated: use github.com/open-feature/go-sdk/openfeature.EventCallback, instead.
Deprecated: use github.com/open-feature/go-sdk/openfeature.EventDetails, instead.
EventHandler is the eventing contract enforced for FeatureProvider Deprecated: use github.com/open-feature/go-sdk/openfeature.EventHandler, instead.
EventType emitted by a provider implementation Deprecated: use github.com/open-feature/go-sdk/openfeature.EventType, instead.
FeatureProvider interface defines a set of functions that can be called in order to evaluate a flag.
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.
Deprecated: use github.com/open-feature/go-sdk/openfeature.FloatEvaluationDetails, instead.
FloatResolutionDetail provides a resolution detail with float64 type Deprecated: use github.com/open-feature/go-sdk/openfeature.FloatResolutionDetail, instead.
Hook allows application developers to add arbitrary behavior to the flag evaluation lifecycle.
HookContext defines the base level fields of a hook context Deprecated: use github.com/open-feature/go-sdk/openfeature.HookContext, instead.
HookHints contains a map of hints for hooks Deprecated: use github.com/open-feature/go-sdk/openfeature.HookHints, instead.
IClient defines the behaviour required of an openfeature client Deprecated: use github.com/open-feature/go-sdk/openfeature.IClient, instead.
Deprecated: use github.com/open-feature/go-sdk/openfeature.InterfaceEvaluationDetails, instead.
InterfaceResolutionDetail provides a resolution detail with interface{} type Deprecated: use github.com/open-feature/go-sdk/openfeature.InterfaceResolutionDetail, instead.
Deprecated: use github.com/open-feature/go-sdk/openfeature.IntEvaluationDetails, instead.
IntResolutionDetail provides a resolution detail with int64 type Deprecated: use github.com/open-feature/go-sdk/openfeature.IntResolutionDetail, instead.
Metadata provides provider name Deprecated: use github.com/open-feature/go-sdk/openfeature.Metadata, instead.
NoopEventHandler is the out-of-the-box EventHandler which is noop Deprecated: use github.com/open-feature/go-sdk/openfeature.NoopEventHandler, instead.
NoopProvider implements the FeatureProvider interface and provides functions for evaluating flags Deprecated: use github.com/open-feature/go-sdk/openfeature.NoopProvider, instead.
NoopStateHandler is a noop StateHandler implementation Status always set to ReadyState to comply with specification Deprecated: use github.com/open-feature/go-sdk/openfeature.NoopStateHandler, instead.
Option applies a change to EvaluationOptions Deprecated: use github.com/open-feature/go-sdk/openfeature.Option, instead.
ProviderEventDetails is the event payload emitted by FeatureProvider Deprecated: use github.com/open-feature/go-sdk/openfeature.ProviderEventDetails, instead.
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 Deprecated: use github.com/open-feature/go-sdk/openfeature.ProviderResolutionDetail, instead.
Reason indicates the semantic reason for a returned flag value Deprecated: use github.com/open-feature/go-sdk/openfeature.Reason, instead.
Deprecated: use github.com/open-feature/go-sdk/openfeature.ResolutionDetail, instead.
ResolutionError is an enumerated error code with an optional message Deprecated: use github.com/open-feature/go-sdk/openfeature.ResolutionError, instead.
State represents the status of the provider Deprecated: use github.com/open-feature/go-sdk/openfeature.State, instead.
StateHandler is the contract for initialization & shutdown.
Deprecated: use github.com/open-feature/go-sdk/openfeature.StringEvaluationDetails, instead.
StringResolutionDetail provides a resolution detail with string type Deprecated: use github.com/open-feature/go-sdk/openfeature.StringResolutionDetail, instead.
Type represents the type of a flag Deprecated: use github.com/open-feature/go-sdk/openfeature.Type, instead.
UnimplementedHook implements all hook methods with empty functions Include UnimplementedHook in your hook struct to avoid defining empty functions e.g.