Categorygithub.com/Arthur1/openfeature-provider-go-aws-appconfig

# README

openfeature-provider-go-aws-appconfig

Go implementation of OpenFeature Provider for AWS AppConfig (Feature Flags).

Requirements

Go 1.22 or higher is required.

We supports latest two major releases of Go.

Usage

appName := "app" // Application name of AppConfig
envName := "env" // Environment name of AppConfig
cfgName := "cfg" // Configuration profile name of AppConfig
openfeature.SetProvider(appconfigprovider.New(appName, envName, cfgName))
client := openfeature.NewClient("app")
evalCtx := openfeature.NewTargetlessEvaluationContext(
	map[string]any{"userId": "userA"},
)
result, err := client.BooleanValueDetails(ctx, "feature1", false, evalCtx)

For more specific usage, please see an example.

Specifications

Currently, we ONLY support getting flags via AppConfig Agent. If you wish to obtain flags via AWS SDK, please contribute to this project.

This provider ONLY supports getting Boolean values, unless AppConfig Feature Flags supports non-boolean flag values.

The correspondence between data of AppConfig Feature Flags and boolean value details evaluated by the OpenFeature provider is shown in the following table:

Data of AppConfig Feature FlagsEvaluation Details of OpenFeature
feature flag keyflag key
enabled valuevalue (boolean)
variant (in multi variant flag)variant
attributesflag metadata

License

MIT License

Contact

Please contact me in GitHub issues or @Arthur1__ on X.

# Packages

No description provided by the author
No description provided by the author