| | |
| | | |
| | | } |
| | | func main() { |
| | | //fmt.Println("缓存初始化完成",<- initchan)//dbserver初始化完毕 |
| | | go func() { |
| | | http.ListenAndServe("0.0.0.0:8899",nil) |
| | | }() |
| | | flag.Parse() |
| | | wg := sync.WaitGroup{} |
| | | 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 func() { |
| | | http.ListenAndServe("0:0:0:0:8069",nil) |
| | | }() |
| | | go ruleserver.StartServer() |
| | | nReciever("ipc:///tmp/sdk-2-rules-process.ipc", deliver.PushPull, 1) |
| | | wg.Wait() |