Skip to content

Commit

Permalink
Merge pull request #108 from si3nloong/master
Browse files Browse the repository at this point in the history
Support redis cluster client
  • Loading branch information
wellle authored Oct 12, 2021
2 parents 0f2c7fd + c81953c commit 2c37533
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func OpenConnection(tag string, network string, address string, db int, errChan
}

// OpenConnectionWithRedisClient opens and returns a new connection
func OpenConnectionWithRedisClient(tag string, redisClient *redis.Client, errChan chan<- error) (Connection, error) {
func OpenConnectionWithRedisClient(tag string, redisClient redis.Cmdable, errChan chan<- error) (Connection, error) {
return OpenConnectionWithRmqRedisClient(tag, RedisWrapper{redisClient}, errChan)
}

Expand Down
2 changes: 1 addition & 1 deletion redis_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
var unusedContext = context.TODO()

type RedisWrapper struct {
rawClient *redis.Client
rawClient redis.Cmdable
}

func (wrapper RedisWrapper) Set(key string, value string, expiration time.Duration) error {
Expand Down

0 comments on commit 2c37533

Please sign in to comment.