认证授权主要流程实现
This commit is contained in:
18
init/rds/rds.go
Normal file
18
init/rds/rds.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package rds
|
||||
|
||||
import (
|
||||
"net"
|
||||
"platform/init/env"
|
||||
|
||||
"github.com/redis/go-redis/v9"
|
||||
)
|
||||
|
||||
var Client *redis.Client
|
||||
|
||||
func Init() {
|
||||
Client = redis.NewClient(&redis.Options{
|
||||
Addr: net.JoinHostPort(env.RedisHost, env.RedisPort),
|
||||
DB: env.RedisDb,
|
||||
Password: env.RedisPass,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user