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: openfeature-provider/go/README.md
+48-2Lines changed: 48 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,6 +140,8 @@ if err != nil {
140
140
Configure the provider behavior using environment variables:
141
141
142
142
-`CONFIDENCE_RESOLVER_POLL_INTERVAL_SECONDS`: How often to poll Confidence to get updates (default: `30` seconds)
143
+
-`CONFIDENCE_MATERIALIZATION_READ_TIMEOUT_SECONDS`: Timeout for remote materialization store read operations (default: `2` seconds)
144
+
-`CONFIDENCE_MATERIALIZATION_WRITE_TIMEOUT_SECONDS`: Timeout for remote materialization store write operations (default: `5` seconds)
143
145
144
146
### ProviderConfig
145
147
@@ -153,8 +155,12 @@ The `ProviderConfig` struct contains all configuration options for the provider:
153
155
154
156
-`Logger` (*slog.Logger): Custom logger for provider operations. If not provided, a default text logger is created. See [Logging](#logging) for details.
155
157
-`TransportHooks` (TransportHooks): Custom transport hooks for advanced use cases (e.g., custom gRPC interceptors, HTTP transport wrapping, TLS configuration)
156
-
-`MaterializationStore` (MaterializationStore): Custom storage for sticky variant assignments and materialized segments. If not provided, the provider will
157
-
fall back to default values for flags with rules that require materializations. See [Materialization Stores](#materialization-stores) for details.
158
+
-`MaterializationStore` (MaterializationStore): Storage for sticky variant assignments and materialized segments. Options include:
159
+
-`nil` (default): Falls back to default values for flags requiring materializations
160
+
-`NewRemoteMaterializationStore()`: Uses remote gRPC storage (recommended for getting started)
161
+
- Custom implementation: Your own storage (Redis, DynamoDB, etc.) for optimal performance
162
+
163
+
See [Materialization Stores](#materialization-stores) for details.
158
164
159
165
#### Advanced: Testing with Custom State Provider
160
166
@@ -186,6 +192,46 @@ Materialization stores provide persistent storage for sticky variant assignments
186
192
187
193
⚠️ Warning: If your flags rely on sticky assignments or materialized segments, the default SDK behaviour will prevent those rules from being applied and your evaluations will fall back to default values. For production workloads that need sticky behavior or segment lookups, implement and configure a real `MaterializationStore` (e.g., Redis, Bigtable, DynamoDB) to avoid unexpected fallbacks and ensure consistent variant assignment. ✅
188
194
195
+
### Remote Materialization Store
196
+
197
+
For quick setup without managing your own storage infrastructure, enable the built-in remote materialization store. This implementation stores materialization data via gRPC to the Confidence service.
198
+
199
+
**When to use**:
200
+
- You need sticky assignments or materialized segments but don't want to manage storage infrastructure
201
+
- Quick prototyping or getting started
202
+
- Lower-volume applications where network latency is acceptable
203
+
204
+
**Trade-offs**:
205
+
- Additional network calls during flag resolution (adds latency)
206
+
- Lower performance compared to local storage implementations (Redis, DynamoDB, etc.)
The remote store is created automatically by the provider with the correct gRPC connection and authentication.
234
+
189
235
### Custom Implementations
190
236
191
237
For improved latency and reduced network calls, you can implement your own `MaterializationStore` interface to store materialization data in your infrastructure (Redis, DynamoDB, etc.):
0 commit comments