flipt_client 0.8.0 → 0.9.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 +19 -0
- data/lib/ext/darwin_arm64/libfliptengine.dylib +0 -0
- data/lib/ext/darwin_arm64/libfliptengine.rlib +0 -0
- data/lib/ext/darwin_x86_64/libfliptengine.dylib +0 -0
- data/lib/ext/darwin_x86_64/libfliptengine.rlib +0 -0
- data/lib/ext/linux_arm64/libfliptengine.rlib +0 -0
- data/lib/ext/linux_arm64/libfliptengine.so +0 -0
- data/lib/ext/linux_x86_64/libfliptengine.rlib +0 -0
- data/lib/ext/linux_x86_64/libfliptengine.so +0 -0
- data/lib/flipt_client/version.rb +1 -1
- data/lib/flipt_client.rb +11 -11
- 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: 9d7272b8279c1431c8cc1e464cec449a7d6c2c6c40a4892f3606c634dfd04f24
|
4
|
+
data.tar.gz: 41aabf46845348ee6c072e151342583b1e2d5ffae369c463f8aa1f2eb9d698a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0331b39703e02f7690313d8c95a184cb00436fc025963403f6613645f71877b7661e693a820c2aa6f8d03f019de083f5409211431a278394b8514e8fd1727fa
|
7
|
+
data.tar.gz: dbc6f543c9f22aa68c036676b5ad819a6ebef0a5dc1607eb507e19f029889386a21bf18cb3f2dae75d16d3d9e792c379f3113f9f90bad14fa46fdfa85b3d6019
|
data/README.md
CHANGED
@@ -55,6 +55,25 @@ resp = client.evaluate_variant({ flag_key: 'buzz', entity_id: 'someentity', cont
|
|
55
55
|
puts resp
|
56
56
|
```
|
57
57
|
|
58
|
+
### Constructor Arguments
|
59
|
+
|
60
|
+
The `Flipt::EvaluationClient` constructor accepts two optional arguments:
|
61
|
+
|
62
|
+
- `namespace`: The namespace to fetch flag state from. If not provided, the client will default to the `default` namespace.
|
63
|
+
- `engine_opts`: A hash that supports several options for the client. The structure is:
|
64
|
+
- `url`: The URL of the upstream Flipt instance. If not provided, the client will default to `http://localhost:8080`.
|
65
|
+
- `update_interval`: The interval (in seconds) in which to fetch new flag state. If not provided, the client will default to 120 seconds.
|
66
|
+
- `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.
|
67
|
+
- `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.
|
68
|
+
|
69
|
+
### Authentication
|
70
|
+
|
71
|
+
The `FliptEvaluationClient` supports the following authentication strategies:
|
72
|
+
|
73
|
+
- No Authentication (default)
|
74
|
+
- [Client Token Authentication](https://docs.flipt.io/authentication/using-tokens)
|
75
|
+
- [JWT Authentication](https://docs.flipt.io/authentication/using-jwts)
|
76
|
+
|
58
77
|
## Load Test
|
59
78
|
|
60
79
|
1. To run the load test, you'll need to have Flipt running locally. You can do this by running the following command from the root of the repository:
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/flipt_client/version.rb
CHANGED
data/lib/flipt_client.rb
CHANGED
@@ -14,19 +14,19 @@ module Flipt
|
|
14
14
|
|
15
15
|
FLIPTENGINE = 'libfliptengine'
|
16
16
|
|
17
|
+
LIB_FILES = {
|
18
|
+
/arm64-darwin/ => "ext/darwin_arm64/#{FLIPTENGINE}.dylib",
|
19
|
+
/x86_64-darwin/ => "ext/darwin_x86_64/#{FLIPTENGINE}.dylib",
|
20
|
+
/arm64-linux|aarch64-linux/ => "ext/linux_arm64/#{FLIPTENGINE}.so",
|
21
|
+
/x86_64-linux/ => "ext/linux_x86_64/#{FLIPTENGINE}.so"
|
22
|
+
}.freeze
|
23
|
+
|
17
24
|
def self.libfile
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
when /x86_64-darwin/
|
22
|
-
"ext/darwin_x86_64/#{FLIPTENGINE}.dylib"
|
23
|
-
when /arm64-linux|aarch64-linux/
|
24
|
-
"ext/linux_arm64/#{FLIPTENGINE}.so"
|
25
|
-
when /x86_64-linux/
|
26
|
-
"ext/linux_x86_64/#{FLIPTENGINE}.so"
|
27
|
-
else
|
28
|
-
raise "unsupported platform #{RbConfig::CONFIG['arch']}"
|
25
|
+
arch = RbConfig::CONFIG['arch']
|
26
|
+
LIB_FILES.each do |pattern, path|
|
27
|
+
return path if arch.match?(pattern)
|
29
28
|
end
|
29
|
+
raise "unsupported platform #{arch}"
|
30
30
|
end
|
31
31
|
|
32
32
|
ffi_lib File.expand_path(libfile, __dir__)
|
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.9.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: 2024-
|
11
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Flipt Client Evaluation SDK
|
14
14
|
email:
|