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

added redis config to leaderboard and refactored leaderboard module #20

Merged
merged 2 commits into from
Jun 13, 2019

Conversation

lucas-machado
Copy link
Contributor

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.

@coveralls
Copy link

coveralls commented Jun 12, 2019

Coverage Status

Coverage decreased (-0.1%) to 72.049% when pulling 9eb4887 on feature/podiumclient into 9257f9e on master.

Copy link
Contributor

@cscatolini cscatolini left a 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.

@@ -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()
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great! Thanks

@cscatolini
Copy link
Contributor

Great job!

@cscatolini cscatolini merged commit 27dce96 into master Jun 13, 2019
@lucas-machado lucas-machado deleted the feature/podiumclient branch June 14, 2019 12:49
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.

None yet

3 participants