Closed dcormier closed 2 years ago
The Pool interface changed in v3. In v2 and prior, Pool.Get() returned a github.com/gomodule/redigo/redis.Conn, which you can call .Do() on to execute arbitrary redis commands (there are many).
Pool
Pool.Get()
github.com/gomodule/redigo/redis.Conn
.Do()
The Pool interface from v3 on returns a github.com/go-redsync/redsync/v4/redis.Conn, which only exposes helper methods and not a method for executing arbitrary redis commands (other than through scripting).
I have a need to redis commands other than those for which github.com/go-redsync/redsync/v4/redis.Conn does not expose methods. Scripting is unnecessarily complex to issue single commands.
It would be useful if the Conn interface exposed something like the github.com/gomodule/redigo/redis.Conn.Do() method for arbitrary redis commands. It would be simple, but it would require a incrementing the major version since it breaks compatibility. As bcmills pointed out in #634, that's why returning an interface is not a good idea.
Conn
github.com/gomodule/redigo/redis.Conn.Do()
I think you posted this in the wrong repo, looks like you're trying to report something to github.com/go-redsync/redsync/issues
Yes, you're right. Sorry about that. I've created go-redsync/redsync#104.
The
Pool
interface changed in v3. In v2 and prior,Pool.Get()
returned agithub.com/gomodule/redigo/redis.Conn
, which you can call.Do()
on to execute arbitrary redis commands (there are many).The
Pool
interface from v3 on returns a github.com/go-redsync/redsync/v4/redis.Conn, which only exposes helper methods and not a method for executing arbitrary redis commands (other than through scripting).I have a need to redis commands other than those for which github.com/go-redsync/redsync/v4/redis.Conn does not expose methods. Scripting is unnecessarily complex to issue single commands.
It would be useful if the
Conn
interface exposed something like thegithub.com/gomodule/redigo/redis.Conn.Do()
method for arbitrary redis commands. It would be simple, but it would require a incrementing the major version since it breaks compatibility. As bcmills pointed out in #634, that's why returning an interface is not a good idea.