panlei
2019-09-16 716810adb573f7e6b40ab52887b5b158d9824817
insertdata/insertDataToEs.go
@@ -5,7 +5,6 @@
   "encoding/json"
   "errors"
   "fmt"
   "io/ioutil"
   "net"
   "ruleprocess/cache"
   "ruleprocess/logger"
@@ -13,7 +12,6 @@
   "time"
   "basic.com/pubsub/protomsg.git"
   "github.com/go-yaml/yaml"
   "github.com/golang/protobuf/proto"
   "github.com/satori/go.uuid"
   "ruleprocess/ruleserver"
@@ -32,17 +30,9 @@
}
func init() {
   data, err := ioutil.ReadFile("./config/conf.yml")
   if err != nil {
      fmt.Println("读取配置文件出错--", err)
      logger.Error("读取配置文件出错--", err)
   }
   c := conf{}
   //把yaml形式的字符串解析成struct类型
   yaml.Unmarshal(data, &c)
   weedfsUrl = c.PhotoUrl
   videoPersonUrl = c.VideoPersons
   personAction = c.PersonAction
   weedfsUrl = "http://"+WeedFs.Ip+":"+strconv.Itoa(WeedFs.UploadPort)+"/submit"
   videoPersonUrl = "http://"+EsInfo.Masterip+":"+EsInfo.Httpport+"/"+EsInfo.EsIndex.VideoPersons.IndexName+"/"+EsInfo.EsIndex.VideoPersons.IndexType
   personAction = "http://"+EsInfo.Masterip+":"+EsInfo.Httpport+"/"+EsInfo.EsIndex.Personaction.IndexName+"/"+EsInfo.EsIndex.Personaction.IndexType
}
// 人脸的数据结构