ES公网IP-->内网IP
This commit is contained in:
parent
d52c24edf5
commit
701e7c75b1
28
main.go
28
main.go
@ -163,34 +163,16 @@ func main() {
|
|||||||
//}
|
//}
|
||||||
//defer bookCenter.db.Close()
|
//defer bookCenter.db.Close()
|
||||||
// ======================= 新增:初始化 ES ============================
|
// ======================= 新增:初始化 ES ============================
|
||||||
/////** 旧ES,ES0 **/
|
/** 本地测试公网IP **/
|
||||||
//esClient, err := es.NewESClient(
|
//esClient, err := es.NewESClient(
|
||||||
// []string{"http://103.236.91.138:9200"},
|
// []string{"http://36.212.12.92:9527"},
|
||||||
// "elastic",
|
// "elastic",
|
||||||
// "5mRDIUg52VC0fp14nw-F",
|
// "+Tz5qR_KushZ-bPgZ_H-",
|
||||||
//)
|
//)
|
||||||
|
|
||||||
///** ES,ES1 **/
|
/** 线上使用内网IP **/
|
||||||
//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",
|
|
||||||
//)
|
|
||||||
esClient, err := es.NewESClient(
|
esClient, err := es.NewESClient(
|
||||||
[]string{"http://36.212.12.92:9527"},
|
[]string{"http://192.168.1.211:9527"},
|
||||||
"elastic",
|
"elastic",
|
||||||
"+Tz5qR_KushZ-bPgZ_H-",
|
"+Tz5qR_KushZ-bPgZ_H-",
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user