fix: Add doctests for the FDv2 config and custom-source APIs - #199
Merged
Conversation
beekld
force-pushed
the
bklimt/SDK-3054/fdv2-config-doctests
branch
from
September 4, 2026 17:48
2da4f6d to
d1fb33f
Compare
beekld
marked this pull request as ready for review
September 4, 2026 17:55
keelerm84
approved these changes
Sep 4, 2026
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 FDv2 data system builders shipped without the usage examples their FDv1 counterparts carry. This adds runnable doctests across the FDv2 configuration builders to close that gap, plus an example on the experimental
data_sourcesmodule showing how to implement a custom synchronizer.Writing the custom-source example surfaced that the public
SynchronizerandInitializertraits returnedfutures::future::BoxFuture, which forces anyone implementing a source to take a directfuturesdependency. This replaces that with a namedFDv2SourceEventFuturealias over std types, so a custom source can be implemented from the public surface alone. That mirrors how the transport crate already exposesResponseFuture.Note
Overview
Adds runnable doctests for FDv2 configuration:
FDv2StreamingBuilderandFDv2PollingBuildermethods (initial_reconnect_delay,base_url,poll_interval), plusDataSystemBuilderexamples for default and custom source wiring.Documents the experimental
data_sourcesmodule with an end-to-end custom synchronizer example wired throughDataSystemBuilderandConfigBuilder.Public API tweak:
Initializer::runandSynchronizer::nextnow return a SDK-definedFDv2SourceEventFutureinstead of exposingfutures::future::BoxFuture, and the alias is re-exported fromdata_sourcesso custom sources can implement traits without a directfuturesdependency.Reviewed by Cursor Bugbot for commit d1fb33f. Bugbot is set up for automated code reviews on this repo. Configure here.