|
@@ -19,6 +19,7 @@ var (
|
|
Dbname string
|
|
Dbname string
|
|
Dbcoll string
|
|
Dbcoll string
|
|
Es *elastic.Elastic
|
|
Es *elastic.Elastic
|
|
|
|
+ Es2 *elastic.Elastic
|
|
Index string
|
|
Index string
|
|
//Itype string
|
|
//Itype string
|
|
EsFields []string
|
|
EsFields []string
|
|
@@ -55,6 +56,17 @@ func init() {
|
|
}
|
|
}
|
|
Es.InitElasticSize()
|
|
Es.InitElasticSize()
|
|
|
|
|
|
|
|
+ //集群2
|
|
|
|
+ if utils.ObjToString(econf["addr2"]) != "" {
|
|
|
|
+ Es2 = &elastic.Elastic{
|
|
|
|
+ S_esurl: econf["addr2"].(string),
|
|
|
|
+ I_size: utils.IntAllDef(econf["pool"], 12),
|
|
|
|
+ Username: econf["username2"].(string),
|
|
|
|
+ Password: econf["password2"].(string),
|
|
|
|
+ }
|
|
|
|
+ Es2.InitElasticSize()
|
|
|
|
+ }
|
|
|
|
+
|
|
EsFields = utils.ObjArrToStringArr(econf["esfields"].([]interface{}))
|
|
EsFields = utils.ObjArrToStringArr(econf["esfields"].([]interface{}))
|
|
|
|
|
|
//Updatetime = utils.Int64All(Sysconfig["updatetime"])
|
|
//Updatetime = utils.Int64All(Sysconfig["updatetime"])
|