Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(connector): Optimize performance of switching TLS connector #406

Merged
merged 5 commits into from
Feb 8, 2025

Conversation

0x676e67
Copy link
Owner

@0x676e67 0x676e67 commented Feb 8, 2025

This pull request includes several changes to the src/connect.rs and src/client/http.rs files, focusing on simplifying the ConnectorBuilder and Connector implementations, removing unused imports, and refactoring the handling of TLS connectors.

Refactoring and simplification:

  • src/client/http.rs: Simplified the ConnectorBuilder construction by chaining method calls instead of using intermediate variables.
  • src/connect.rs: Refactored the ConnectorBuilder methods (set_keepalive, set_timeout, set_verbose) to return self for method chaining.
  • src/connect.rs: Removed the InnerTLS enum and replaced it with a simpler direct use of BoringTlsConnector.

Code cleanup:

Improved Connector handling:

  • src/connect.rs: Updated the Connector::WithLayers variant to include layers and base_service, and refactored the set_connector method to rebuild the connector with the new TLS settings. [1] [2] [3]

@0x676e67 0x676e67 merged commit 26f58e4 into main Feb 8, 2025
4 checks passed
@0x676e67 0x676e67 deleted the perf branch February 8, 2025 05:13
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.

1 participant