Provide more general Transport interface for all transports#26
Merged
myleshorton merged 6 commits intomainfrom Dec 18, 2025
Merged
Provide more general Transport interface for all transports#26myleshorton merged 6 commits intomainfrom
myleshorton merged 6 commits intomainfrom
Conversation
WendelHime
approved these changes
Dec 18, 2025
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.
This pull request refactors the transport mechanism in the
kindlinglibrary to provide a more flexible and extensible way to manage HTTP transports. The main change is the introduction of a newTransportinterface, replacing the previous round tripper generator approach. This allows users to add, replace, and manage custom transports more easily. The PR also updates the race transport logic to support the new interface and adds comprehensive tests for the new functionality.Key changes include:
Transport Abstraction and API Changes
Transportinterface, replacing the previous round tripper generator pattern. Thekindlingstruct now maintains a slice ofTransportobjects, and all relevant methods and options have been updated to use this new abstraction. (kindling.go,race_transport.go) [1] [2] [3] [4]WithTransportfunctional option to allow users to add custom transports when creating akindlinginstance. (kindling.go,README.md) [1] [2]Replace Transport Functionality
ReplaceRoundTripGeneratormethod withReplaceTransport, enabling users to replace an existing transport by name. Updated all internal usages and added error handling for missing transports. (kindling.go,kindling_test.go) [1] [2] [3]Race Transport Refactor
Transportinterface, including handling of body size limits and improved request cloning. (race_transport.go) [1] [2] [3] [4] [5] [6] [7] [8]Test Enhancements
ReplaceTransportmethod and the updated transport logic, ensuring correct behavior for adding, replacing, and error handling of transports. (kindling_test.go,race_transport_test.go) [1] [2] [3] [4]Cleanup and Minor Improvements
kindling.go) [1] [2]These changes make the transport layer in
kindlingmore modular and easier to extend with custom behaviors.