telco_server/common/redisx/redisx.go

19 lines
291 B
Go
Raw Normal View History

2025-04-11 12:15:45 +00:00
package redisx
import (
"fmt"
2025-04-11 12:15:45 +00:00
"github.com/redis/go-redis/v9"
)
var Client *redis.Client
func Init(addr string, password string, db int) {
fmt.Println("****Redis config****", addr)
2025-04-11 12:15:45 +00:00
Client = redis.NewClient(&redis.Options{
Addr: addr,
Password: password,
DB: db,
})
}