Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configured ¶
func Configured(client Client, cfg commoncfg.FeatureFlags) bool
Configured reports whether feature flags are active for this deployment: a non-nil client is present AND the deployment enabled feature flags. It mirrors the guard in Init.
This matters because NewClient always returns a non-nil client, even when no provider is registered. Callers must check the config flag too before trusting flag lookups; otherwise every lookup resolves to its default value.
func Init ¶
func Init(cfg commoncfg.FeatureFlags) error
Init registers the EmbeddedProvider as the global OpenFeature provider when cfg.Enabled is true. It is a no-op when feature flags are disabled.
Types ¶
type Client ¶
type Client interface {
BooleanValue(
ctx context.Context, flag string, defaultValue bool, evalCtx openfeature.EvaluationContext,
) (bool, error)
}
Client abstracts OpenFeature boolean flag evaluation.
Click to show internal directories.
Click to hide internal directories.