From b84b451fc5d314565adbb7ead33955c3e5dafba5 Mon Sep 17 00:00:00 2001 From: panlei <2799247126@qq.com> Date: 星期四, 12 九月 2019 16:24:11 +0800 Subject: [PATCH] 加上事件推送 --- main.go | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 6bfe10f..411d714 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ "net/http" _ "net/http/pprof" "ruleprocess/insertdata" + "ruleprocess/labelFilter" "ruleprocess/util" "time" @@ -38,6 +39,10 @@ } func main() { + //fmt.Println("缂撳瓨鍒濆鍖栧畬鎴�",<- initchan)//dbserver鍒濆鍖栧畬姣� + go func() { + http.ListenAndServe("0.0.0.0:8899",nil) + }() flag.Parse() wg := sync.WaitGroup{} wg.Add(3) @@ -45,12 +50,8 @@ 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() { - logger.Info(http.ListenAndServe("0:0:0:0:6069",nil)) - }() go ruleserver.StartServer() nReciever("ipc:///tmp/sdk-2-rules-process.ipc", deliver.PushPull, 1) wg.Wait() @@ -94,7 +95,7 @@ insertdata.InsertToEs(resultMsg) logger.Debug("鎻掑叆瀹孍s鎵�鐢ㄦ椂闂达細", time.Since(start)) //浜嬩欢鎺ㄩ�� - //go labelFilter.Judge(resultMsg) + go labelFilter.Judge(resultMsg) //}(msg) } } -- Gitblit v1.8.0