🏗️ microservice fabric splitting
This commit is contained in:
12
common/redisx/redis.go
Normal file
12
common/redisx/redis.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package redisx
|
||||
|
||||
import "github.com/redis/go-redis/v9"
|
||||
|
||||
func NewRedis(host, password string, db int) *redis.Client {
|
||||
rdb := redis.NewClient(&redis.Options{
|
||||
Addr: host,
|
||||
Password: password,
|
||||
DB: db,
|
||||
})
|
||||
return rdb
|
||||
}
|
Reference in New Issue
Block a user