redislock icon indicating copy to clipboard operation
redislock copied to clipboard

[Proposal] Allow redislock to compatible with multi versions of go-redis

Open git-hulk opened this issue 1 year ago • 4 comments

Currently, redislock only depends on the Redis EVAL/EVALSHA command but directly introduces the go-redis/v9 scripter as the RedisClient interface. And make it incompatible with other versions of the Redis client like go-redis/v8.

I think we can avoid binding to any versions by moving the scripter outside the go-redis.

I will be happy to support this if it sounds good to you.

related issue: https://github.com/bsm/redislock/issues/48

git-hulk avatar Mar 21 '24 09:03 git-hulk

Sounds good in principle, but I am not sure how this would work in practice. Do you mind a PR?

dim avatar Mar 21 '24 10:03 dim

@dim Sure, thank you! I will submit a PR for this.

git-hulk avatar Mar 21 '24 11:03 git-hulk

@git-hulk I have the same requirement and need to connect to two different versions of redis at the same time. Looking forward to your PR. :)

harryeti avatar Mar 27 '24 03:03 harryeti