Need a way to execute arbitrary redis commands on a connection from a `Pool`
dcormier opened this issue · 2 comments
hjr265 commented
@dcormier I am trying to understand your requirement.
If you are using this library, you are already creating a Redis client
somewhere in your code.
// Create a pool with go-redis (or redigo) which is the pool redisync will
// use while communicating with Redis. This can also be any pool that
// implements the `redis.Pool` interface.
client := goredislib.NewClient(&goredislib.Options{
Addr: "localhost:6379",
})
pool := goredis.NewPool(client) // or, pool := redigo.NewPool(...)
// Create an instance of redisync to be used to obtain a mutual exclusion
// lock.
rs := redsync.New(pool)
Is there any specific reason that client
cannot be used?
hjr265 commented
Based on the comment notification I received (I don't see the comment anymore) and that there is a cleaner way of interacting with the Redis client (without having to make changes to this package) I am going to go ahead and close this issue.
If you have any questions or anything to discuss further please feel free to continue discussing it here. I can reopen the issue if it makes sense.
Thanks!