Knowledge Base updated: 2026-11-22
go-feature-flag knowledge base
Orientation
go-feature-flag is a Go feature-flag SDK and service ecosystem. Its SDK loads flag configuration through retrievers, evaluates flags against contexts, and optionally emits events and change notifications.
Core evaluation state is held by the SDK’s flag store and evaluation models. Configuration arrives through retrievers; exporter and notifier managers process resulting events and configuration diffs.
The repository also ships a relay proxy for remote evaluation, CLI workflows for configuration operations, OpenFeature providers, and a separately versioned core evaluation module.
flowchart TD
Config[Flag configuration] --> Retrievers[Retriever integrations]
Retrievers --> SDK[Feature flag SDK]
SDK --> Context[Evaluation contexts]
Context --> Evaluation[Flag evaluation]
Evaluation --> Events[Event export pipeline]
Events --> Exporters[Exporter integrations]
Retrievers --> Diffs[Configuration diffs]
Diffs --> Notifiers[Change notifications]
SDK --> OF[OpenFeature providers]
SDK --> Relay[Relay proxy service]
Relay --> RelayAPI[Relay evaluation API]
Relay --> Deploy[Relay deployment]
CLI[CLI tools] --> SDK
Core[Core evaluation module] --> SDK
WASM[WASM evaluation runtime] --> Core
Glossary
- Retriever: a source adapter that supplies feature-flag configuration to the SDK.
- Evaluation context: the attributes about an entity used for targeting and variation resolution.
- Exporter: an event-delivery adapter managed by the SDK’s export pipeline.
- Relay proxy: the HTTP service that exposes remotely consumable flag evaluation and management behavior.
- Core module: the separately versioned reusable evaluation foundation within the repository.
Invariants
- Flag definitions must be validated against the configuration schema and domain models before they can be safely evaluated; see
config/**andmodel/**. - Targeting decisions are driven by evaluation contexts rather than application-specific request objects; see
ffcontext/**andevaluation/**. - Retriever implementations share a common integration contract so the SDK can manage updates consistently; see
retriever/**. - Exporter delivery is mediated through event and exporter management rather than individual callers sending directly to destinations; see exporter/feature_event.go and
exporter/**. - Relay proxy configuration is validated before serving its API surface; see cmd/…/config_validator.go and cmd/…/server.go.
Routing table
- go-feature-flag.go,
config/**,internal/**-> Feature flag SDK lifecycle config/**,retriever/**,internal/cache/**-> SDK configuration and flag retrievalevaluation/**,model/**,variation/**-> Flag evaluation and targetingffcontext/**,ffuser/**-> Evaluation contexts and usersretriever/**-> Flag retriever integrations- exporter/feature_event.go,
exporter/**,internal/exporter/**-> Event export pipeline exporter/*exporter/**-> Event exporter integrationsnotifier/**-> Flag change notificationscmd/relayproxy/**-> Relay proxy servicecmd/relayproxy/api/**,cmd/relayproxy/handler/**,cmd/relayproxy/service/**-> Relay proxy evaluation APIcmd/relayproxy/config/**,cmd/relayproxy/Dockerfile,charts/**,helm/**-> Relay proxy configuration and deploymentcmd/cli/**-> CLI toolscmd/cli/evaluate/**,cmd/cli/generate/**,cmd/cli/linter/**-> CLI evaluation, generation, and lintingopenfeature/**,examples/openfeature_*/**-> OpenFeature provider supportwasm/**,cmd/wasm/**-> WASM evaluation runtimeconfig/**,model/**,schema/**,dto/**-> Configuration schema and modelsgo.mod,core/**,evaluation/**,ffcontext/**-> Core evaluation module