rpccache

package
v3.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

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 (c *ConversationLocalCache) GetConversationIDs(ctx context.Context, ownerUserID string) (val []string, err error)

func (*ConversationLocalCache) GetConversationNotReceiveMessageUserIDMap

func (c *ConversationLocalCache) GetConversationNotReceiveMessageUserIDMap(ctx context.Context, conversationID string) (map[string]struct{}, error)

func (*ConversationLocalCache) GetConversationNotReceiveMessageUserIDs

func (c *ConversationLocalCache) GetConversationNotReceiveMessageUserIDs(ctx context.Context, conversationID string) ([]string, error)

func (*ConversationLocalCache) GetConversations

func (c *ConversationLocalCache) GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string) ([]*pbconversation.Conversation, error)

func (*ConversationLocalCache) GetSingleConversationRecvMsgOpt

func (c *ConversationLocalCache) GetSingleConversationRecvMsgOpt(ctx context.Context, userID, conversationID string) (int32, error)

type FriendLocalCache

type FriendLocalCache struct {
	// contains filtered or unexported fields
}

func NewFriendLocalCache

func NewFriendLocalCache(client rpcclient.FriendRpcClient, localCache *config.LocalCache, cli redis.UniversalClient) *FriendLocalCache

func (*FriendLocalCache) IsBlack

func (f *FriendLocalCache) IsBlack(ctx context.Context, possibleBlackUserID, userID string) (val bool, err error)

IsBlack possibleBlackUserID selfUserID.

func (*FriendLocalCache) IsFriend

func (f *FriendLocalCache) IsFriend(ctx context.Context, possibleFriendUserID, userID string) (val bool, err error)

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 (g *GroupLocalCache) GetGroupInfo(ctx context.Context, groupID string) (val *sdkws.GroupInfo, err error)

func (*GroupLocalCache) GetGroupInfos

func (g *GroupLocalCache) GetGroupInfos(ctx context.Context, groupIDs []string) ([]*sdkws.GroupInfo, error)

func (*GroupLocalCache) GetGroupMember

func (g *GroupLocalCache) GetGroupMember(ctx context.Context, groupID, userID string) (val *sdkws.GroupMemberFullInfo, err error)

func (*GroupLocalCache) GetGroupMemberIDMap

func (g *GroupLocalCache) GetGroupMemberIDMap(ctx context.Context, groupID string) (map[string]struct{}, error)

func (*GroupLocalCache) GetGroupMemberIDs

func (g *GroupLocalCache) GetGroupMemberIDs(ctx context.Context, groupID string) ([]string, error)

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 (o *OnlineCache) GetUserOnline(ctx context.Context, userID string) (bool, error)

func (*OnlineCache) GetUserOnlinePlatform added in v3.8.0

func (o *OnlineCache) GetUserOnlinePlatform(ctx context.Context, userID string) ([]int32, error)

func (*OnlineCache) GetUsersOnline added in v3.8.1

func (o *OnlineCache) GetUsersOnline(ctx context.Context, userIDs []string) ([]string, []string, error)

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 (u *UserLocalCache) GetUserGlobalMsgRecvOpt(ctx context.Context, userID string) (val int32, err error)

func (*UserLocalCache) GetUserInfo

func (u *UserLocalCache) GetUserInfo(ctx context.Context, userID string) (val *sdkws.UserInfo, err error)

func (*UserLocalCache) GetUsersInfo

func (u *UserLocalCache) GetUsersInfo(ctx context.Context, userIDs []string) ([]*sdkws.UserInfo, error)

func (*UserLocalCache) GetUsersInfoMap

func (u *UserLocalCache) GetUsersInfoMap(ctx context.Context, userIDs []string) (map[string]*sdkws.UserInfo, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL