mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 16:48:45 +05:00
Added EeSV1 APIs back
This commit is contained in:
committed by
Dan Christian Bogos
parent
f147617401
commit
a3ebbe38ec
@@ -23,6 +23,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/cgrates/birpc"
|
||||
"github.com/cgrates/cgrates/apis"
|
||||
"github.com/cgrates/cgrates/config"
|
||||
"github.com/cgrates/cgrates/cores"
|
||||
"github.com/cgrates/cgrates/ees"
|
||||
@@ -60,8 +61,8 @@ type EventExporterService struct {
|
||||
rldChan chan struct{}
|
||||
stopChan chan struct{}
|
||||
|
||||
eeS *ees.EventExporterS
|
||||
// rpc *v1.EeSv1
|
||||
eeS *ees.EventExporterS
|
||||
rpc *apis.EeSv1
|
||||
anz *AnalyzerService
|
||||
srvDep map[string]*sync.WaitGroup
|
||||
}
|
||||
@@ -96,7 +97,7 @@ func (es *EventExporterService) Shutdown() (err error) {
|
||||
close(es.stopChan)
|
||||
es.eeS.Shutdown()
|
||||
es.eeS = nil
|
||||
//<-es.intConnChan
|
||||
<-es.intConnChan
|
||||
return
|
||||
}
|
||||
|
||||
@@ -118,10 +119,11 @@ func (es *EventExporterService) Start() (err error) {
|
||||
es.stopChan = make(chan struct{})
|
||||
go es.eeS.ListenAndServe(es.stopChan, es.rldChan)
|
||||
|
||||
// es.rpc = v1.NewEeSv1(es.eeS)
|
||||
// if !es.cfg.DispatcherSCfg().Enabled {
|
||||
// es.server.RpcRegister(es.rpc)
|
||||
// }
|
||||
// es.intConnChan <- es.anz.GetInternalCodec(es.eeS, utils.EventExporterS)
|
||||
es.rpc = apis.NewEeSv1(es.eeS)
|
||||
srv, _ := birpc.NewService(es.rpc, "", false)
|
||||
if !es.cfg.DispatcherSCfg().Enabled {
|
||||
es.server.RpcRegister(srv)
|
||||
}
|
||||
es.intConnChan <- es.anz.GetInternalCodec(srv, utils.EEs)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user