1
This commit is contained in:
parent
d10e631684
commit
1ba269fb20
@ -15,15 +15,17 @@ func (this *App_) Init() {
|
||||
f5.App.SetPkgName("analyseapi")
|
||||
this.App_.Init()
|
||||
G.MetaMgr = new(MetaMgr).Init()
|
||||
G.HttpServer = new(f5.HttpServer).Init()
|
||||
G.RiskMgr = new(RiskMgr).Init()
|
||||
G.GameLog = new(GameLog).Init()
|
||||
G.HttpServer = new(f5.HttpServer).Init()
|
||||
|
||||
G.HttpServer.Start(G.MetaMgr.GetServer(1).GetListenPort());
|
||||
}
|
||||
|
||||
func (this *App_) UnInit() {
|
||||
G.GameLog.UnInit()
|
||||
G.HttpServer.UnInit()
|
||||
G.GameLog.UnInit()
|
||||
G.RiskMgr.UnInit()
|
||||
G.MetaMgr.UnInit()
|
||||
this.App_.UnInit()
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ type GlobalVar struct {
|
||||
MetaMgr *MetaMgr
|
||||
HttpServer *f5.HttpServer
|
||||
GameLog *GameLog
|
||||
RiskMgr *RiskMgr
|
||||
}
|
||||
|
||||
var G *GlobalVar = &GlobalVar{}
|
||||
|
@ -1,7 +1,9 @@
|
||||
package main
|
||||
|
||||
import "f5"
|
||||
import "mt"
|
||||
import (
|
||||
"f5"
|
||||
"mt"
|
||||
)
|
||||
|
||||
const (
|
||||
MT_SERVER_INFO = 0
|
||||
|
@ -5,3 +5,11 @@ import "mt"
|
||||
type MtwServerInfo struct {
|
||||
*mt.ServerInfo
|
||||
}
|
||||
|
||||
type MtwWhiteList struct {
|
||||
*mt.WhiteList
|
||||
}
|
||||
|
||||
type MtwBlackList struct {
|
||||
*mt.BlackList
|
||||
}
|
||||
|
20
server/analyseapi/riskmgr.go
Normal file
20
server/analyseapi/riskmgr.go
Normal file
@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
type RiskMgr struct {
|
||||
|
||||
}
|
||||
|
||||
func (this* RiskMgr) Init() *RiskMgr {
|
||||
return this
|
||||
}
|
||||
|
||||
func (this* RiskMgr) UnInit() {
|
||||
}
|
||||
|
||||
func (this* RiskMgr) InWhiteList(ip string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (this* RiskMgr) InBlackList(ip string) bool {
|
||||
return false
|
||||
}
|
@ -13,3 +13,23 @@ message ServerInfoMetas
|
||||
{
|
||||
repeated ServerInfo values = 1;
|
||||
}
|
||||
|
||||
message WhiteList
|
||||
{
|
||||
repeated string ip_tables = 1;
|
||||
}
|
||||
|
||||
message WhiteListMetas
|
||||
{
|
||||
repeated WhiteList values = 1;
|
||||
}
|
||||
|
||||
message BlackList
|
||||
{
|
||||
repeated string ip_tables = 1;
|
||||
}
|
||||
|
||||
message BlackListMetas
|
||||
{
|
||||
repeated WhiteList values = 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user