feat: ver3 branch

Signed-off-by: kubbot & kubecub <3293172751ysy@gmail.com>
This commit is contained in:
kubbot & kubecub
2023-06-30 23:04:28 +08:00
parent 74de8825f6
commit 64bb62d814
105 changed files with 1221 additions and 1845 deletions
+3 -4
View File
@@ -4,7 +4,6 @@ import (
"context"
"sync"
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient"
)
@@ -13,7 +12,7 @@ type ConversationLocalCache struct {
lock sync.Mutex
superGroupRecvMsgNotNotifyUserIDs map[string]Hash
conversationIDs map[string]Hash
client *rpcclient.Conversation
client *rpcclient.ConversationRpcClient
}
type Hash struct {
@@ -21,11 +20,11 @@ type Hash struct {
ids []string
}
func NewConversationLocalCache(discov discoveryregistry.SvcDiscoveryRegistry) *ConversationLocalCache {
func NewConversationLocalCache(client *rpcclient.ConversationRpcClient) *ConversationLocalCache {
return &ConversationLocalCache{
superGroupRecvMsgNotNotifyUserIDs: make(map[string]Hash),
conversationIDs: make(map[string]Hash),
client: rpcclient.NewConversation(discov),
client: client,
}
}
+2 -4
View File
@@ -4,7 +4,6 @@ import (
"context"
"sync"
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group"
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient"
@@ -13,7 +12,7 @@ import (
type GroupLocalCache struct {
lock sync.Mutex
cache map[string]GroupMemberIDsHash
client *rpcclient.Group
client *rpcclient.GroupRpcClient
}
type GroupMemberIDsHash struct {
@@ -21,8 +20,7 @@ type GroupMemberIDsHash struct {
userIDs []string
}
func NewGroupLocalCache(discov discoveryregistry.SvcDiscoveryRegistry) *GroupLocalCache {
client := rpcclient.NewGroup(discov)
func NewGroupLocalCache(client *rpcclient.GroupRpcClient) *GroupLocalCache {
return &GroupLocalCache{
cache: make(map[string]GroupMemberIDsHash, 0),
client: client,