Documentation ¶
Index ¶
- func AddFileTimeLimit(value int64)
- func AddLazyMessageId(groupID, messageID string, timestamp time.Time)
- func AddMapping(key int64, value int)
- func AddMappingFileTimeLimit(key string, value int64)
- func AddMappingSeq(key string, value int)
- func AddMsgID(appid string, s int64, msgID string)
- func AddMsgIDv2(appid string, groupid int64, userid int64, msgID string)
- func AddMsgIDv3(appid string, s string, msgID string)
- func AddMsgType(appid string, s int64, msgType string)
- func GetFileTimeLimit() int64
- func GetLazyMessagesId(groupID string) string
- func GetMapping(key int64) int
- func GetMappingFileTimeLimit(key string) int64
- func GetMappingSeq(key string) int
- func GetMessageTypeByGroupidv2(appID string, GroupID interface{}) string
- func GetMsgIDByKey(key string) string
- func GetMsgTypeByKey(key string) string
- func PushGlobalStack(pair MessageGroupPair)
- func RemoveFromGlobalStack(index int)
- type EchoMapping
- type Int64Stack
- type Int64ToIntMapping
- type MessageGroupPair
- type StringToInt64MappingSeq
- type StringToIntMappingSeq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddLazyMessageId ¶
AddLazyMessageId 添加 message_id 和它的时间戳到指定群号
func AddMappingFileTimeLimit ¶
AddMapping 添加一个新的映射
func AddMsgIDv2 ¶
添加group和userid对应的messageid
func GetLazyMessagesId ¶
GetRecentMessages 获取指定群号中最近5分钟内的 message_id
func GetMappingFileTimeLimit ¶
GetMapping 根据给定的 string 键获取映射值
func GetMessageTypeByGroupidv2 ¶
通过group_id获取类型
func PushGlobalStack ¶
func PushGlobalStack(pair MessageGroupPair)
PushGlobalStack 向全局栈中添加一个新的 MessageGroupPair
func RemoveFromGlobalStack ¶
func RemoveFromGlobalStack(index int)
RemoveFromGlobalStack 从全局栈中删除指定下标的元素
Types ¶
type EchoMapping ¶
type EchoMapping struct {
// contains filtered or unexported fields
}
func (*EchoMapping) GenerateKey ¶
func (e *EchoMapping) GenerateKey(appid string, s int64) string
func (*EchoMapping) GenerateKeyv2 ¶
func (e *EchoMapping) GenerateKeyv2(appid string, groupid int64, userid int64) string
func (*EchoMapping) GenerateKeyv3 ¶
func (e *EchoMapping) GenerateKeyv3(appid string, s string) string
type Int64Stack ¶
type Int64Stack struct {
// contains filtered or unexported fields
}
Int64Stack 用于存储 int64 的栈
type Int64ToIntMapping ¶
type Int64ToIntMapping struct {
// contains filtered or unexported fields
}
Int64ToIntMapping 用于存储 int64 到 int 的映射(递归计数器)
type MessageGroupPair ¶
type MessageGroupPair struct { Group string GroupMessage *dto.MessageToCreate }
MessageGroupPair 用于存储 group 和 groupMessage
func PopGlobalStackMulti ¶
func PopGlobalStackMulti(count int) []MessageGroupPair
PopGlobalStackMulti 从全局栈中取出指定数量的 MessageGroupPair,但不删除它们
type StringToInt64MappingSeq ¶
type StringToInt64MappingSeq struct {
// contains filtered or unexported fields
}
StringToInt64MappingSeq 用于存储 string 到 int64 的映射(file接口频率限制)
type StringToIntMappingSeq ¶
type StringToIntMappingSeq struct {
// contains filtered or unexported fields
}
IntToStringMappingSeq 用于存储 string 到 int 的映射(seq对应)
Click to show internal directories.
Click to hide internal directories.