通道的增删接口实现,数据表和目录结构调整
This commit is contained in:
18
pkg/rds/rds.go
Normal file
18
pkg/rds/rds.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package rds
|
||||
|
||||
import (
|
||||
"net"
|
||||
"platform/pkg/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