1
This commit is contained in:
parent
c418933185
commit
cab594d969
@ -48,10 +48,10 @@ func (this* RiskMgr) Init() *RiskMgr {
|
|||||||
this.accessSecret = G.MetaMgr.GetAliKey().GetAccessSecret()
|
this.accessSecret = G.MetaMgr.GetAliKey().GetAccessSecret()
|
||||||
this.clusterConf = G.MetaMgr.GetCurrServer()
|
this.clusterConf = G.MetaMgr.GetCurrServer()
|
||||||
|
|
||||||
G.HttpServer.RegisterHandle("Analyse", "isOpen", this.__analyseIsOpen)
|
G.HttpServer.RegisterHandle("Analyse", "isOpen", this._analyseIsOpen)
|
||||||
G.HttpServer.RegisterHandle("Ops", "dump", this.__opsDump)
|
G.HttpServer.RegisterHandle("Ops", "dump", this._opsDump)
|
||||||
G.HttpServer.RegisterHandle("Ops", "syncConf", this.__opsSyncConf)
|
G.HttpServer.RegisterHandle("Ops", "syncConf", this._opsSyncConf)
|
||||||
G.HttpServer.RegisterHandle("Ops", "info", this.__opsInfo)
|
G.HttpServer.RegisterHandle("Ops", "info", this._opsInfo)
|
||||||
f5.Timer().AddRepeatTimer(1000 * 60,
|
f5.Timer().AddRepeatTimer(1000 * 60,
|
||||||
func (params* q5.XParams) {
|
func (params* q5.XParams) {
|
||||||
},
|
},
|
||||||
@ -149,7 +149,7 @@ func (this *RiskMgr) GetGameConf(gameId int32, channel int32) *GameConf {
|
|||||||
return val
|
return val
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *RiskMgr) __analyseIsOpen(c *f5.Context) {
|
func (this *RiskMgr) _analyseIsOpen(c *f5.Context) {
|
||||||
var gameConf *GameConf
|
var gameConf *GameConf
|
||||||
responseStr := ""
|
responseStr := ""
|
||||||
isPass := func () bool {
|
isPass := func () bool {
|
||||||
@ -211,7 +211,7 @@ func (this *RiskMgr) __analyseIsOpen(c *f5.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *RiskMgr) __opsDump(c *f5.Context) {
|
func (this *RiskMgr) _opsDump(c *f5.Context) {
|
||||||
gameId := c.Request("gameid").GetInt32()
|
gameId := c.Request("gameid").GetInt32()
|
||||||
channel := c.Request("channel").GetInt32()
|
channel := c.Request("channel").GetInt32()
|
||||||
gameConf := this.GetGameConf(gameId, channel)
|
gameConf := this.GetGameConf(gameId, channel)
|
||||||
@ -222,7 +222,7 @@ func (this *RiskMgr) __opsDump(c *f5.Context) {
|
|||||||
c.Response(gameConf.Dump().ToJsonStr())
|
c.Response(gameConf.Dump().ToJsonStr())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *RiskMgr) __opsSyncConf(c *f5.Context) {
|
func (this *RiskMgr) _opsSyncConf(c *f5.Context) {
|
||||||
gameId := c.Request("gameid").GetInt32()
|
gameId := c.Request("gameid").GetInt32()
|
||||||
channel := c.Request("channel").GetInt32()
|
channel := c.Request("channel").GetInt32()
|
||||||
gameConf := this.GetGameConf(gameId, channel)
|
gameConf := this.GetGameConf(gameId, channel)
|
||||||
@ -234,7 +234,7 @@ func (this *RiskMgr) __opsSyncConf(c *f5.Context) {
|
|||||||
c.ResponseOk()
|
c.ResponseOk()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *RiskMgr) __opsInfo(c *f5.Context) {
|
func (this *RiskMgr) _opsInfo(c *f5.Context) {
|
||||||
gameId := c.Request("gameid").GetInt32()
|
gameId := c.Request("gameid").GetInt32()
|
||||||
channel := c.Request("channel").GetInt32()
|
channel := c.Request("channel").GetInt32()
|
||||||
gameConf := this.GetGameConf(gameId, channel)
|
gameConf := this.GetGameConf(gameId, channel)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user