openfeature/ sub-module wraps an initialized *nexus.Client in an OpenFeature provider. It is published as a separate Go module so you only pull in the OpenFeature SDK dependency if you need it.
Installation
Install both the core SDK and the provider sub-module:Usage
Evaluation mapping
EvaluationContext is ignored. Nexus does not support per-user flag targeting. All successful evaluations return
STATIC reason. The context parameter is accepted to satisfy the OpenFeature interface but has no effect.Behavior notes
- Boolean flags use
GetFlag. All other types useGetConfig.GetFlagalways returns a value (default on miss), so boolean evaluations never produceFLAG_NOT_FOUND. - JSON number types. Config values decoded from JSON are
float64by default (encoding/jsonbehavior).IntEvaluationaccepts bothfloat64(JSON numbers) andint64.FloatEvaluationaccepts bothfloat64andfloat32. - No I/O in the provider. The provider is a thin delegation layer. All network activity (initial sync, background refresh, SSE stream) is handled by the
*nexus.Client. The OpenFeature evaluation calls never block on network. - Provider metadata name is
"Nexus".
