Documentation
¶
Overview ¶
Package openfeature exposes an opinionated way to interact with OpenFeature using the GO Feature Flag provider.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Paths are the file paths containing the GO Feature Flag strategies. // // Required. Paths []string `json:"paths"` }
Config is used to configure the OpenFeature integration.
type OpenFeature ¶
type OpenFeature interface { EvaluateString(ctx context.Context, flag string, defaultValue string, target string) (openfeature.StringEvaluationDetails, error) EvaluateBoolean(ctx context.Context, flag string, defaultValue bool, target string) (openfeature.BooleanEvaluationDetails, error) EvaluateInteger(ctx context.Context, flag string, defaultValue int64, target string) (openfeature.IntEvaluationDetails, error) EvaluateFloat(ctx context.Context, flag string, defaultValue float64, target string) (openfeature.FloatEvaluationDetails, error) }
OpenFeature exposes an opinionated way to interact with the OpenFeature specification and GO Feature Flag provider, by bringing automatic distributed tracing as well as error recording within traces.
func Init ¶
func Init(cfg Config) (OpenFeature, error)
Init tries to create an OpenFeature client with the GO Feature Flag provider given the Config. Returns an error if Config is not valid or if the initialization failed.
Click to show internal directories.
Click to hide internal directories.