ES公网IP-->内网IP

This commit is contained in:
97694731 2026-05-08 16:51:25 +08:00
parent d52c24edf5
commit 701e7c75b1

28
main.go
View File

@ -163,34 +163,16 @@ func main() {
//}
//defer bookCenter.db.Close()
// ======================= 新增:初始化 ES ============================
/////** 旧ESES0 **/
/** 本地测试公网IP **/
//esClient, err := es.NewESClient(
// []string{"http://103.236.91.138:9200"},
// []string{"http://36.212.12.92:9527"},
// "elastic",
// "5mRDIUg52VC0fp14nw-F",
// "+Tz5qR_KushZ-bPgZ_H-",
//)
///** ESES1 **/
//esClient, err := es.NewESClient(
// []string{"http://103.236.74.207:9200"},
// "elastic",
// "y3h2fdYyrXewkSrY6uhh",
//)
/** 新ES任务2 **/
//esClient, err := es.NewESClient(
// []string{"http://localhost:9200"},
// "elastic",
// "zDzSXel3PFwx9=6Ybmqv",
//)
/** ES2 本地测试 **/
//esClient, err := es.NewESClient(
// []string{"https://103.236.91.138:9200"},
// "elastic",
// "7AYdoW=mn3yHZ*3A=Z1x",
//)
/** 线上使用内网IP **/
esClient, err := es.NewESClient(
[]string{"http://36.212.12.92:9527"},
[]string{"http://192.168.1.211:9527"},
"elastic",
"+Tz5qR_KushZ-bPgZ_H-",
)