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

Adding support for different types of connections provided by libraries #62

Merged
merged 2 commits into from
Feb 17, 2022

Conversation

Shivam010
Copy link
Collaborator

@Shivam010 Shivam010 commented Feb 15, 2022

Checking ClusterClient support with go-redis UniversalClient

Closes #53 #63

@coveralls
Copy link

coveralls commented Feb 15, 2022

Pull Request Test Coverage Report for Build 1854658964

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.737%

Totals Coverage Status
Change from base Build 1758251414: 0.0%
Covered Lines: 126
Relevant Lines: 133

💛 - Coveralls

@Shivam010 Shivam010 changed the title Change go-redis client to universal client interface Adding support for different types of connections provided by libraries Feb 16, 2022
@Shivam010
Copy link
Collaborator Author

go-redis provides 4 different types of protocols to connect to Redis

Similarly, Redigo provides a single method:

And as we only use Do method of both the clients. Hence, in order to support these different types of connections in each client, abstracting the required method is the only feasible option

@Shivam010 Shivam010 marked this pull request as ready for review February 16, 2022 19:04
@Shivam010
Copy link
Collaborator Author

This removes the direct dependency on the corresponding libraries' clients for obtaining a connection

@Shivam010
Copy link
Collaborator Author

Closes #63

@Shivam010 Shivam010 linked an issue Feb 16, 2022 that may be closed by this pull request
@hirenvadalia
Copy link

@Shivam010 +1 for solution, this solution will work with all types of clients

@Shivam010 Shivam010 merged commit 0f5ba3d into master Feb 17, 2022
@Shivam010 Shivam010 deleted the goredis-client-with-cluster branch February 17, 2022 14:07
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.

Remove direct dependency of clients for obtaining connection ClusterClient support for go-redis
3 participants