Repository navigation
Conversation
ldclient.async_datasystem is the async counterpart of ldclient.datasystem. It builds an AsyncDataSystemConfig with the same strategies: default, streaming, polling, custom, daemon and persistent store. Before this, an async user had to assemble AsyncDataSystemConfig from internal builders.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The sync client has
ldclient.datasystemto build its data system configuration. The async client had no public counterpart: its data source builders live underldclient.impl.datasourcev2, so an async user had to assemble anAsyncDataSystemConfigfrom internal classes.This adds
ldclient.async_datasystem, which mirrorsldclient.datasystemforAsyncDataSystemConfig:AsyncConfigBuilder, withinitializers,synchronizers,fdv1_compatible_synchronizeranddata_store.default,streaming,polling,custom,daemonandpersistent_storestrategies, with the same data sources as their sync equivalents.polling_ds_builder,streaming_ds_builderandfdv1_fallback_ds_builder.There is no file data source builder, because the SDK has no async file data source yet. The module is in the API docs and is marked experimental, as
AsyncDataSystemConfigis.This is a step toward removing the FDv1 data system, after which async users need a public way to pick polling, daemon mode or a persistent store.
Note
Overview
Adds
ldclient.async_datasystem, a public async counterpart toldclient.datasystem, soAsyncLDClientusers can buildAsyncDataSystemConfigwithout importing internaldatasourcev2builders.The module exposes
AsyncConfigBuilder(initializers, synchronizers, FDv1 fallback, async persistent store) plus preset strategiesdefault,streaming,polling,custom,daemon, andpersistent_store, along withpolling_ds_builder,streaming_ds_builder, andfdv1_fallback_ds_builder. There is no async file data source helper yet. The module is documented as experimental and is included in the API reference.Tests cover builder output for each strategy, session wiring for the default config, and end-to-end flag evaluation with a custom data system.
Reviewed by Cursor Bugbot for commit 1e97180. Bugbot is set up for automated code reviews on this repo. Configure here.