Documentation
¶
Index ¶
- Constants
- Variables
- func GenLogTraceID() string
- func GenUID(zid uint32, uidIdx uint64) uint64
- func GenUIDIdx(uid uint64) uint64
- func GetServiceTypeByMessageID(messageID uint32) uint32
- func GetZIDByUID(uid uint64) uint32
- func IsGatewayMessage(messageID uint32) bool
- func IsLogicMessage(messageID uint32) bool
- func IsLoginMessage(messageID uint32) bool
- func IsZoneSet(zone1 uint32, zone2 uint32) bool
- type UUIDGenerator
Constants ¶
View Source
const ( UnknownMessage uint32 = 0 LoginMessage uint32 = 1 GatewayMessage uint32 = 2 LogicMessage uint32 = 3 )
View Source
const BatchExecMaxMilliSecond = 30000
BatchExecMaxMilliSecond DB合并写周期 单位毫秒
View Source
const BulkWriteMax = 1000
BulkWriteMax DB合并写单个集合最大合批数量
View Source
const DBRetryCountMax = 10000
View Source
const NameLengthMax = 24 // NameLengthMax 名字 长度 最大值
View Source
const RateLimitCount = 120 // RateLimitCount 限流-数量// todo 可配置...
View Source
const RateLimitIntervalSec = 60 // RateLimitIntervalSec 限流-间隔-秒 // todo 可配置...
View Source
const ServerNameGM string = "gm" // GM服务
View Source
const ServerNameGateway string = "gateway" // 网关服
View Source
const ServerNameLogic string = "logic" // 逻辑服
View Source
const ServerNameLogin string = "login" // 登录服
View Source
const ServerNameRoom string = "room" // 房间服
Variables ¶
View Source
var KCPHeartBeatTimeOutSec int64 = 30 // 心跳时间-秒 // todo menglc 可配置...
View Source
var LoginTokenDuration = time.Second * 60 // LoginTokenDuration 登录 token 有效持续时间
View Source
var MongodbMaxConnIdleTimeDefault = time.Minute * 5
View Source
var MongodbMaxConnectingDefault uint64 = 4 // 设置为 P/2
View Source
var MongodbMaxPoolSizeDefault uint64 = 24 // 可以设置为 2*P + 30% 的数量
////////////////////////////////////////////////////////////////////////////////////////////////// Mongodb var MongodbDatabaseNameDefault = ProjectName
View Source
var MongodbMinPoolSizeDefault uint64 = 8 // 可以设置为 P 的数量
View Source
var MongodbTimeoutDurationDefault = time.Minute
View Source
var TCPHeartBeatTimeOutSec int64 = 30 // 心跳时间-秒 // todo menglc 可配置...
Functions ¶
func IsGatewayMessage ¶
func IsLogicMessage ¶
func IsLoginMessage ¶
Types ¶
type UUIDGenerator ¶
UUIDGenerator 生成用户UUID的接口
Click to show internal directories.
Click to hide internal directories.