Skip to content

Commit 536de91

Browse files
feat(gofeatureflag): Add support of flag change cache removal (#821)
Signed-off-by: Thomas Poignant <[email protected]>
1 parent 67e8572 commit 536de91

17 files changed

+738
-411
lines changed

providers/go-feature-flag/README.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,16 @@ You will have a new instance ready to be used with your `open-feature` java SDK.
3939

4040
### Options
4141

42-
| name | mandatory | Description |
43-
|--------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
44-
| **`endpoint`** | `true` | endpoint contains the DNS of your GO Feature Flag relay proxy _(ex: https://mydomain.com/gofeatureflagproxy/)_ |
45-
| **`timeout`** | `false` | timeout in millisecond we are waiting when calling the go-feature-flag relay proxy API. _(default: 10000)_ |
46-
| **`maxIdleConnections`** | `false` | maxIdleConnections is the maximum number of connexions in the connexion pool. _(default: 1000)_ |
47-
| **`keepAliveDuration`** | `false` | keepAliveDuration is the time in millisecond we keep the connexion open. _(default: 7200000 (2 hours))_ |
48-
| **`apiKey`** | `false` | If the relay proxy is configured to authenticate the requests, you should provide an API Key to the provider. Please ask the administrator of the relay proxy to provide an API Key. (This feature is available only if you are using GO Feature Flag relay proxy v1.7.0 or above). _(default: null)_ |
49-
| **`enableCache`** | `false` | enable cache value. _(default: true)_ |
50-
| **`cacheBuilder`** | `false` | If cache custom configuration is wanted, you should provide a cache builder. _(default: null)_ |
51-
| **`flushIntervalMs`** | `false` | interval time we publish statistics collection data to the proxy. The parameter is used only if the cache is enabled, otherwise the collection of the data is done directly when calling the evaluation API. _(default: 1000 ms)_ |
52-
| **`maxPendingEvents`** | `false` | max pending events aggregated before publishing for collection data to the proxy. When event is added while events collection is full, event is omitted. _(default: 10000)_ |
42+
| name | mandatory | Description |
43+
|-----------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
44+
| **`endpoint`** | `true` | endpoint contains the DNS of your GO Feature Flag relay proxy _(ex: https://mydomain.com/gofeatureflagproxy/)_ |
45+
| **`timeout`** | `false` | timeout in millisecond we are waiting when calling the go-feature-flag relay proxy API. _(default: 10000)_ |
46+
| **`maxIdleConnections`** | `false` | maxIdleConnections is the maximum number of connexions in the connexion pool. _(default: 1000)_ |
47+
| **`keepAliveDuration`** | `false` | keepAliveDuration is the time in millisecond we keep the connexion open. _(default: 7200000 (2 hours))_ |
48+
| **`apiKey`** | `false` | If the relay proxy is configured to authenticate the requests, you should provide an API Key to the provider. Please ask the administrator of the relay proxy to provide an API Key. (This feature is available only if you are using GO Feature Flag relay proxy v1.7.0 or above). _(default: null)_ |
49+
| **`enableCache`** | `false` | enable cache value. _(default: true)_ |
50+
| **`cacheBuilder`** | `false` | If cache custom configuration is wanted, you should provide a cache builder. _(default: null)_ |
51+
| **`flushIntervalMs`** | `false` | interval time we publish statistics collection data to the proxy. The parameter is used only if the cache is enabled, otherwise the collection of the data is done directly when calling the evaluation API. _(default: 1000 ms)_ |
52+
| **`maxPendingEvents`** | `false` | max pending events aggregated before publishing for collection data to the proxy. When event is added while events collection is full, event is omitted. _(default: 10000)_ |
53+
| **`flagChangePollingIntervalMs`** | `false` | interval time we poll the proxy to check if the configuration has changed.<br/>If the cache is enabled, we will poll the relay-proxy every X milliseconds to check if the configuration has changed. _(default: 120000)_ |
54+
| **`disableDataCollection`** | `false` | set to true if you don't want to collect the usage of flags retrieved in the cache. _(default: false)_ |

providers/go-feature-flag/pom.xml

+6
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@
6868
<version>2.0.13</version>
6969
</dependency>
7070

71+
<dependency>
72+
<groupId>io.reactivex.rxjava3</groupId>
73+
<artifactId>rxjava</artifactId>
74+
<version>3.1.8</version>
75+
</dependency>
76+
7177
<dependency>
7278
<groupId>org.apache.logging.log4j</groupId>
7379
<artifactId>log4j-slf4j2-impl</artifactId>

providers/go-feature-flag/src/main/java/dev/openfeature/contrib/providers/gofeatureflag/EvaluationResponse.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
@Getter
1414
public class EvaluationResponse<T> {
1515
private ProviderEvaluation<T> providerEvaluation;
16-
private Boolean cachable;
16+
private Boolean cacheable;
1717
}

0 commit comments

Comments
 (0)