This commit is contained in:
wangchuxiao
2023-02-01 19:31:39 +08:00
parent 5bb731f884
commit 803ecd3f92
7 changed files with 89 additions and 85 deletions
+3 -1
View File
@@ -4,9 +4,11 @@ import (
"Open_IM/pkg/proto/group"
"context"
"google.golang.org/grpc"
"sync"
)
type GroupLocalCache struct {
lock sync.Mutex
cache map[string]GroupMemberIDsHash
rpc *grpc.ClientConn
group group.GroupClient
@@ -26,7 +28,7 @@ func NewGroupMemberIDsLocalCache(rpc *grpc.ClientConn) GroupLocalCache {
}
func (g *GroupLocalCache) GetGroupMemberIDs(ctx context.Context, groupID string) []string {
_, err := g.group.GetGroupAbstractInfo(ctx, &group.GetGroupAbstractInfoReq{
resp, err := g.group.GetGroupAbstractInfo(ctx, &group.GetGroupAbstractInfoReq{
GroupIDs: nil,
})
if err != nil {