Documentation ¶
Index ¶
- Constants
- type ConversationLocalCache
- func (c *ConversationLocalCache) GetConversation(ctx context.Context, userID, conversationID string) (val *pbconversation.Conversation, err error)
- func (c *ConversationLocalCache) GetConversationIDs(ctx context.Context, ownerUserID string) (val []string, err error)
- func (c *ConversationLocalCache) GetConversationNotReceiveMessageUserIDMap(ctx context.Context, conversationID string) (map[string]struct{}, error)
- func (c *ConversationLocalCache) GetConversationNotReceiveMessageUserIDs(ctx context.Context, conversationID string) ([]string, error)
- func (c *ConversationLocalCache) GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string) ([]*pbconversation.Conversation, error)
- func (c *ConversationLocalCache) GetSingleConversationRecvMsgOpt(ctx context.Context, userID, conversationID string) (int32, error)
- type FriendLocalCache
- type GroupLocalCache
- func (g *GroupLocalCache) GetGroupInfo(ctx context.Context, groupID string) (val *sdkws.GroupInfo, err error)
- func (g *GroupLocalCache) GetGroupInfos(ctx context.Context, groupIDs []string) ([]*sdkws.GroupInfo, error)
- func (g *GroupLocalCache) GetGroupMember(ctx context.Context, groupID, userID string) (val *sdkws.GroupMemberFullInfo, err error)
- func (g *GroupLocalCache) GetGroupMemberIDMap(ctx context.Context, groupID string) (map[string]struct{}, error)
- func (g *GroupLocalCache) GetGroupMemberIDs(ctx context.Context, groupID string) ([]string, error)
- func (g *GroupLocalCache) GetGroupMemberInfoMap(ctx context.Context, groupID string, userIDs []string) (map[string]*sdkws.GroupMemberFullInfo, error)
- func (g *GroupLocalCache) GetGroupMembers(ctx context.Context, groupID string, userIDs []string) ([]*sdkws.GroupMemberFullInfo, error)
- type OnlineCache
- type UserLocalCache
- func (u *UserLocalCache) GetUserGlobalMsgRecvOpt(ctx context.Context, userID string) (val int32, err error)
- func (u *UserLocalCache) GetUserInfo(ctx context.Context, userID string) (val *sdkws.UserInfo, err error)
- func (u *UserLocalCache) GetUsersInfo(ctx context.Context, userIDs []string) ([]*sdkws.UserInfo, error)
- func (u *UserLocalCache) GetUsersInfoMap(ctx context.Context, userIDs []string) (map[string]*sdkws.UserInfo, error)
Constants ¶
View Source
const ( Begin uint32 = iota DoOnlineStatusOver DoSubscribeOver )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConversationLocalCache ¶
type ConversationLocalCache struct {
// contains filtered or unexported fields
}
func NewConversationLocalCache ¶
func NewConversationLocalCache(client rpcclient.ConversationRpcClient, localCache *config.LocalCache, cli redis.UniversalClient) *ConversationLocalCache
func (*ConversationLocalCache) GetConversation ¶
func (c *ConversationLocalCache) GetConversation(ctx context.Context, userID, conversationID string) (val *pbconversation.Conversation, err error)
func (*ConversationLocalCache) GetConversationIDs ¶
func (*ConversationLocalCache) GetConversationNotReceiveMessageUserIDMap ¶
func (*ConversationLocalCache) GetConversationNotReceiveMessageUserIDs ¶
func (*ConversationLocalCache) GetConversations ¶
func (c *ConversationLocalCache) GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string) ([]*pbconversation.Conversation, error)
func (*ConversationLocalCache) GetSingleConversationRecvMsgOpt ¶
type FriendLocalCache ¶
type FriendLocalCache struct {
// contains filtered or unexported fields
}
func NewFriendLocalCache ¶
func NewFriendLocalCache(client rpcclient.FriendRpcClient, localCache *config.LocalCache, cli redis.UniversalClient) *FriendLocalCache
type GroupLocalCache ¶
type GroupLocalCache struct {
// contains filtered or unexported fields
}
func NewGroupLocalCache ¶
func NewGroupLocalCache(client rpcclient.GroupRpcClient, localCache *config.LocalCache, cli redis.UniversalClient) *GroupLocalCache
func (*GroupLocalCache) GetGroupInfo ¶
func (*GroupLocalCache) GetGroupInfos ¶
func (*GroupLocalCache) GetGroupMember ¶
func (g *GroupLocalCache) GetGroupMember(ctx context.Context, groupID, userID string) (val *sdkws.GroupMemberFullInfo, err error)
func (*GroupLocalCache) GetGroupMemberIDMap ¶
func (*GroupLocalCache) GetGroupMemberIDs ¶
func (*GroupLocalCache) GetGroupMemberInfoMap ¶
func (g *GroupLocalCache) GetGroupMemberInfoMap(ctx context.Context, groupID string, userIDs []string) (map[string]*sdkws.GroupMemberFullInfo, error)
func (*GroupLocalCache) GetGroupMembers ¶
func (g *GroupLocalCache) GetGroupMembers(ctx context.Context, groupID string, userIDs []string) ([]*sdkws.GroupMemberFullInfo, error)
type OnlineCache ¶ added in v3.8.0
type OnlineCache struct { Lock *sync.Mutex Cond *sync.Cond CurrentPhase atomic.Uint32 // contains filtered or unexported fields }
func NewOnlineCache ¶ added in v3.8.0
func NewOnlineCache(user rpcclient.UserRpcClient, group *GroupLocalCache, rdb redis.UniversalClient, fullUserCache bool, fn func(ctx context.Context, userID string, platformIDs []int32)) (*OnlineCache, error)
func (*OnlineCache) GetUserOnline ¶ added in v3.8.0
func (*OnlineCache) GetUserOnlinePlatform ¶ added in v3.8.0
func (*OnlineCache) GetUsersOnline ¶ added in v3.8.1
type UserLocalCache ¶
type UserLocalCache struct {
// contains filtered or unexported fields
}
func NewUserLocalCache ¶
func NewUserLocalCache(client rpcclient.UserRpcClient, localCache *config.LocalCache, cli redis.UniversalClient) *UserLocalCache
func (*UserLocalCache) GetUserGlobalMsgRecvOpt ¶
func (*UserLocalCache) GetUserInfo ¶
func (*UserLocalCache) GetUsersInfo ¶
func (*UserLocalCache) GetUsersInfoMap ¶
Click to show internal directories.
Click to hide internal directories.