mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-07 10:35:59 +08:00
rpc start
This commit is contained in:
Vendored
+6
@@ -50,6 +50,12 @@ type Cache interface {
|
||||
|
||||
// native redis operate
|
||||
|
||||
func NewRedis() *RedisClient {
|
||||
o := &RedisClient{}
|
||||
o.InitRedis()
|
||||
return o
|
||||
}
|
||||
|
||||
type RedisClient struct {
|
||||
rdb redis.UniversalClient
|
||||
}
|
||||
|
||||
@@ -13,6 +13,12 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
func NewMongo() *Mongo {
|
||||
mgo := &Mongo{}
|
||||
mgo.InitMongo()
|
||||
return mgo
|
||||
}
|
||||
|
||||
type Mongo struct {
|
||||
db *mongo.Client
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user