Apply .gitignore rules

This commit is contained in:
皮蛋13361098506
2025-01-06 16:21:36 +08:00
parent 1b77f62820
commit ccd2c530cf
580 changed files with 69806 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
package gameLogMgr
// 游戏日志对象
type GameLog struct {
ServerGroupId int32 // 服务器组Id
LogSql string // 日志Sql
}
func newGameLog(serverGroupId int32, logSql string) *GameLog {
return &GameLog{
ServerGroupId: serverGroupId,
LogSql: logSql,
}
}

View File

@@ -0,0 +1,13 @@
package mysqlSync
/*
提供数据同步到mysql的方法。基本逻辑如下
1、对外接收数据以追加的方式保存到大文件中。数据的格式为header(4bytes)+content。
2、启动独立的goroutine来从大文件中读取数据并保存到数据库中。
3、使用syncInfo.txt文件保存当前已经处理的文件的路径以及下一次将要读取的文件的Offset。为了降低向syncInfo.txt文件中写入失败
导致需要从头开始同步数据,所以采用了在指定数目的范围内以追加形式来写入数据的方式;只有达到了指定数量才会将整个文件清空。
对于错误的处理方式,分为以下两种:
1、文件错误由于文件系统是本系统的核心所以如果出现文件的读写出错则需要终止整个进程所以需要抛出panic。
2、数据库错误当数据库不可访问时为了不影响整个外部进程的运行故而不抛出panic而只是通过monitorNewMgr.Report的方式来报告故障。
*/