添加elasticsearch操作api
parent
92404cc17d
commit
0a452fe617
|
@ -22,11 +22,10 @@ func InitELK() {
|
|||
if nil != e{
|
||||
logs.Error(e.Error())
|
||||
gElkEngine.cli = nil
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func (*ElkEngine)Search() (error) {
|
||||
func (*ElkEngine)Search(index string) (error) {
|
||||
if nil != gElkEngine.cli{
|
||||
|
||||
}
|
||||
|
|
|
@ -24,12 +24,12 @@ func Init() {
|
|||
//InitMongoDb()
|
||||
fmt.Print("api runmode is " + config.ApiConfig().RunMode)
|
||||
if config.ApiConfig().RunMode == "debug"{
|
||||
blogDb = Database{Type: string(""), DB: initMysql(blogConf)}
|
||||
blogDb = Database{Type: string(""), DB: initMysqlTLS(blogConf)}
|
||||
}else{
|
||||
blogDb = Database{Type: string(""), DB: initMysqlTLS(blogConf)}
|
||||
}
|
||||
if config.ApiConfig().RunMode == "debug"{
|
||||
gDb = Database{Type: string(""), DB: initMysql(mysqlconf)}
|
||||
gDb = Database{Type: string(""), DB: initMysqlTLS(mysqlconf)}
|
||||
}else{
|
||||
gDb = Database{Type: string(""), DB: initMysqlTLS(mysqlconf)}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue