go-chat/rdm/rdm.go

16 lines
223 B
Go
Raw Normal View History

2021-04-25 01:53:49 +00:00
package rdm
import "github.com/go-redis/redis/v8"
var RDM *redis.Client
func GetRdm() *redis.Client {
if RDM == nil {
RDM = redis.NewClient(&redis.Options{
Addr: "127.0.0.1:6379",
DB: 0,
})
}
return RDM
}