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

Allow configuring Redis connections via AsyncConnectionConfig #357

Conversation

Louis-Tarvin
Copy link
Contributor

Currently, deadpool-redis doesn't provide any way to modify the MultiplexedConnection configuration (e.g. to set connection or response timeouts).
This PR addresses this by implementing a new constructor for the Manager, new_with_connection_config, that lets the user provide an AsyncConnectionConfig to the Manager, such that we can construct the connection via get_multiplexed_async_connection_with_config.

Please let me know if there's anything I have missed or if you'd rather this be done differently.

redis/src/lib.rs Outdated
/// # Errors
///
/// If establishing a new [`Client`] fails.
pub fn new_with_connection_config<T: IntoConnectionInfo>(
Copy link
Owner

@bikeshedder bikeshedder Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would like the name from_config or from_connection_config better for this. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from_config seemed more consistent with how things are named elsewhere, so I've changed it to that 👍

@Louis-Tarvin Louis-Tarvin force-pushed the allow-configuring-redis-connections branch from b436da1 to 6304ddd Compare September 25, 2024 08:34
@bikeshedder bikeshedder merged commit ac5d03d into bikeshedder:master Nov 29, 2024
58 of 64 checks passed
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