From 8088a6f16459a3947b9e57745a3c59e4bc78bc2e Mon Sep 17 00:00:00 2001 From: Cole Bailey Date: Wed, 1 May 2024 16:29:19 +0200 Subject: [PATCH] docs: configuration options in readme Signed-off-by: Cole Bailey --- .../openfeature-provider-flagd/README.md | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/providers/openfeature-provider-flagd/README.md b/providers/openfeature-provider-flagd/README.md index aa63c55..0782ceb 100644 --- a/providers/openfeature-provider-flagd/README.md +++ b/providers/openfeature-provider-flagd/README.md @@ -19,6 +19,19 @@ from openfeature.contrib.provider.flagd import FlagdProvider api.set_provider(FlagdProvider()) ``` + +To use in-process evaluation with flagd gRPC sync service: + +```python +from openfeature import api +from openfeature.contrib.provider.flagd import FlagdProvider +from openfeature.contrib.provider.flagd.config import ResolverType + +api.set_provider(FlagdProvider( + resolver_type=ResolverType.IN_PROCESS, +)) +``` + To use in-process evaluation in offline mode with a file as source: ```python @@ -36,12 +49,17 @@ api.set_provider(FlagdProvider( The default options can be defined in the FlagdProvider constructor. -| Option name | Type & Values | Default | -|----------------|---------------|-----------| -| host | str | localhost | -| port | int | 8013 | -| schema | str | http | -| timeout | int | 2 | +| Option name | Type & Values | Default | +|-------------------------------|---------------|-----------| +| resolver_type | enum | grpc | +| host | str | localhost | +| port | int | 8013 | +| tls | bool | false | +| timeout | int | 5 | +| retry_backoff_seconds | float | 2.0 | +| selector | str | None | +| offline_flag_source_path | str | None | +| offline_poll_interval_seconds | float | 1.0 | ## License