openfeature-go-feature-flag-provider 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -0
- data/lib/openfeature/go-feature-flag/client/http_api.rb +3 -2
- data/lib/openfeature/go-feature-flag/go_feature_flag_provider.rb +1 -1
- data/lib/openfeature/go-feature-flag/options.rb +3 -2
- data/lib/openfeature/go-feature-flag/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0838c9664ebeca1013f90b3cc70c4beb1c42e5c7725b59b4a097a6be19662560'
|
|
4
|
+
data.tar.gz: a18db33dd6dd0d7be19cc9dbba2e30953c68e4b6ebcdf3ebde1a5e4fa1e15052
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6316d172b0d13e9900f3b31e20068fb80407feb9df3949bbeccf4b9eac29efdba2feb67ac5f2f45483d323302cbb8ead84d753b4199f409a4b14c186329f78bf
|
|
7
|
+
data.tar.gz: 8b3cc0c468d82c86fb6121430085dafd9f49c0c511bee805d4c39114927f92aedea2b6e71385b4dd8a3d28665719985cbcc7c97785cff10d5c3dcae9f6364d3f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.9](https://github.com/open-feature/ruby-sdk-contrib/compare/openfeature-go-feature-flag-provider/v0.1.8...openfeature-go-feature-flag-provider/v0.1.9) (2026-01-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ✨ New Features
|
|
7
|
+
|
|
8
|
+
* Timeout option for http client ([#76](https://github.com/open-feature/ruby-sdk-contrib/issues/76)) ([11e0de2](https://github.com/open-feature/ruby-sdk-contrib/commit/11e0de297527e90ee3dfcabf9d6bc35ff3149b9b))
|
|
9
|
+
|
|
3
10
|
## [0.1.8](https://github.com/open-feature/ruby-sdk-contrib/compare/openfeature-go-feature-flag-provider/v0.1.7...openfeature-go-feature-flag-provider/v0.1.8) (2026-01-13)
|
|
4
11
|
|
|
5
12
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -50,6 +50,7 @@ The `OpenFeature::GoFeatureFlag::Provider` needs some options to be created and
|
|
|
50
50
|
| `endpoint` | **(mandatory)** The URL to access to the relay-proxy.<br />*(example: `https://relay.proxy.gofeatureflag.org/`)* |
|
|
51
51
|
| `headers` | A `Hash` object containing the headers to send to the relay-proxy.<br/>*(example to send APIKey: `{"Authorization" => "Bearer my-api-key"}` |
|
|
52
52
|
| `instrumentation` | [Faraday instrumentation](https://github.com/lostisland/faraday/blob/main/docs/middleware/included/instrumentation.md) hash |
|
|
53
|
+
| `timeout` | Request timeout in seconds ([Faraday request options](https://rubydoc.info/github/lostisland/faraday/Faraday/Connection)). |
|
|
53
54
|
The only required option to create a `GoFeatureFlagProvider` is the URL _(`endpoint`)_ to your GO Feature Flag relay-proxy instance.
|
|
54
55
|
|
|
55
56
|
```ruby
|
|
@@ -7,9 +7,10 @@ module OpenFeature
|
|
|
7
7
|
module GoFeatureFlag
|
|
8
8
|
module Client
|
|
9
9
|
class HttpApi < Common
|
|
10
|
-
def initialize(endpoint: nil, custom_headers: nil, instrumentation: nil)
|
|
10
|
+
def initialize(endpoint: nil, custom_headers: nil, instrumentation: nil, timeout: nil)
|
|
11
11
|
@custom_headers = custom_headers
|
|
12
|
-
|
|
12
|
+
request_options = {timeout: timeout}
|
|
13
|
+
@faraday_connection = Faraday.new(url: endpoint, headers: headers, request: request_options) do |f|
|
|
13
14
|
f.request :instrumentation, instrumentation if instrumentation
|
|
14
15
|
f.adapter :net_http_persistent do |http|
|
|
15
16
|
http.idle_timeout = 30
|
|
@@ -103,7 +103,7 @@ module OpenFeature
|
|
|
103
103
|
def build_client(options)
|
|
104
104
|
case options.type
|
|
105
105
|
when "http"
|
|
106
|
-
Client::HttpApi.new(endpoint: options.endpoint, custom_headers: options.custom_headers, instrumentation: options.instrumentation)
|
|
106
|
+
Client::HttpApi.new(endpoint: options.endpoint, custom_headers: options.custom_headers, instrumentation: options.instrumentation, timeout: options.timeout)
|
|
107
107
|
when "unix"
|
|
108
108
|
Client::UnixApi.new(endpoint: options.endpoint, custom_headers: options.custom_headers)
|
|
109
109
|
else
|
|
@@ -6,9 +6,9 @@ module OpenFeature
|
|
|
6
6
|
module GoFeatureFlag
|
|
7
7
|
# This class is the configuration class for the GoFeatureFlagProvider
|
|
8
8
|
class Options
|
|
9
|
-
attr_accessor :endpoint, :custom_headers, :exporter_metadata, :instrumentation, :type
|
|
9
|
+
attr_accessor :endpoint, :custom_headers, :exporter_metadata, :instrumentation, :type, :timeout
|
|
10
10
|
|
|
11
|
-
def initialize(endpoint: nil, headers: {}, exporter_metadata: {}, instrumentation: nil, type: "http")
|
|
11
|
+
def initialize(endpoint: nil, headers: {}, exporter_metadata: {}, instrumentation: nil, type: "http", timeout: nil)
|
|
12
12
|
validate_endpoint(endpoint, type)
|
|
13
13
|
validate_instrumentation(instrumentation: instrumentation)
|
|
14
14
|
@type = type
|
|
@@ -16,6 +16,7 @@ module OpenFeature
|
|
|
16
16
|
@custom_headers = headers
|
|
17
17
|
@exporter_metadata = exporter_metadata
|
|
18
18
|
@instrumentation = instrumentation
|
|
19
|
+
@timeout = timeout
|
|
19
20
|
end
|
|
20
21
|
|
|
21
22
|
private
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openfeature-go-feature-flag-provider
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thomas Poignant
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: openfeature-sdk
|