|
@@ -28,6 +28,7 @@ var (
|
|
Mgo *mongodb.MongodbSim
|
|
Mgo *mongodb.MongodbSim
|
|
Bidding *mongodb.MongodbSim
|
|
Bidding *mongodb.MongodbSim
|
|
Es elastic.Es
|
|
Es elastic.Es
|
|
|
|
+ EntEs elastic.EsV7
|
|
AreaCode = map[string]string{}
|
|
AreaCode = map[string]string{}
|
|
Hlyj *HlyjS
|
|
Hlyj *HlyjS
|
|
DataLock = sync.Mutex{}
|
|
DataLock = sync.Mutex{}
|
|
@@ -139,6 +140,14 @@ func InitBiddingMgo(addr, db, user, pwd string, size int) {
|
|
func InitEs(version, address, userName, password string, size int) {
|
|
func InitEs(version, address, userName, password string, size int) {
|
|
Es = elastic.NewEs(version, address, size, userName, password)
|
|
Es = elastic.NewEs(version, address, size, userName, password)
|
|
}
|
|
}
|
|
|
|
+func InitEntEs(version, address, userName, password string, size int) {
|
|
|
|
+ EntEs = elastic.EsV7{
|
|
|
|
+ Address: address,
|
|
|
|
+ UserName: userName,
|
|
|
|
+ Password: password,
|
|
|
|
+ Size: size,
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
func InitArea() {
|
|
func InitArea() {
|
|
info := JyBiMysql.Find("d_area_code_back", nil, "", "", -1, -1)
|
|
info := JyBiMysql.Find("d_area_code_back", nil, "", "", -1, -1)
|