-
Notifications
You must be signed in to change notification settings - Fork 70
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(redis): add NewWithClient to work with pre-existing client #137
base: master
Are you sure you want to change the base?
Conversation
1d7f2d5
to
3423387
Compare
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## master #137 +/- ##
==========================================
+ Coverage 64.60% 64.84% +0.23%
==========================================
Files 24 25 +1
Lines 2057 2085 +28
==========================================
+ Hits 1329 1352 +23
- Misses 601 606 +5
Partials 127 127
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
I was looking forward to these constructors to give users maximum flexibility while keeping our library surface area small 👍
Just two comments. And if #130 is merged first, a change to the Godoc here might be required to mention the timeout option (in addition to the codec, as applicable options)
if options.Codec == nil { | ||
options.Codec = DefaultOptions.Codec | ||
} | ||
return &Client{c: rc, codec: options.Codec} |
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.
The NewClient
currently includes a Ping
call to check/establish a connection. Maybe we can do the same here, to minimize NewClient
vs NewWithClient
differences?
Ah and P.S.: I think we should also extend the tests to make use of a client created with this new constructor |
3423387
to
20b72c5
Compare
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
20b72c5
to
2ab4b47
Compare
Signed-off-by: Boris Glimcher Boris.Glimcher@emc.com