Skip to content

fix: Add doctests for the FDv2 config and custom-source APIs - #199

Merged
beekld merged 1 commit into
mainfrom
bklimt/SDK-3054/fdv2-config-doctests
Sep 4, 2026
Merged

fix: Add doctests for the FDv2 config and custom-source APIs#199
beekld merged 1 commit into
mainfrom
bklimt/SDK-3054/fdv2-config-doctests

Conversation

@beekld

@beekld beekld commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

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_sources module showing how to implement a custom synchronizer.

Writing the custom-source example surfaced that the public Synchronizer and Initializer traits returned futures::future::BoxFuture, which forces anyone implementing a source to take a direct futures dependency. This replaces that with a named FDv2SourceEventFuture alias over std types, so a custom source can be implemented from the public surface alone. That mirrors how the transport crate already exposes ResponseFuture.


Note

Overview
Adds runnable doctests for FDv2 configuration: FDv2StreamingBuilder and FDv2PollingBuilder methods (initial_reconnect_delay, base_url, poll_interval), plus DataSystemBuilder examples for default and custom source wiring.

Documents the experimental data_sources module with an end-to-end custom synchronizer example wired through DataSystemBuilder and ConfigBuilder.

Public API tweak: Initializer::run and Synchronizer::next now return a SDK-defined FDv2SourceEventFuture instead of exposing futures::future::BoxFuture, and the alias is re-exported from data_sources so custom sources can implement traits without a direct futures dependency.

Reviewed by Cursor Bugbot for commit d1fb33f. Bugbot is set up for automated code reviews on this repo. Configure here.

@beekld
beekld force-pushed the bklimt/SDK-3054/fdv2-config-doctests branch from 2da4f6d to d1fb33f Compare September 4, 2026 17:48
@beekld
beekld marked this pull request as ready for review September 4, 2026 17:55
@beekld
beekld requested a review from a team as a code owner September 4, 2026 17:55
@beekld
beekld merged commit b4dc72f into main Sep 4, 2026
15 checks passed
@beekld
beekld deleted the bklimt/SDK-3054/fdv2-config-doctests branch September 4, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants