[Rust] Split sdk/src/lib.rs into per-concern modules#414
Merged
Conversation
Contributor
|
Linked the ticket for this: #34 |
93a774a to
185ef9e
Compare
danilonajkov-db
previously approved these changes
Jun 25, 2026
danilonajkov-db
left a comment
Member
There was a problem hiding this comment.
looks good, lets not delay merging this as you will always get a lot of conflicts :)
| // `stream/grpc/`) per Rust's visibility rules. That is what we want — no | ||
| // external crate or other module should reach into stream internals. | ||
| /// Logical landing zone that stores records the user has submitted but the sender task has not yet placed on the wire. | ||
| landing_zone: Arc<LandingZone<Box<IngestRequest>>>, |
Member
There was a problem hiding this comment.
we can use the type from types.rs for this
Collaborator
Author
There was a problem hiding this comment.
I had to resolve merge conflicts so I fixed this as well.
185ef9e to
53b98a4
Compare
53b98a4 to
ba71a05
Compare
danilonajkov-db
approved these changes
Jun 26, 2026
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
ba71a05 to
b99c9b1
Compare
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.
What changes are proposed in this pull request?
sdk/src/lib.rshad grown to roughly 1800 lines, holding the crate root,the
ZerobusSdkclient, and the entireZerobusStreamimplementation in onefile. This change breaks it apart into focused modules along two axes: the SDK
client versus the stream, and within the stream, one file per concern. There
is no public API change.
lib.rsnow keeps only the crate root: module declarations, the publicpub usere-exports, and the small shared types (StreamType,TableProperties,ZerobusResult). Everything else moved out:sdk.rs— theZerobusSdkclient: the shared gRPC channel, TLS and proxysetup, and
stream_builder/recreate_stream.stream/mod.rs— thestreamparent module, organized per transport.stream/grpc/— the gRPC transport, withZerobusStreamand its behaviorsplit by concern.
Layout under
stream/grpc/:mod.rsZerobusStreamstruct, constructor,Droptypes.rsIngestRequest, channel messages)ingest.rsingest_*methodsacks.rsflush,wait_for_offset, unacked queriesclose.rsclose,is_closed, task shutdowncallback_handler.rsconnection.rssender.rsreceiver.rssupervisor.rsHow is this tested?
cargo buildandcargo build --all-featurescargo clippy --all-featurescargo test --all-featurescargo fmt --check