This commit is contained in:
wangchuxiao
2023-02-08 17:56:04 +08:00
parent 4a32e98e62
commit 2193d380ca
19 changed files with 401 additions and 555 deletions
+8 -7
View File
@@ -1,24 +1,25 @@
package localcache
import (
"Open_IM/pkg/proto/conversation"
"context"
"google.golang.org/grpc"
"github.com/OpenIMSDK/openKeeper"
"sync"
)
type ConversationLocalCacheInterface interface {
GetRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) []string
}
type ConversationLocalCache struct {
lock sync.Mutex
SuperGroupRecvMsgNotNotifyUserIDs map[string][]string
rpc *grpc.ClientConn
conversation conversation.ConversationClient
zkClient *openKeeper.ZkClient
}
func NewConversationLocalCache(rpc *grpc.ClientConn) ConversationLocalCache {
func NewConversationLocalCache(zkClient *openKeeper.ZkClient) ConversationLocalCache {
return ConversationLocalCache{
SuperGroupRecvMsgNotNotifyUserIDs: make(map[string][]string, 0),
rpc: rpc,
conversation: conversation.NewConversationClient(rpc),
zkClient: zkClient,
}
}