flipt_client 0.15.0 → 0.17.0
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/README.md +16 -1
- data/lib/ext/{darwin_arm64 → darwin_aarch64}/libfliptengine.dylib +0 -0
- data/lib/ext/darwin_x86_64/libfliptengine.dylib +0 -0
- data/lib/ext/flipt_engine.h +9 -0
- data/lib/ext/{linux_arm64 → linux_aarch64}/libfliptengine.so +0 -0
- data/lib/ext/linux_x86_64/libfliptengine.so +0 -0
- data/lib/ext/windows_x86_64/fliptengine.dll +0 -0
- data/lib/flipt_client/version.rb +1 -1
- data/lib/flipt_client.rb +3 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6a5b035934ec3f271e01238a872154920c919c5561b41a98e9b5b853e0bbf90
|
4
|
+
data.tar.gz: 4cb2d36b85215238a791f283426b6e667adbfbb6e9d00d19d42ecaf209eda25a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65b002cca3c2b89c9588d36b62c13aa9c7ac07396efd207d67b7dea2b588847ad5946febcf4ac0b82180a2e0725030c6bf4ede11e29f3c49e180d2ce1b7956eb
|
7
|
+
data.tar.gz: 1987dd10cc71446fb3bdebc79637eaa9fee0cb4af66febe7afc7b5ad6f8bf619920c14f3c607f8535f54a7ff4e8ca356dd9d4b277e2af524e6de1bf0ee3c3a52
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Flipt Client Ruby
|
2
2
|
|
3
|
-
[](https://badge.fury.io/rb/flipt_client)
|
4
4
|
|
5
5
|
The `flipt-client-ruby` library contains the Ruby source code for the Flipt [client-side evaluation](https://www.flipt.io/docs/integration/client) client.
|
6
6
|
|
@@ -32,6 +32,20 @@ By default, the SDK will poll the Flipt server for new flag state at a regular i
|
|
32
32
|
|
33
33
|
When in streaming mode, the SDK will connect to the Flipt server and open a persistent connection that will remain open until the client is closed. The SDK will then receive flag state changes in real-time.
|
34
34
|
|
35
|
+
### Retries
|
36
|
+
|
37
|
+
The SDK will automatically retry fetching (or initiating streaming) flag state if the client is unable to reach the Flipt server temporarily.
|
38
|
+
|
39
|
+
The SDK will retry up to 3 times with an exponential backoff interval between retries. The base delay is 1 second and the maximum delay is 30 seconds.
|
40
|
+
|
41
|
+
Retriable errors include:
|
42
|
+
|
43
|
+
- `429 Too Many Requests`
|
44
|
+
- `502 Bad Gateway`
|
45
|
+
- `503 Service Unavailable`
|
46
|
+
- `504 Gateway Timeout`
|
47
|
+
- Other potential transient network or DNS errors
|
48
|
+
|
35
49
|
## Supported Architectures
|
36
50
|
|
37
51
|
This SDK currently supports the following OSes/architectures:
|
@@ -85,6 +99,7 @@ The `Flipt::EvaluationClient` constructor accepts two optional arguments:
|
|
85
99
|
- `namespace`: The namespace to fetch flag state from. If not provided, the client will default to the `default` namespace.
|
86
100
|
- `opts`: A hash that supports several options for the client. The structure is:
|
87
101
|
- `url`: The URL of the upstream Flipt instance. If not provided, the client will default to `http://localhost:8080`.
|
102
|
+
- `request_timeout`: The timeout (in seconds) for total request time to the upstream Flipt instance. If not provided, the client will default to no timeout. Note: this only affects polling mode. Streaming mode will have no timeout set.
|
88
103
|
- `update_interval`: The interval (in seconds) in which to fetch new flag state. If not provided, the client will default to 120 seconds.
|
89
104
|
- `authentication`: The authentication strategy to use when communicating with the upstream Flipt instance. If not provided, the client will default to no authentication. See the [Authentication](#authentication) section for more information.
|
90
105
|
- `reference`: The [reference](https://docs.flipt.io/guides/user/using-references) to use when fetching flag state. If not provided, reference will not be used.
|
Binary file
|
Binary file
|
data/lib/ext/flipt_engine.h
CHANGED
@@ -52,3 +52,12 @@ void destroy_engine(void *engine_ptr);
|
|
52
52
|
* See Rust the safety section in CString::from_raw.
|
53
53
|
*/
|
54
54
|
void destroy_string(char *ptr);
|
55
|
+
|
56
|
+
// Add missing external declarations for Rust functions
|
57
|
+
extern void* initialize_engine_ffi(const char* namespace, const char* options);
|
58
|
+
extern const char* evaluate_boolean_ffi(void* engine, const char* request);
|
59
|
+
extern const char* evaluate_variant_ffi(void* engine, const char* request);
|
60
|
+
extern const char* evaluate_batch_ffi(void* engine, const char* request);
|
61
|
+
extern const char* list_flags_ffi(void* engine);
|
62
|
+
extern void destroy_engine_ffi(void* engine);
|
63
|
+
extern void destroy_string_ffi(char* str);
|
Binary file
|
Binary file
|
Binary file
|
data/lib/flipt_client/version.rb
CHANGED
data/lib/flipt_client.rb
CHANGED
@@ -15,9 +15,9 @@ module Flipt
|
|
15
15
|
FLIPTENGINE = 'fliptengine'
|
16
16
|
|
17
17
|
LIB_FILES = {
|
18
|
-
/arm64-darwin/ => "ext/
|
18
|
+
/arm64-darwin/ => "ext/darwin_aarch64/lib#{FLIPTENGINE}.dylib",
|
19
19
|
/x86_64-darwin/ => "ext/darwin_x86_64/lib#{FLIPTENGINE}.dylib",
|
20
|
-
/arm64-linux|aarch64-linux/ => "ext/
|
20
|
+
/arm64-linux|aarch64-linux/ => "ext/linux_aarch64/lib#{FLIPTENGINE}.so",
|
21
21
|
/x86_64-linux/ => "ext/linux_x86_64/lib#{FLIPTENGINE}.so",
|
22
22
|
/x86_64-mingw32/ => "ext/windows_x86_64/#{FLIPTENGINE}.dll"
|
23
23
|
}.freeze
|
@@ -53,6 +53,7 @@ module Flipt
|
|
53
53
|
# @param opts [Hash] options
|
54
54
|
# @option opts [String] :url Flipt server url
|
55
55
|
# @option opts [AuthenticationStrategy] :authentication strategy to authenticate with Flipt
|
56
|
+
# @option opts [Integer] :request_timeout timeout in seconds for the request
|
56
57
|
# @option opts [Integer] :update_interval interval in seconds to update the cache
|
57
58
|
# @option opts [String] :reference reference to use for namespace data
|
58
59
|
# @option opts [Symbol] :fetch_mode fetch mode to use for the client (:polling or :streaming).
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipt_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flipt Devs
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Flipt Client Evaluation SDK
|
14
14
|
email:
|
@@ -19,10 +19,10 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- README.md
|
21
21
|
- flipt-client-ruby.gemspec
|
22
|
-
- lib/ext/
|
22
|
+
- lib/ext/darwin_aarch64/libfliptengine.dylib
|
23
23
|
- lib/ext/darwin_x86_64/libfliptengine.dylib
|
24
24
|
- lib/ext/flipt_engine.h
|
25
|
-
- lib/ext/
|
25
|
+
- lib/ext/linux_aarch64/libfliptengine.so
|
26
26
|
- lib/ext/linux_x86_64/libfliptengine.so
|
27
27
|
- lib/ext/windows_x86_64/fliptengine.dll
|
28
28
|
- lib/flipt_client.rb
|