mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Populate Addreses out of ExportPath
This commit is contained in:
committed by
Dan Christian Bogos
parent
ff9d658e6b
commit
89fc2ff587
@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
package ees
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/cgrates/cgrates/config"
|
||||
@@ -48,9 +49,11 @@ type ElasticEe struct {
|
||||
|
||||
// init will create all the necessary dependencies, including opening the file
|
||||
func (eEe *ElasticEe) init() (err error) {
|
||||
// compose the config out of opts
|
||||
// create the client
|
||||
if eEe.eClnt, err = elasticsearch.NewDefaultClient(); err != nil {
|
||||
if eEe.eClnt, err = elasticsearch.NewClient(
|
||||
elasticsearch.Config{
|
||||
Addresses: strings.Split(eEe.cgrCfg.EEsCfg().Exporters[eEe.cfgIdx].ExportPath, utils.INFIELD_SEP),
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user