OpenFeature & OFREP Native
Use standard OpenFeature SDKs in any language over HTTP using the OpenFeature Remote Evaluation Protocol (OFREP).
A lightweight feature flag relay proxy and embeddable Go engine with native OpenFeature OFREP support.
Build and run the relay proxy locally with a file retriever, or pull the container image from ghcr.io/blackbirdworks/semaphore:
# flags.yaml
new-checkout:
variations:
enabled: true
disabled: false
targeting:
- name: beta users
query: beta eq true
variation: enabled
defaultRule:
variation: disabled# semaphore-proxy.yaml
pollingInterval: 1000
retrievers:
- kind: file
path: ./flags.yaml./out/bin/semaphore --config semaphore-proxy.yamlEvaluate the flag over OFREP:
curl -s http://localhost:1031/ofrep/v1/evaluate/flags/new-checkout -X POST \
-H 'Content-Type: application/json' \
--data-raw '{"context": {"targetingKey": "user-123", "beta": true}}'{
"key": "new-checkout",
"value": true,
"reason": "TARGETING_MATCH",
"variant": "enabled",
"metadata": {
"evaluatedRuleName": "beta users",
"gofeatureflag_cacheable": true,
"semaphore_cacheable": true
}
}