flipt_client 0.8.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- 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: 86617c811bf4e751f1adf5c35fd0d31dce7972008f750298ce3b68139cec9b76
|
4
|
+
data.tar.gz: 265a161fa3d212be996c5c95243573bc77981fef9c52acde70e85b1fec449311
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3efeca0a33a34e86e9adf3df75bae40045b46ba505a8578cafc26ad3552e6b111ad5d08fb055b8041c2de57c9c4ee4b82758bf673ca0bcd00c220a2de8511aba
|
7
|
+
data.tar.gz: 446c3d3dfca9e3fa6c1a10eff567da90ab5390b0b0d0cf1a90c1a6331d34ed8d156c15119d8678df2270fb7d875b8c653c1b124be871057f6a861edb889105de
|
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.10.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-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Flipt Client Evaluation SDK
|
14
14
|
email:
|