1
This commit is contained in:
parent
8e1110ef20
commit
11db81a7e1
@ -15,17 +15,17 @@ func (this *App_) Init() {
|
|||||||
f5.App.SetPkgName("analyseapi")
|
f5.App.SetPkgName("analyseapi")
|
||||||
this.App_.Init()
|
this.App_.Init()
|
||||||
G.MetaMgr = new(MetaMgr).Init()
|
G.MetaMgr = new(MetaMgr).Init()
|
||||||
G.RiskMgr = new(RiskMgr).Init()
|
|
||||||
G.GameLog = new(GameLog).Init()
|
G.GameLog = new(GameLog).Init()
|
||||||
G.HttpServer = new(f5.HttpServer).Init("httpserver", 1000 * 60)
|
G.HttpServer = new(f5.HttpServer).Init("httpserver", 1000 * 60)
|
||||||
|
G.RiskMgr = new(RiskMgr).Init()
|
||||||
|
|
||||||
G.HttpServer.Start(G.MetaMgr.GetServer(1).GetListenPort());
|
G.HttpServer.Start(G.MetaMgr.GetServer(1).GetListenPort());
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *App_) UnInit() {
|
func (this *App_) UnInit() {
|
||||||
|
G.RiskMgr.UnInit()
|
||||||
G.HttpServer.UnInit()
|
G.HttpServer.UnInit()
|
||||||
G.GameLog.UnInit()
|
G.GameLog.UnInit()
|
||||||
G.RiskMgr.UnInit()
|
|
||||||
G.MetaMgr.UnInit()
|
G.MetaMgr.UnInit()
|
||||||
this.App_.UnInit()
|
this.App_.UnInit()
|
||||||
}
|
}
|
||||||
|
@ -49,9 +49,9 @@ func (this *MetaMgr) Init() *MetaMgr {
|
|||||||
WrapMeta: (*MtwIpBlackList)(nil)},
|
WrapMeta: (*MtwIpBlackList)(nil)},
|
||||||
f5.MetaClass{
|
f5.MetaClass{
|
||||||
FileName: configDir + "launch_whitelist.json",
|
FileName: configDir + "launch_whitelist.json",
|
||||||
Idx: MT_LAUNCH_BLACK_LIST,
|
Idx: MT_LAUNCH_WHITE_LIST,
|
||||||
RawMeta: (*mt.LaunchBlackListMetas)(nil),
|
RawMeta: (*mt.LaunchWhiteListMetas)(nil),
|
||||||
WrapMeta: (*MtwLaunchBlackList)(nil)},
|
WrapMeta: (*MtwLaunchWhiteList)(nil)},
|
||||||
f5.MetaClass{
|
f5.MetaClass{
|
||||||
FileName: configDir + "launch_blacklist.json",
|
FileName: configDir + "launch_blacklist.json",
|
||||||
Idx: MT_LAUNCH_BLACK_LIST,
|
Idx: MT_LAUNCH_BLACK_LIST,
|
||||||
|
@ -59,7 +59,7 @@ func (this* RiskMgr) Init() *RiskMgr {
|
|||||||
for _, val := range G.MetaMgr.GetLaunchBlackList().GetList() {
|
for _, val := range G.MetaMgr.GetLaunchBlackList().GetList() {
|
||||||
this.launchBlackList[val] = 1
|
this.launchBlackList[val] = 1
|
||||||
}
|
}
|
||||||
this.accessKeyId = G.MetaMgr.GetAliKey().GetAccessKeyId()
|
this.accessKeyId = G.MetaMgr.GetAliKey().GetAccessKeyid()
|
||||||
this.accessSecret = G.MetaMgr.GetAliKey().GetAccessSecret()
|
this.accessSecret = G.MetaMgr.GetAliKey().GetAccessSecret()
|
||||||
|
|
||||||
G.HttpServer.RegisterHandle("Analyse", "isOpen", this.__analyseIsOpen)
|
G.HttpServer.RegisterHandle("Analyse", "isOpen", this.__analyseIsOpen)
|
||||||
|
@ -4,8 +4,8 @@ option go_package = ".;mt";
|
|||||||
|
|
||||||
message AliKeyConf
|
message AliKeyConf
|
||||||
{
|
{
|
||||||
optional string accessKeyId = 1;
|
optional string access_keyid = 1;
|
||||||
optional string accessSecret = 2;
|
optional string access_secret = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message AliKeyInfoMetas
|
message AliKeyInfoMetas
|
||||||
@ -42,7 +42,7 @@ message IpBlackList
|
|||||||
|
|
||||||
message IpBlackListMetas
|
message IpBlackListMetas
|
||||||
{
|
{
|
||||||
repeated IpWhiteList values = 1;
|
repeated IpBlackList values = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message LaunchWhiteList
|
message LaunchWhiteList
|
||||||
@ -62,5 +62,5 @@ message LaunchBlackList
|
|||||||
|
|
||||||
message LaunchBlackListMetas
|
message LaunchBlackListMetas
|
||||||
{
|
{
|
||||||
repeated IpWhiteList values = 1;
|
repeated LaunchBlackList values = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user