by Robin at 20240514
This commit is contained in:
parent
4077eb2380
commit
7ab0b8ae82
|
@ -24,7 +24,6 @@ const (
|
|||
|
||||
type ElasticSearch struct {
|
||||
clientMix *elastic.Client
|
||||
indexsuffix string
|
||||
}
|
||||
|
||||
func NewElasticSearch(cfg *conf.ConfigSt) (es *ElasticSearch, err error) {
|
||||
|
@ -36,8 +35,6 @@ func NewElasticSearch(cfg *conf.ConfigSt) (es *ElasticSearch, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
es.indexsuffix = cfg.ElasticSearch.IndexSuffix
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -47,7 +44,7 @@ const (
|
|||
)
|
||||
|
||||
func (es *ElasticSearch) getIndexStreamerAcct() string {
|
||||
return IndexStreamerAcct + es.indexsuffix
|
||||
return IndexStreamerAcct
|
||||
}
|
||||
|
||||
func (es *ElasticSearch) CreateStreamerAcct(ctx *gin.Context, streameraccts []*dbstruct.EsStreamerAcct) error {
|
||||
|
|
|
@ -143,4 +143,3 @@ elastic_search:
|
|||
username: "elastic"
|
||||
password: "Wishpal@2024"
|
||||
sniff: false
|
||||
index_suffix: "_prod"
|
|
@ -140,8 +140,7 @@ ding_talk_robot:
|
|||
secret: "SECcc49257b2681b6488ab4be8ee815c61027a7254e2be3239c229de38b22207b5b"
|
||||
|
||||
elastic_search:
|
||||
uri: "http://172.31.37.67:9200"
|
||||
uri: "http://127.0.0.1:9200"
|
||||
username: "elastic"
|
||||
password: "Wishpal@2024"
|
||||
sniff: false
|
||||
index_suffix: "_test"
|
|
@ -171,7 +171,6 @@ type ElasticSearchConfig struct {
|
|||
Username string `json:"username" yaml:"username"` // 用户名
|
||||
Password string `json:"password" yaml:"password"` // 密码
|
||||
Sniff bool `json:"sniff" yaml:"sniff"` // sniffer
|
||||
IndexSuffix string `json:"index_suffix" yaml:"index_suffix"` // 索引后缀
|
||||
}
|
||||
|
||||
func LoadConfig(configFilePath string, cfg interface{}) error {
|
||||
|
|
Loading…
Reference in New Issue