1
1
Feature : Configuration Test
2
+ """markdown
3
+ This is the official option configuration table
4
+ | Option name | Environment variable name | Explanation | Type & Values | Default | Compatible resolver |
5
+ | --------------------- | ------------------------------ | ------------------------------------------------------------------------------- | ---------------------------- | ----------------------------- | ------------------- |
6
+ | resolver | FLAGD_RESOLVER | mode of operation | String - `rpc`, `in-process` | rpc | rpc & in-process |
7
+ | host | FLAGD_HOST | remote host | String | localhost | rpc & in-process |
8
+ | port | FLAGD_PORT | remote port | int | 8013 (rpc), 8015 (in-process) | rpc & in-process |
9
+ | targetUri | FLAGD_TARGET_URI | alternative to host/port, supporting custom name resolution | string | null | rpc & in-process |
10
+ | tls | FLAGD_TLS | connection encryption | boolean | false | rpc & in-process |
11
+ | socketPath | FLAGD_SOCKET_PATH | alternative to host port, unix socket | String | null | rpc & in-process |
12
+ | certPath | FLAGD_SERVER_CERT_PATH | tls cert path | String | null | rpc & in-process |
13
+ | deadlineMs | FLAGD_DEADLINE_MS | deadline for unary calls, and timeout for initialization | int | 500 | rpc & in-process |
14
+ | streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | deadline for streaming calls, useful as an application-layer keepalive | int | 600000 | rpc & in-process |
15
+ | retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | initial backoff for stream retry | int | 1000 | rpc & in-process |
16
+ | retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | maximum backoff for stream retry | int | 120000 | rpc & in-process |
17
+ | retryGraceAttempts | FLAGD_RETRY_GRACE_ATTEMPTS | amount of stream retry attempts before provider moves from STALE to ERROR state | int | 5 | rpc & in-process |
18
+ | keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | http 2 keepalive | long | 0 | rpc & in-process |
19
+ | cache | FLAGD_CACHE | enable cache of static flags | String - `lru`, `disabled` | lru | rpc |
20
+ | maxCacheSize | FLAGD_MAX_CACHE_SIZE | max size of static flag cache | int | 1000 | rpc |
21
+ | selector | FLAGD_SOURCE_SELECTOR | selects a single sync source to retrieve flags from only that source | string | null | in-process |
22
+ | offlineFlagSourcePath | FLAGD_OFFLINE_FLAG_SOURCE_PATH | offline, file-based flag definitions, overrides host/port/targetUri | string | null | in-process |
23
+ | offlinePollIntervalMs | FLAGD_OFFLINE_POLL_MS | poll interval for reading offlineFlagSourcePath | int | 5000 | in-process |
24
+ | contextEnricher | - | sync-metadata to evaluation context mapping function | function | identity function | in-process |
25
+ """
2
26
3
27
@rpc @in-process
4
28
Scenario Outline : Default Config
5
- When we initialize a config
29
+ When a config was initialized
6
30
Then the option "<option>" of type "<type>" should have the value "<default>"
7
31
Examples : Basic
8
- | option | type | default |
9
- | resolverType | ResolverType | rpc |
10
- | host | String | localhost |
11
- | port | Integer | 8013 |
12
- | tls | Boolean | false |
13
- | deadline | Integer | 500 |
32
+ | option | type | default |
33
+ | resolver | ResolverType | rpc |
34
+ | host | String | localhost |
35
+ | port | Integer | 8013 |
36
+ | tls | Boolean | false |
37
+ | deadlineMs | Integer | 500 |
38
+ @targetURI
39
+ Examples : Target URI
40
+ | option | type | default |
41
+ | targetUri | String | null |
14
42
@customCert
15
43
Examples : Certificates
16
44
| option | type | default |
@@ -21,54 +49,63 @@ Feature: Configuration Test
21
49
| socketPath | String | null |
22
50
@events
23
51
Examples : Events
24
- | option | type | default |
25
- | streamDeadlineMs | Integer | 600000 |
26
- | keepAlive | Long | 0 |
27
- | retryBackoffMs | Integer | 1000 |
52
+ | option | type | default |
53
+ | streamDeadlineMs | Integer | 600000 |
54
+ | keepAliveTime | Long | 0 |
55
+ | retryBackoffMs | Integer | 1000 |
56
+ | retryBackoffMaxMs | Integer | 120000 |
57
+ | retryGraceAttempts | Integer | 5 |
28
58
@sync
29
59
Examples : Sync
30
- | option | type | default |
31
- | streamDeadlineMs | Integer | 600000 |
32
- | keepAlive | Long | 0 |
33
- | retryBackoffMs | Integer | 1000 |
34
- | selector | String | null |
60
+ | option | type | default |
61
+ | streamDeadlineMs | Integer | 600000 |
62
+ | keepAliveTime | Long | 0 |
63
+ | retryBackoffMs | Integer | 1000 |
64
+ | retryBackoffMaxMs | Integer | 120000 |
65
+ | retryGraceAttempts | Integer | 5 |
66
+ | selector | String | null |
35
67
@caching
36
68
Examples : caching
37
69
| option | type | default |
38
- | cacheType | CacheType | lru |
70
+ | cache | CacheType | lru |
39
71
| maxCacheSize | Integer | 1000 |
40
72
@offline
41
73
Examples : offline
42
- | option | type | default |
43
- | offlineFlagSourcePath | String | null |
74
+ | option | type | default |
75
+ | offlineFlagSourcePath | String | null |
76
+ | offlinePollIntervalMs | Integer | 5000 |
44
77
45
78
@rpc
46
79
Scenario Outline : Default Config RPC
47
- When we initialize a config for "rpc"
80
+ When a config was initialized for "rpc"
48
81
Then the option "<option>" of type "<type>" should have the value "<default>"
49
82
Examples :
50
83
| option | type | default |
51
84
| port | Integer | 8013 |
52
85
53
86
@in-process
54
87
Scenario Outline : Default Config In-Process
55
- When we initialize a config for "in-process"
88
+ When a config was initialized for "in-process"
56
89
Then the option "<option>" of type "<type>" should have the value "<default>"
57
90
Examples :
58
91
| option | type | default |
59
92
| port | Integer | 8015 |
60
93
61
94
Scenario Outline : Dedicated Config
62
- When we have an option "<option>" of type "<type>" with value "<value>"
63
- And we initialize a config
95
+ Given an option "<option>" of type "<type>" with value "<value>"
96
+ When a config was initialized
64
97
Then the option "<option>" of type "<type>" should have the value "<value>"
65
98
Examples :
66
- | option | type | value |
67
- | resolverType | ResolverType | in -process |
68
- | host | String | local |
69
- | tls | Boolean | True |
70
- | port | Integer | 1234 |
71
- | deadline | Integer | 123 |
99
+ | option | type | value |
100
+ | resolver | ResolverType | in -process |
101
+ | host | String | local |
102
+ | tls | Boolean | True |
103
+ | port | Integer | 1234 |
104
+ | deadline | Integer | 123 |
105
+ @targetURI
106
+ Examples : Target URI
107
+ | option | type | value |
108
+ | targetUri | String | path |
72
109
@customCert
73
110
Examples :
74
111
| option | type | value |
@@ -79,41 +116,50 @@ Feature: Configuration Test
79
116
| socketPath | String | path |
80
117
@events
81
118
Examples :
82
- | option | type | value |
83
- | streamDeadlineMs | Integer | 500000 |
84
- | keepAlive | Long | 5 |
85
- | retryBackoffMs | Integer | 5000 |
119
+ | option | type | value |
120
+ | streamDeadlineMs | Integer | 500000 |
121
+ | keepAliveTime | Long | 5 |
122
+ | retryBackoffMs | Integer | 5000 |
123
+ | retryBackoffMaxMs | Integer | 12000 |
124
+ | retryGraceAttempts | Integer | 10 |
86
125
@sync
87
126
Examples :
88
- | option | type | value |
89
- | streamDeadlineMs | Integer | 500000 |
90
- | keepAlive | Long | 5 |
91
- | retryBackoffMs | Integer | 5000 |
92
- | selector | String | selector |
127
+ | option | type | value |
128
+ | streamDeadlineMs | Integer | 500000 |
129
+ | keepAliveTime | Long | 5 |
130
+ | retryBackoffMs | Integer | 5000 |
131
+ | retryBackoffMaxMs | Integer | 12000 |
132
+ | retryGraceAttempts | Integer | 10 |
133
+ | selector | String | selector |
93
134
@caching
94
135
Examples :
95
136
| option | type | value |
96
- | cacheType | CacheType | disabled |
137
+ | cache | CacheType | disabled |
97
138
| maxCacheSize | Integer | 1236 |
98
139
@offline
99
140
Examples :
100
- | option | type | value |
101
- | offlineFlagSourcePath | String | path |
141
+ | option | type | value |
142
+ | offlineFlagSourcePath | String | path |
143
+ | offlinePollIntervalMs | Integer | 1000 |
102
144
103
145
Scenario Outline : Dedicated Config via Env_var
104
- When we have an environment variable "<env>" with value "<value>"
105
- And we initialize a config
146
+ Given an environment variable "<env>" with value "<value>"
147
+ When a config was initialized
106
148
Then the option "<option>" of type "<type>" should have the value "<value>"
107
149
Examples :
108
- | option | env | type | value |
109
- | resolverType | FLAGD_RESOLVER | ResolverType | in -process |
110
- | resolverType | FLAGD_RESOLVER | ResolverType | IN -PROCESS |
111
- | resolverType | FLAGD_RESOLVER | ResolverType | rpc |
112
- | resolverType | FLAGD_RESOLVER | ResolverType | RPC |
113
- | host | FLAGD_HOST | String | local |
114
- | tls | FLAGD_TLS | Boolean | True |
115
- | port | FLAGD_PORT | Integer | 1234 |
116
- | deadline | FLAGD_DEADLINE_MS | Integer | 123 |
150
+ | option | env | type | value |
151
+ | resolver | FLAGD_RESOLVER | ResolverType | in -process |
152
+ | resolver | FLAGD_RESOLVER | ResolverType | IN -PROCESS |
153
+ | resolver | FLAGD_RESOLVER | ResolverType | rpc |
154
+ | resolver | FLAGD_RESOLVER | ResolverType | RPC |
155
+ | host | FLAGD_HOST | String | local |
156
+ | tls | FLAGD_TLS | Boolean | True |
157
+ | port | FLAGD_PORT | Integer | 1234 |
158
+ | deadline | FLAGD_DEADLINE_MS | Integer | 123 |
159
+ @targetURI
160
+ Examples : Target URI
161
+ | option | env | type | value |
162
+ | targetUri | FLAGD_TARGET_URI | String | path |
117
163
@customCert
118
164
Examples :
119
165
| option | env | type | value |
@@ -124,39 +170,48 @@ Feature: Configuration Test
124
170
| socketPath | FLAGD_SOCKET_PATH | String | path |
125
171
@events
126
172
Examples :
127
- | option | env | type | value |
128
- | streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 |
129
- | keepAlive | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 |
130
- | retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 |
173
+ | option | env | type | value |
174
+ | streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 |
175
+ | keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 |
176
+ | retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 |
177
+ | retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | Integer | 12000 |
178
+ | retryGraceAttempts | FLAGD_RETRY_GRACE_ATTEMPTS | Integer | 10 |
131
179
@sync
132
180
Examples :
133
- | option | env | type | value |
134
- | streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 |
135
- | keepAlive | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 |
136
- | retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 |
137
- | selector | FLAGD_SOURCE_SELECTOR | String | selector |
181
+ | option | env | type | value |
182
+ | streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 |
183
+ | keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 |
184
+ | retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 |
185
+ | retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | Integer | 12000 |
186
+ | retryGraceAttempts | FLAGD_RETRY_GRACE_ATTEMPTS | Integer | 10 |
187
+ | selector | FLAGD_SOURCE_SELECTOR | String | selector |
138
188
@caching
139
189
Examples :
140
190
| option | env | type | value |
141
- | cacheType | FLAGD_CACHE | CacheType | disabled |
191
+ | cache | FLAGD_CACHE | CacheType | disabled |
142
192
| maxCacheSize | FLAGD_MAX_CACHE_SIZE | Integer | 1236 |
143
193
@offline
144
194
Examples :
145
- | option | env | type | value |
146
- | offlineFlagSourcePath | FLAGD_OFFLINE_FLAG_SOURCE_PATH | String | path |
195
+ | option | env | type | value |
196
+ | offlineFlagSourcePath | FLAGD_OFFLINE_FLAG_SOURCE_PATH | String | path |
197
+ | offlinePollIntervalMs | FLAGD_OFFLINE_POLL_MS | Integer | 1000 |
147
198
148
199
Scenario Outline : Dedicated Config via Env_var and set
149
- When we have an environment variable "<env>" with value "<env-value>"
150
- And we have an option "<option>" of type "<type>" with value "<value>"
151
- And we initialize a config
200
+ Given an environment variable "<env>" with value "<env-value>"
201
+ And an option "<option>" of type "<type>" with value "<value>"
202
+ When a config was initialized
152
203
Then the option "<option>" of type "<type>" should have the value "<value>"
153
204
Examples :
154
- | option | env | type | value | env -value |
155
- | resolverType | FLAGD_RESOLVER | ResolverType | in -process | rpc |
156
- | host | FLAGD_HOST | String | local | l |
157
- | tls | FLAGD_TLS | Boolean | True | False |
158
- | port | FLAGD_PORT | Integer | 1234 | 3456 |
159
- | deadline | FLAGD_DEADLINE_MS | Integer | 123 | 345 |
205
+ | option | env | type | value | env -value |
206
+ | resolver | FLAGD_RESOLVER | ResolverType | in -process | rpc |
207
+ | host | FLAGD_HOST | String | local | l |
208
+ | tls | FLAGD_TLS | Boolean | True | False |
209
+ | port | FLAGD_PORT | Integer | 1234 | 3456 |
210
+ | deadline | FLAGD_DEADLINE_MS | Integer | 123 | 345 |
211
+ @targetURI
212
+ Examples : Target URI
213
+ | option | env | type | value | env -value |
214
+ | targetUri | FLAGD_TARGET_URI | String | path | fun |
160
215
@customCert
161
216
Examples :
162
217
| option | env | type | value | env -value |
@@ -167,23 +222,28 @@ Feature: Configuration Test
167
222
| socketPath | FLAGD_SOCKET_PATH | String | path | rpc |
168
223
@events
169
224
Examples :
170
- | option | env | type | value | env -value |
171
- | streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 | 400 |
172
- | keepAlive | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 | 4 |
173
- | retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 | 400 |
225
+ | option | env | type | value | env -value |
226
+ | streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 | 400 |
227
+ | keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 | 4 |
228
+ | retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 | 4 |
229
+ | retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | Integer | 12000 | 4 |
230
+ | retryGraceAttempts | FLAGD_RETRY_GRACE_ATTEMPTS | Integer | 10 | 4 |
174
231
@sync
175
232
Examples :
176
- | option | env | type | value | env -value |
177
- | streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 | 400 |
178
- | keepAlive | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 | 4 |
179
- | retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 | 400 |
180
- | selector | FLAGD_SOURCE_SELECTOR | String | selector | sele |
233
+ | option | env | type | value | env -value |
234
+ | streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 | 400 |
235
+ | keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 | 4 |
236
+ | retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 | 4 |
237
+ | retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | Integer | 12000 | 4 |
238
+ | retryGraceAttempts | FLAGD_RETRY_GRACE_ATTEMPTS | Integer | 10 | 4 |
239
+ | selector | FLAGD_SOURCE_SELECTOR | String | selector | sele |
181
240
@caching
182
241
Examples :
183
242
| option | env | type | value | env -value |
184
- | cacheType | FLAGD_CACHE | CacheType | disabled | lru |
243
+ | cache | FLAGD_CACHE | CacheType | disabled | lru |
185
244
| maxCacheSize | FLAGD_MAX_CACHE_SIZE | Integer | 1236 | 2345 |
186
245
@offline
187
246
Examples :
188
- | option | env | type | value | env -value |
189
- | offlineFlagSourcePath | FLAGD_OFFLINE_FLAG_SOURCE_PATH | String | path | lll |
247
+ | option | env | type | value | env -value |
248
+ | offlineFlagSourcePath | FLAGD_OFFLINE_FLAG_SOURCE_PATH | String | path | lll |
249
+ | offlinePollIntervalMs | FLAGD_OFFLINE_POLL_MS | Integer | 1000 | 4 |
0 commit comments