1
This commit is contained in:
parent
d10e631684
commit
1ba269fb20
@ -15,15 +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.HttpServer = new(f5.HttpServer).Init()
|
G.RiskMgr = new(RiskMgr).Init()
|
||||||
G.GameLog = new(GameLog).Init()
|
G.GameLog = new(GameLog).Init()
|
||||||
|
G.HttpServer = new(f5.HttpServer).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.GameLog.UnInit()
|
|
||||||
G.HttpServer.UnInit()
|
G.HttpServer.UnInit()
|
||||||
|
G.GameLog.UnInit()
|
||||||
|
G.RiskMgr.UnInit()
|
||||||
G.MetaMgr.UnInit()
|
G.MetaMgr.UnInit()
|
||||||
this.App_.UnInit()
|
this.App_.UnInit()
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ type GlobalVar struct {
|
|||||||
MetaMgr *MetaMgr
|
MetaMgr *MetaMgr
|
||||||
HttpServer *f5.HttpServer
|
HttpServer *f5.HttpServer
|
||||||
GameLog *GameLog
|
GameLog *GameLog
|
||||||
|
RiskMgr *RiskMgr
|
||||||
}
|
}
|
||||||
|
|
||||||
var G *GlobalVar = &GlobalVar{}
|
var G *GlobalVar = &GlobalVar{}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import "f5"
|
import (
|
||||||
import "mt"
|
"f5"
|
||||||
|
"mt"
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MT_SERVER_INFO = 0
|
MT_SERVER_INFO = 0
|
||||||
|
@ -5,3 +5,11 @@ import "mt"
|
|||||||
type MtwServerInfo struct {
|
type MtwServerInfo struct {
|
||||||
*mt.ServerInfo
|
*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;
|
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