OpenFeature: Add OFREP provider type (#115857)

Add new OFREP provider for OpenFeature
This commit is contained in:
Matt Cowley
2026-01-06 14:39:07 +00:00
committed by GitHub
parent 7698970f22
commit 264131a390
6 changed files with 75 additions and 32 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ import (
const (
StaticProviderType = "static"
GOFFProviderType = "goff"
OFREPProviderType = "ofrep"
)
type OpenFeatureSettings struct {
@@ -33,7 +34,7 @@ func (cfg *Cfg) readOpenFeatureSettings() error {
cfg.OpenFeature.TargetingKey = config.Key("targetingKey").MustString(defaultTargetingKey)
if strURL != "" && cfg.OpenFeature.ProviderType == GOFFProviderType {
if strURL != "" && (cfg.OpenFeature.ProviderType == GOFFProviderType || cfg.OpenFeature.ProviderType == OFREPProviderType) {
u, err := url.Parse(strURL)
if err != nil {
return fmt.Errorf("invalid feature provider url: %w", err)