-
Notifications
You must be signed in to change notification settings - Fork 22
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
added redis config to leaderboard and refactored leaderboard module #20
Conversation
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.
LGTM!
API looks much cleaner, I'm glad with how it looks now =)
I have just a question about exposing the internal redis client. I'm not sure we should do it, but I don't have strong feelings if you decide to keep it exposed.
api/healthcheck_test.go
Outdated
@@ -37,7 +37,7 @@ var _ = Describe("Healthcheck Handler", func() { | |||
|
|||
It("Should fail if redis failing", func() { | |||
a := GetDefaultTestApp() | |||
a.RedisClient.Client = GetFaultyRedis() | |||
a.Leaderboards.RedisClient().Client = GetFaultyRedis() |
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.
Should we expose the inner client and allow it to be changed like this?
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.
Makes sense that we don't. I'll change the test code to allow for the removal of this method.
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.
Great! Thanks
Great job! |
Now clients of the podium library can instantiate a client without managing Redis themselves. Refactoring for this also brought the opportunity to make the API cleaner: we no longer need to create a leaderboard every time an operation is needed. We use a single leaderboard client that gives us all leaderboard functionality and redis management.