Added kafka as a EventReader

This commit is contained in:
Trial97
2019-09-08 10:41:18 +03:00
committed by Dan Christian Bogos
parent 8a9ac38536
commit 883750b58d
3 changed files with 3 additions and 23 deletions

View File

@@ -58,28 +58,6 @@ func (cS *CoreService) Status(arg *utils.TenantWithArgDispatcher, reply *map[str
response[utils.Version] = utils.GetCGRVersion()
response[utils.RunningSince] = utils.GetStartTime()
response[utils.GoVersion] = runtime.Version()
// in case we need this info in the future
// response["Extra MemInfo"] = map[string]interface{}{
// "Alloc": utils.SizeFmt((float64)(memstats.Alloc), ""),
// "TotalAlloc": utils.SizeFmt((float64)(memstats.TotalAlloc), ""),
// "Sys": utils.SizeFmt((float64)(memstats.Sys), ""),
// "Mallocs": utils.SizeFmt((float64)(memstats.Mallocs), ""),
// "Frees": utils.SizeFmt((float64)(memstats.Frees), ""),
// "HeapAlloc": utils.SizeFmt((float64)(memstats.HeapAlloc), ""),
// "HeapSys": utils.SizeFmt((float64)(memstats.HeapSys), ""),
// "HeapIdle": utils.SizeFmt((float64)(memstats.HeapIdle), ""),
// "HeapInuse": utils.SizeFmt((float64)(memstats.HeapInuse), ""),
// "StackInuse": utils.SizeFmt((float64)(memstats.StackInuse), ""),
// "StackSys": utils.SizeFmt((float64)(memstats.StackSys), ""),
// "MSpanInuse": utils.SizeFmt((float64)(memstats.MSpanInuse), ""),
// "MSpanSys": utils.SizeFmt((float64)(memstats.MSpanSys), ""),
// "MCacheInuse": utils.SizeFmt((float64)(memstats.MCacheInuse), ""),
// "MCacheSys": utils.SizeFmt((float64)(memstats.MCacheSys), ""),
// "BuckHashSys": utils.SizeFmt((float64)(memstats.BuckHashSys), ""),
// "GCSys": utils.SizeFmt((float64)(memstats.GCSys), ""),
// "OtherSys": utils.SizeFmt((float64)(memstats.OtherSys), ""),
// "NextGC": utils.SizeFmt((float64)(memstats.NextGC), ""),
// }
*reply = response
return
}

View File

@@ -37,7 +37,7 @@ import (
const (
defaultTopic = "cgrates_cdrc"
defaultGroupID = "cgrates_conumer"
defaultGroupID = "cgrates_consumer"
// ToDo: export it to utils
topic = "topic"

View File

@@ -40,6 +40,8 @@ func NewEventReader(cfg *config.CGRConfig, cfgIdx int,
err = fmt.Errorf("unsupported reader type: <%s>", cfg.ERsCfg().Readers[cfgIdx].Type)
case utils.MetaFileCSV:
return NewCSVFileER(cfg, cfgIdx, rdrEvents, rdrErr, fltrS, rdrExit)
case utils.MetaKafkajsonMap:
return NewKafkaER(cfg, cfgIdx, rdrEvents, fltrS, rdrExit, appExit)
}
return
}