Updated analyzers

This commit is contained in:
Trial97
2020-10-23 17:14:33 +03:00
committed by Dan Christian Bogos
parent 0810803475
commit 08d4f1fc21
14 changed files with 323 additions and 150 deletions

View File

@@ -18,17 +18,29 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
package config
import "github.com/cgrates/cgrates/utils"
import (
"path"
"github.com/blevesearch/bleve/index/store/boltdb"
"github.com/blevesearch/bleve/index/upsidedown"
"github.com/cgrates/cgrates/utils"
)
// AttributeSCfg is the configuration of attribute service
type AnalyzerSCfg struct {
Enabled bool
Enabled bool
DBPath string
IndexType string
StoreType string
}
func (alS *AnalyzerSCfg) loadFromJsonCfg(jsnCfg *AnalyzerSJsonCfg) (err error) {
if jsnCfg == nil {
return
}
alS.DBPath = path.Join("/home", "trial", "analize")
alS.IndexType = upsidedown.Name
alS.StoreType = boltdb.Name
if jsnCfg.Enabled != nil {
alS.Enabled = *jsnCfg.Enabled
}