This commit is contained in:
aozhiwei 2020-10-29 20:52:27 +08:00
parent 8e1110ef20
commit 11db81a7e1
4 changed files with 10 additions and 10 deletions

View File

@ -15,17 +15,17 @@ func (this *App_) Init() {
f5.App.SetPkgName("analyseapi")
this.App_.Init()
G.MetaMgr = new(MetaMgr).Init()
G.RiskMgr = new(RiskMgr).Init()
G.GameLog = new(GameLog).Init()
G.HttpServer = new(f5.HttpServer).Init("httpserver", 1000 * 60)
G.RiskMgr = new(RiskMgr).Init()
G.HttpServer.Start(G.MetaMgr.GetServer(1).GetListenPort());
}
func (this *App_) UnInit() {
G.RiskMgr.UnInit()
G.HttpServer.UnInit()
G.GameLog.UnInit()
G.RiskMgr.UnInit()
G.MetaMgr.UnInit()
this.App_.UnInit()
}

View File

@ -49,9 +49,9 @@ func (this *MetaMgr) Init() *MetaMgr {
WrapMeta: (*MtwIpBlackList)(nil)},
f5.MetaClass{
FileName: configDir + "launch_whitelist.json",
Idx: MT_LAUNCH_BLACK_LIST,
RawMeta: (*mt.LaunchBlackListMetas)(nil),
WrapMeta: (*MtwLaunchBlackList)(nil)},
Idx: MT_LAUNCH_WHITE_LIST,
RawMeta: (*mt.LaunchWhiteListMetas)(nil),
WrapMeta: (*MtwLaunchWhiteList)(nil)},
f5.MetaClass{
FileName: configDir + "launch_blacklist.json",
Idx: MT_LAUNCH_BLACK_LIST,

View File

@ -59,7 +59,7 @@ func (this* RiskMgr) Init() *RiskMgr {
for _, val := range G.MetaMgr.GetLaunchBlackList().GetList() {
this.launchBlackList[val] = 1
}
this.accessKeyId = G.MetaMgr.GetAliKey().GetAccessKeyId()
this.accessKeyId = G.MetaMgr.GetAliKey().GetAccessKeyid()
this.accessSecret = G.MetaMgr.GetAliKey().GetAccessSecret()
G.HttpServer.RegisterHandle("Analyse", "isOpen", this.__analyseIsOpen)

View File

@ -4,8 +4,8 @@ option go_package = ".;mt";
message AliKeyConf
{
optional string accessKeyId = 1;
optional string accessSecret = 2;
optional string access_keyid = 1;
optional string access_secret = 2;
}
message AliKeyInfoMetas
@ -42,7 +42,7 @@ message IpBlackList
message IpBlackListMetas
{
repeated IpWhiteList values = 1;
repeated IpBlackList values = 1;
}
message LaunchWhiteList
@ -62,5 +62,5 @@ message LaunchBlackList
message LaunchBlackListMetas
{
repeated IpWhiteList values = 1;
repeated LaunchBlackList values = 1;
}