-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat: support Elasticache cluster mode by setting IsClusterMode in config #3255
Conversation
reeshijoshi
commented
Jan 29, 2025
- This is required because Elasticache supports setting up cluster mode with configuration endpoint. So the check len(Addrs) > 1 is not enough for determining cluster mode.
- If IsClusterMode is true, the client will be created as a cluster client.
@reeshijoshi thank you for the contribution. Would you be able to add tests for this new option? |
This needs an Elasticache configuration endpoint to be provided in the Addrs field. I can add a unit test with one address only in this but that's not representative of how this would behave in the actual scenario |
874d360
to
5cfd564
Compare
Added a test that asserts client type |
5cfd564
to
5706167
Compare
@vladvildanov I think this one is good to be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reeshijoshi Overall looks good to me, would you mind changing the comment as suggested or anything starting with the IsClusterMode
as suggested in https://tip.golang.org/doc/comment
5706167
to
cf4e8a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks @reeshijoshi
cf4e8a0
to
24c3d51
Compare
@reeshijoshi would you please add additional test so we can merge this? |
d0373b9
to
8dbeb49
Compare
done |
8dbeb49
to
0c8901e
Compare