This commit is contained in:
wangchuxiao
2023-02-22 19:51:14 +08:00
parent 2b38381296
commit 94d50a6c71
31 changed files with 500 additions and 602 deletions
+1 -1
View File
@@ -25,5 +25,5 @@ func NewConversationLocalCache(client discoveryRegistry.SvcDiscoveryRegistry) Co
func (g *ConversationLocalCache) GetRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) ([]string, error) {
g.client.GetConn()
return []string{}
return []string{}, nil
}
+4 -4
View File
@@ -3,7 +3,7 @@ package localcache
import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
discoveryRegistry "Open_IM/pkg/discoveryregistry"
"Open_IM/pkg/discoveryregistry"
"Open_IM/pkg/proto/group"
"context"
"sync"
@@ -16,7 +16,7 @@ type GroupLocalCacheInterface interface {
type GroupLocalCache struct {
lock sync.Mutex
cache map[string]GroupMemberIDsHash
client discoveryRegistry.SvcDiscoveryRegistry
client discoveryregistry.SvcDiscoveryRegistry
}
type GroupMemberIDsHash struct {
@@ -24,7 +24,7 @@ type GroupMemberIDsHash struct {
userIDs []string
}
func NewGroupMemberIDsLocalCache(client discoveryRegistry.SvcDiscoveryRegistry) *GroupLocalCache {
func NewGroupMemberIDsLocalCache(client discoveryregistry.SvcDiscoveryRegistry) *GroupLocalCache {
return &GroupLocalCache{
cache: make(map[string]GroupMemberIDsHash, 0),
client: client,
@@ -34,7 +34,7 @@ func NewGroupMemberIDsLocalCache(client discoveryRegistry.SvcDiscoveryRegistry)
func (g *GroupLocalCache) GetGroupMemberIDs(ctx context.Context, groupID string) ([]string, error) {
g.lock.Lock()
defer g.lock.Unlock()
conn, err := g.client.GetConn(config.Config.RpcRegisterName.OpenImGroupName, nil)
conn, err := g.client.GetConn(config.Config.RpcRegisterName.OpenImGroupName)
if err != nil {
return nil, err
}