You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: providers/flagd/README.md
+20-13
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,8 @@ FlagdProvider flagdProvider = new FlagdProvider(
47
47
48
48
In the above example, in-process handlers attempt to connect to a sync service on address `localhost:8013` to obtain [flag definitions](https://github.com/open-feature/schemas/blob/main/json/flagd-definitions.json).
49
49
50
+
#### Offline mode
51
+
50
52
In-process resolvers can also work in an offline mode.
51
53
To enable this mode, you should provide a valid flag configuration file with the option `offlineFlagSourcePath`.
52
54
@@ -58,9 +60,13 @@ FlagdProvider flagdProvider = new FlagdProvider(
58
60
.build());
59
61
```
60
62
61
-
Provider will not detect file changes nor re-read the file after the initial read.
62
-
This mode is useful for local development, test cases, and offline applications.
63
-
For a full-featured, production-ready file-based implementation, use the RPC evaluator in combination with the flagd standalone application, which can be configured to watch files for changes.
63
+
Provider will attempt to detect file changes using polling.
64
+
Polling happens at 5 second intervals and this is currently unconfigurable.
65
+
This mode is useful for local development, tests and offline applications.
66
+
67
+
> [!IMPORTANT]
68
+
> Note that you can only use a single flag source (either gRPC or offline file) for the in-process resolver.
69
+
> If both sources are configured, offline mode will be selected.
64
70
65
71
### Configuration options
66
72
@@ -73,17 +79,18 @@ Given below are the supported configurations:
73
79
74
80
| Option name | Environment variable name | Type & Values | Default | Compatible resolver |
Copy file name to clipboardExpand all lines: providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/process/InProcessResolver.java
+7-5
Original file line number
Diff line number
Diff line change
@@ -46,11 +46,7 @@ public class InProcessResolver implements Resolver {
Copy file name to clipboardExpand all lines: providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/reconnect/steps/StepDefinitions.java
+1-1
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ public class StepDefinitions {
45
45
* Tests run one at a time, but just in case, a lock is used to make sure the
Copy file name to clipboardExpand all lines: providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/resolver/process/InProcessResolverTest.java
0 commit comments