Documentation ¶
Index ¶
Constants ¶
View Source
const ( // login CommandLoginSignIn = "login.signin" CommandLoginSignOut = "login.signout" // chat CommandChatUserTalk = "chat.user.talk" CommandChatGroupTalk = "chat.group.talk" CommandChatTalkAck = "chat.talk.ack" // 离线 CommandOfflineIndex = "chat.offline.index" CommandOfflineContent = "chat.offline.content" // 群管理 CommandGroupCreate = "chat.group.create" CommandGroupJoin = "chat.group.join" CommandGroupQuit = "chat.group.quit" CommandGroupMembers = "chat.group.members" CommandGroupDetail = "chat.group.detail" )
Command defined data type between client and server
View Source
const ( // 消息将要送达的网关的ServiceName MetaDestServer = "dest.server" // 消息将要送达的channels MetaDestChannels = "dest.channels" )
Meta Key of a packet
View Source
const ( SNWGateway = "wgateway" SNTGateway = "tgateway" SNLogin = "chat" //login SNChat = "chat" //chat SNService = "royal" //rpc service )
Service Name 定义统一的服务名
View Source
const ( OfflineReadIndexExpiresIn = time.Hour * 24 * 30 // 读索引在缓存中的过期时间 OfflineSyncIndexCount = 2000 //单次同步消息索引的数量 OfflineMessageExpiresIn = 15 // 离线消息过期时间 MessageMaxCountPerPage = 200 // 同步消息内容时每页的最大数据 )
View Source
const ( MessageTypeText = 1 MessageTypeImage = 2 MessageTypeVoice = 3 MessageTypeVideo = 4 )
View Source
const (
AlgorithmHashSlots = "hashslots"
)
algorithm in routing
Variables ¶
View Source
var ( MagicLogicPkt = Magic{0xc3, 0x11, 0xa3, 0x65} MagicBasicPkt = Magic{0xc3, 0x15, 0xa7, 0x65} )
View Source
var Seq = sequence{/* contains filtered or unexported fields */}
Seq Seq
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.