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
+7
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,13 @@ 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/flags.json).
49
49
50
+
#### Sync-metadata
51
+
52
+
To support the injection of contextual data configured in flagd for in-process evaluation, the provider exposes a `getSyncMetadata` accessor which provides the most recent value returned by the [GetMetadata RPC](https://buf.build/open-feature/flagd/docs/main:flagd.sync.v1#flagd.sync.v1.FlagSyncService.GetMetadata).
53
+
The value is updated with every (re)connection to the sync implementation.
54
+
This can be used to enrich evaluations with such data.
55
+
If the `in-process` mode is not used, and before the provider is ready, the `getSyncMetadata` returns an empty map.
56
+
50
57
#### Offline mode
51
58
52
59
In-process resolvers can also work in an offline mode.
Copy file name to clipboardexpand all lines: providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/process/storage/FlagStore.java
Copy file name to clipboardexpand all lines: providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/process/storage/connector/QueuePayload.java
Copy file name to clipboardexpand all lines: providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/process/storage/connector/file/FileConnector.java
+2-3
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,6 @@
5
5
importjava.nio.file.Files;
6
6
importjava.nio.file.Path;
7
7
importjava.nio.file.Paths;
8
-
importjava.util.Collections;
9
8
importjava.util.concurrent.BlockingQueue;
10
9
importjava.util.concurrent.LinkedBlockingQueue;
11
10
@@ -46,7 +45,7 @@ public void init() throws IOException {
Copy file name to clipboardexpand all lines: providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/process/storage/connector/grpc/GrpcStreamConnector.java
0 commit comments