Skip to content

feat: implement the OFREP provider #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
lint: true
package:
- "providers/openfeature-provider-flagd"
- "providers/openfeature-provider-ofrep"
env:
MIX_ENV: test
defaults:
Expand Down
3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"providers/openfeature-provider-flagd": "0.1.0"
"providers/openfeature-provider-flagd": "0.1.0",
"providers/openfeature-provider-ofrep": "0.1.0"
}
5 changes: 5 additions & 0 deletions providers/openfeature-provider-ofrep/.formatter.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
line_length: 120
]
Empty file.
25 changes: 25 additions & 0 deletions providers/openfeature-provider-ofrep/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# OFREP Provider for OpenFeature

An OpenFeature provider for `OpenFeature Remote Evaluation Protocol (OFREP)`, enabling feature flag evaluation in Elixir over HTTP.

## Installation

Add `open_feature_provider_ofrep` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[
{:open_feature_provider_ofrep, "~> 0.1.0"}
]
end
```

## Usage

```elixir
provider = OpenFeature.Provider.OFREP.new(base_url: "http://ofrep-service:8016")
{:ok, _} = OpenFeature.set_provider(provider)

client = OpenFeature.get_client()
OpenFeature.Client.get_boolean_value(client, "my-feature", false)
```
Loading