Remove direct dependency of clients for obtaining connection
Shivam010 opened this issue · comments
go-redis provides 4 different types of protocols to connect to Redis
- Normal standalone: https://redis.uptrace.dev/guide/server.html#connecting-to-redis-server
- Cluster: https://redis.uptrace.dev/guide/cluster.html
- Ring: https://redis.uptrace.dev/guide/ring.html
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
Originally posted by @Shivam010 in #62 (comment)
Just FYI I'm leaving 53 for now since it looks like you are covering that here. I have a copy working with ClusterClient if you ever decide you need it. Once I get approval I can push the branch for reference.
Yeah, firstly thanks @jaysonhurd for your contribution. Secondly, I don't think we're gonna need that anymore. Cause with the use of interface as a connection, one can use any connection type, it just needs to implement the corresponding Do
method.
@Shivam010 Tested it and it works great with our ClusterClient connection. Thanks!!