| | |
| | | "basic.com/dbapi.git" |
| | | "basic.com/pubsub/protomsg.git" |
| | | "basic.com/valib/deliver.git" |
| | | "net/http" |
| | | _ "net/http/pprof" |
| | | "ruleprocess/insertdata" |
| | | "ruleprocess/util" |
| | | "time" |
| | |
| | | |
| | | } |
| | | func main() { |
| | | //fmt.Println("缓存初始化完成",<- initchan)//dbserver初始化完毕 |
| | | go func() { |
| | | http.ListenAndServe("0.0.0.0:8899",nil) |
| | | }() |
| | | flag.Parse() |
| | | wg := sync.WaitGroup{} |
| | | wg.Add(2) |
| | | wg.Add(3) |
| | | |
| | | dbapi.Init(*dbIp, *dbPort) |
| | | go cache.Init(initchan, *dbIp, *surveyPort, *pubPort) |
| | | logger.Info("cache init completed!!!", <-initchan) //dbserver初始化完毕 |
| | | //fmt.Println("缓存初始化完成",<- initchan)//dbserver初始化完毕 |
| | | ruleserver.Init() |
| | | go ruleserver.TimeTicker() |
| | | go ruleserver.StartServer() |