Documentation ¶
Index ¶
- Variables
- func Init()
- func IsChange(doc *GameDB.ServerListDocument, info *proto.ST_Server_PB) bool
- func ServerInfoDoc2PB(doc *GameDB.ServerListDocument) *proto.ST_Server_PB
- type ServerListCache
- func (this *ServerListCache) AddServerInfo(info *proto.ST_Server_PB) bool
- func (this *ServerListCache) ForeachServerInfo(writeOrRead bool, callback func(info *GameDB.ServerListDocument) bool)
- func (this *ServerListCache) GetServerInfo(sid int64) *GameDB.ServerListDocument
- func (this *ServerListCache) GetServerProtectTime(sid int64) uint64
- func (this *ServerListCache) HasServer(sid int64) bool
- func (this *ServerListCache) WithServer(readOrWrite bool, sid int64, callback func(info *GameDB.ServerListDocument)) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ServerWeight *GameDB.ServerWeightDocument
)
Functions ¶
func IsChange ¶
func IsChange(doc *GameDB.ServerListDocument, info *proto.ST_Server_PB) bool
func ServerInfoDoc2PB ¶
func ServerInfoDoc2PB(doc *GameDB.ServerListDocument) *proto.ST_Server_PB
Types ¶
type ServerListCache ¶
var (
ServerListCacheInstance *ServerListCache
)
func (*ServerListCache) AddServerInfo ¶
func (this *ServerListCache) AddServerInfo(info *proto.ST_Server_PB) bool
func (*ServerListCache) ForeachServerInfo ¶
func (this *ServerListCache) ForeachServerInfo(writeOrRead bool, callback func(info *GameDB.ServerListDocument) bool)
func (*ServerListCache) GetServerInfo ¶
func (this *ServerListCache) GetServerInfo(sid int64) *GameDB.ServerListDocument
func (*ServerListCache) GetServerProtectTime ¶
func (this *ServerListCache) GetServerProtectTime(sid int64) uint64
func (*ServerListCache) HasServer ¶
func (this *ServerListCache) HasServer(sid int64) bool
func (*ServerListCache) WithServer ¶
func (this *ServerListCache) WithServer(readOrWrite bool, sid int64, callback func(info *GameDB.ServerListDocument)) bool
Click to show internal directories.
Click to hide internal directories.