From 9f8790a3d41d74854b1d59ee9f220185493515ce Mon Sep 17 00:00:00 2001 From: Trial97 Date: Fri, 15 May 2020 15:27:16 +0300 Subject: [PATCH] Removed GetInternalChan method from Service interface --- cmd/cgr-engine/cgr-engine.go | 42 ++++++++++++++++++------------------ services/analyzers.go | 5 ----- services/apierv1.go | 5 ----- services/apierv2.go | 5 ----- services/asteriskagent.go | 6 ------ services/attributes.go | 5 ----- services/cdrs.go | 5 ----- services/chargers.go | 5 ----- services/datadb.go | 6 ------ services/diameteragent.go | 6 ------ services/dispatchers.go | 5 ----- services/dnsagent.go | 7 ------ services/ees.go | 7 +----- services/ers.go | 6 ------ services/freeswitchagent.go | 7 ------ services/httpagent.go | 6 ------ services/kamailioagent.go | 6 ------ services/loaders.go | 5 ----- services/radiusagent.go | 6 ------ services/rals.go | 5 ----- services/rates.go | 6 +----- services/resources.go | 5 ----- services/responders.go | 5 ----- services/routes.go | 5 ----- services/schedulers.go | 5 ----- services/sessions.go | 5 ----- services/sipagent.go | 7 ------ services/stats.go | 5 ----- services/stordb.go | 6 ------ services/thresholds.go | 5 ----- servmanager/servmanager.go | 2 -- 31 files changed, 23 insertions(+), 183 deletions(-) diff --git a/cmd/cgr-engine/cgr-engine.go b/cmd/cgr-engine/cgr-engine.go index f431240ce..374640a75 100644 --- a/cmd/cgr-engine/cgr-engine.go +++ b/cmd/cgr-engine/cgr-engine.go @@ -540,36 +540,36 @@ func main() { // init internalRPCSet to share internal connections among the engine engine.IntRPC = engine.NewRPCClientSet() - engine.IntRPC.AddInternalRPCClient(utils.AnalyzerSv1, anz.GetIntenternalChan()) - engine.IntRPC.AddInternalRPCClient(utils.APIerSv1, apiSv1.GetIntenternalChan()) - engine.IntRPC.AddInternalRPCClient(utils.APIerSv2, apiSv1.GetIntenternalChan()) - engine.IntRPC.AddInternalRPCClient(utils.AttributeSv1, attrS.GetIntenternalChan()) + engine.IntRPC.AddInternalRPCClient(utils.AnalyzerSv1, internalAnalyzerSChan) + engine.IntRPC.AddInternalRPCClient(utils.APIerSv1, internalAPIerSv1Chan) + engine.IntRPC.AddInternalRPCClient(utils.APIerSv2, internalAPIerSv2Chan) + engine.IntRPC.AddInternalRPCClient(utils.AttributeSv1, internalAttributeSChan) engine.IntRPC.AddInternalRPCClient(utils.CacheSv1, internalCacheSChan) - engine.IntRPC.AddInternalRPCClient(utils.CDRsV1, cdrS.GetIntenternalChan()) - engine.IntRPC.AddInternalRPCClient(utils.CDRsV2, cdrS.GetIntenternalChan()) - engine.IntRPC.AddInternalRPCClient(utils.ChargerSv1, chrS.GetIntenternalChan()) + engine.IntRPC.AddInternalRPCClient(utils.CDRsV1, internalCDRServerChan) + engine.IntRPC.AddInternalRPCClient(utils.CDRsV2, internalCDRServerChan) + engine.IntRPC.AddInternalRPCClient(utils.ChargerSv1, internalChargerSChan) engine.IntRPC.AddInternalRPCClient(utils.GuardianSv1, internalGuardianSChan) - engine.IntRPC.AddInternalRPCClient(utils.LoaderSv1, ldrs.GetIntenternalChan()) - engine.IntRPC.AddInternalRPCClient(utils.ResourceSv1, reS.GetIntenternalChan()) - engine.IntRPC.AddInternalRPCClient(utils.Responder, rals.GetResponder().GetIntenternalChan()) - engine.IntRPC.AddInternalRPCClient(utils.SchedulerSv1, schS.GetIntenternalChan()) - engine.IntRPC.AddInternalRPCClient(utils.SessionSv1, smg.GetIntenternalChan()) - engine.IntRPC.AddInternalRPCClient(utils.StatSv1, stS.GetIntenternalChan()) - engine.IntRPC.AddInternalRPCClient(utils.RouteSv1, routeS.GetIntenternalChan()) - engine.IntRPC.AddInternalRPCClient(utils.ThresholdSv1, tS.GetIntenternalChan()) + engine.IntRPC.AddInternalRPCClient(utils.LoaderSv1, internalLoaderSChan) + engine.IntRPC.AddInternalRPCClient(utils.ResourceSv1, internalResourceSChan) + engine.IntRPC.AddInternalRPCClient(utils.Responder, internalResponderChan) + engine.IntRPC.AddInternalRPCClient(utils.SchedulerSv1, internalSchedulerSChan) + engine.IntRPC.AddInternalRPCClient(utils.SessionSv1, internalSessionSChan) + engine.IntRPC.AddInternalRPCClient(utils.StatSv1, internalStatSChan) + engine.IntRPC.AddInternalRPCClient(utils.RouteSv1, internalRouteSChan) + engine.IntRPC.AddInternalRPCClient(utils.ThresholdSv1, internalThresholdSChan) engine.IntRPC.AddInternalRPCClient(utils.ServiceManagerV1, internalServeManagerChan) engine.IntRPC.AddInternalRPCClient(utils.ConfigSv1, internalConfigChan) engine.IntRPC.AddInternalRPCClient(utils.CoreSv1, internalCoreSv1Chan) - engine.IntRPC.AddInternalRPCClient(utils.RALsV1, rals.GetIntenternalChan()) + engine.IntRPC.AddInternalRPCClient(utils.RALsV1, internalRALsChan) initConfigSv1(internalConfigChan, server) // Serve rpc connections - go startRpc(server, rals.GetResponder().GetIntenternalChan(), cdrS.GetIntenternalChan(), - reS.GetIntenternalChan(), stS.GetIntenternalChan(), - attrS.GetIntenternalChan(), chrS.GetIntenternalChan(), tS.GetIntenternalChan(), - routeS.GetIntenternalChan(), smg.GetIntenternalChan(), anz.GetIntenternalChan(), - dspS.GetIntenternalChan(), ldrs.GetIntenternalChan(), rals.GetIntenternalChan(), + go startRpc(server, internalResponderChan, internalCDRServerChan, + internalResourceSChan, internalStatSChan, + internalAttributeSChan, internalChargerSChan, internalThresholdSChan, + internalRouteSChan, internalSessionSChan, internalAnalyzerSChan, + internalDispatcherSChan, internalLoaderSChan, internalRALsChan, internalCacheSChan, internalEEsChan, internalRateSChan, exitChan) <-exitChan diff --git a/services/analyzers.go b/services/analyzers.go index b7eb9e5a2..6f091a0eb 100644 --- a/services/analyzers.go +++ b/services/analyzers.go @@ -80,11 +80,6 @@ func (anz *AnalyzerService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (anz *AnalyzerService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return anz.connChan -} - // Reload handles the change of config func (anz *AnalyzerService) Reload() (err error) { return // for the momment nothing to reload diff --git a/services/apierv1.go b/services/apierv1.go index 947c43734..82b988170 100644 --- a/services/apierv1.go +++ b/services/apierv1.go @@ -131,11 +131,6 @@ func (apiService *APIerSv1Service) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (apiService *APIerSv1Service) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return apiService.connChan -} - // Reload handles the change of config func (apiService *APIerSv1Service) Reload() (err error) { return diff --git a/services/apierv2.go b/services/apierv2.go index e5010af8b..99645817b 100644 --- a/services/apierv2.go +++ b/services/apierv2.go @@ -82,11 +82,6 @@ func (api *APIerSv2Service) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (api *APIerSv2Service) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return api.connChan -} - // Reload handles the change of config func (api *APIerSv2Service) Reload() (err error) { return diff --git a/services/asteriskagent.go b/services/asteriskagent.go index 79e720a75..200ecd090 100644 --- a/services/asteriskagent.go +++ b/services/asteriskagent.go @@ -28,7 +28,6 @@ import ( "github.com/cgrates/cgrates/config" "github.com/cgrates/cgrates/servmanager" "github.com/cgrates/cgrates/utils" - "github.com/cgrates/rpcclient" ) // NewAsteriskAgent returns the Asterisk Agent @@ -77,11 +76,6 @@ func (ast *AsteriskAgent) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (ast *AsteriskAgent) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return nil -} - // Reload handles the change of config func (ast *AsteriskAgent) Reload() (err error) { return diff --git a/services/attributes.go b/services/attributes.go index 6c09855be..c8b9f2d42 100644 --- a/services/attributes.go +++ b/services/attributes.go @@ -91,11 +91,6 @@ func (attrS *AttributeService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (attrS *AttributeService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return attrS.connChan -} - // Reload handles the change of config func (attrS *AttributeService) Reload() (err error) { return // for the momment nothing to reload diff --git a/services/cdrs.go b/services/cdrs.go index b66235079..dc5964fe5 100644 --- a/services/cdrs.go +++ b/services/cdrs.go @@ -111,11 +111,6 @@ func (cdrService *CDRServer) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (cdrService *CDRServer) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return cdrService.connChan -} - // Reload handles the change of config func (cdrService *CDRServer) Reload() (err error) { return diff --git a/services/chargers.go b/services/chargers.go index 9f384e56a..38d6a3104 100644 --- a/services/chargers.go +++ b/services/chargers.go @@ -92,11 +92,6 @@ func (chrS *ChargerService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (chrS *ChargerService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return chrS.connChan -} - // Reload handles the change of config func (chrS *ChargerService) Reload() (err error) { return diff --git a/services/datadb.go b/services/datadb.go index 0320d5612..d327cfb3b 100644 --- a/services/datadb.go +++ b/services/datadb.go @@ -25,7 +25,6 @@ import ( "github.com/cgrates/cgrates/config" "github.com/cgrates/cgrates/engine" "github.com/cgrates/cgrates/utils" - "github.com/cgrates/rpcclient" ) // NewDataDBService returns the DataDB Service @@ -80,11 +79,6 @@ func (db *DataDBService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (db *DataDBService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return nil -} - // Reload handles the change of config func (db *DataDBService) Reload() (err error) { db.Lock() diff --git a/services/diameteragent.go b/services/diameteragent.go index b925970c7..998b77c43 100644 --- a/services/diameteragent.go +++ b/services/diameteragent.go @@ -27,7 +27,6 @@ import ( "github.com/cgrates/cgrates/engine" "github.com/cgrates/cgrates/servmanager" "github.com/cgrates/cgrates/utils" - "github.com/cgrates/rpcclient" ) // NewDiameterAgent returns the Diameter Agent @@ -81,11 +80,6 @@ func (da *DiameterAgent) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (da *DiameterAgent) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return nil -} - // Reload handles the change of config func (da *DiameterAgent) Reload() (err error) { return diff --git a/services/dispatchers.go b/services/dispatchers.go index a864ff5ef..feff110bf 100644 --- a/services/dispatchers.go +++ b/services/dispatchers.go @@ -148,11 +148,6 @@ func (dspS *DispatcherService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (dspS *DispatcherService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return dspS.connChan -} - // Reload handles the change of config func (dspS *DispatcherService) Reload() (err error) { return // for the momment nothing to reload diff --git a/services/dnsagent.go b/services/dnsagent.go index 485cac71b..49e023b7a 100644 --- a/services/dnsagent.go +++ b/services/dnsagent.go @@ -27,7 +27,6 @@ import ( "github.com/cgrates/cgrates/engine" "github.com/cgrates/cgrates/servmanager" "github.com/cgrates/cgrates/utils" - "github.com/cgrates/rpcclient" ) // NewDNSAgent returns the DNS Agent @@ -80,12 +79,6 @@ func (dns *DNSAgent) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -// no chanel for DNSAgent -func (dns *DNSAgent) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return nil -} - // Reload handles the change of config func (dns *DNSAgent) Reload() (err error) { if dns.oldListen == dns.cfg.DNSAgentCfg().Listen { diff --git a/services/ees.go b/services/ees.go index ecf381614..b7a3c6083 100644 --- a/services/ees.go +++ b/services/ees.go @@ -22,7 +22,7 @@ import ( "fmt" "sync" - "github.com/cgrates/cgrates/apier/v1" + v1 "github.com/cgrates/cgrates/apier/v1" "github.com/cgrates/cgrates/config" "github.com/cgrates/cgrates/ees" "github.com/cgrates/cgrates/engine" @@ -62,11 +62,6 @@ type EventExporterService struct { rpc *v1.EventExporterSv1 } -// GetIntenternalChan is deprecated and it will be removed shortly -func (es *EventExporterService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - panic("deprecated method") -} - // ServiceName returns the service name func (es *EventExporterService) ServiceName() string { return utils.EventExporterS diff --git a/services/ers.go b/services/ers.go index 14b041d31..e36cfbbd5 100644 --- a/services/ers.go +++ b/services/ers.go @@ -27,7 +27,6 @@ import ( "github.com/cgrates/cgrates/ers" "github.com/cgrates/cgrates/servmanager" "github.com/cgrates/cgrates/utils" - "github.com/cgrates/rpcclient" ) // NewEventReaderService returns the EventReader Service @@ -83,11 +82,6 @@ func (erS *EventReaderService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (erS *EventReaderService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return nil -} - // Reload handles the change of config func (erS *EventReaderService) Reload() (err error) { erS.RLock() diff --git a/services/freeswitchagent.go b/services/freeswitchagent.go index 9dd355e02..119811565 100644 --- a/services/freeswitchagent.go +++ b/services/freeswitchagent.go @@ -28,7 +28,6 @@ import ( "github.com/cgrates/cgrates/config" "github.com/cgrates/cgrates/servmanager" "github.com/cgrates/cgrates/utils" - "github.com/cgrates/rpcclient" ) // NewFreeswitchAgent returns the Freeswitch Agent @@ -71,12 +70,6 @@ func (fS *FreeswitchAgent) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -// no chanel for FreeswitchAgent -func (fS *FreeswitchAgent) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return nil -} - // Reload handles the change of config func (fS *FreeswitchAgent) Reload() (err error) { if err = fS.Shutdown(); err != nil { diff --git a/services/httpagent.go b/services/httpagent.go index 6e3ea399a..fbac3c18c 100644 --- a/services/httpagent.go +++ b/services/httpagent.go @@ -27,7 +27,6 @@ import ( "github.com/cgrates/cgrates/engine" "github.com/cgrates/cgrates/servmanager" "github.com/cgrates/cgrates/utils" - "github.com/cgrates/rpcclient" ) // NewHTTPAgent returns the HTTP Agent @@ -73,11 +72,6 @@ func (ha *HTTPAgent) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (ha *HTTPAgent) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return nil -} - // Reload handles the change of config func (ha *HTTPAgent) Reload() (err error) { return // no reload diff --git a/services/kamailioagent.go b/services/kamailioagent.go index 591960e73..299c45a57 100644 --- a/services/kamailioagent.go +++ b/services/kamailioagent.go @@ -29,7 +29,6 @@ import ( "github.com/cgrates/cgrates/config" "github.com/cgrates/cgrates/servmanager" "github.com/cgrates/cgrates/utils" - "github.com/cgrates/rpcclient" ) // NewKamailioAgent returns the Kamailio Agent @@ -76,11 +75,6 @@ func (kam *KamailioAgent) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (kam *KamailioAgent) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return nil -} - // Reload handles the change of config func (kam *KamailioAgent) Reload() (err error) { diff --git a/services/loaders.go b/services/loaders.go index 1a5172f9b..ad37c5e18 100644 --- a/services/loaders.go +++ b/services/loaders.go @@ -90,11 +90,6 @@ func (ldrs *LoaderService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (ldrs *LoaderService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return ldrs.connChan -} - // Reload handles the change of config func (ldrs *LoaderService) Reload() (err error) { filterS := <-ldrs.filterSChan diff --git a/services/radiusagent.go b/services/radiusagent.go index 9aba1529d..b2d37a5bd 100644 --- a/services/radiusagent.go +++ b/services/radiusagent.go @@ -27,7 +27,6 @@ import ( "github.com/cgrates/cgrates/engine" "github.com/cgrates/cgrates/servmanager" "github.com/cgrates/cgrates/utils" - "github.com/cgrates/rpcclient" ) // NewRadiusAgent returns the Radius Agent @@ -78,11 +77,6 @@ func (rad *RadiusAgent) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (rad *RadiusAgent) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return nil -} - // Reload handles the change of config func (rad *RadiusAgent) Reload() (err error) { return diff --git a/services/rals.go b/services/rals.go index 0b746c776..6ac8b8950 100644 --- a/services/rals.go +++ b/services/rals.go @@ -95,11 +95,6 @@ func (rals *RalService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (rals *RalService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return rals.connChan -} - // Reload handles the change of config func (rals *RalService) Reload() (err error) { engine.SetRpSubjectPrefixMatching(rals.cfg.RalsCfg().RpSubjectPrefixMatching) diff --git a/services/rates.go b/services/rates.go index ce2aa2912..56cb1012b 100644 --- a/services/rates.go +++ b/services/rates.go @@ -27,6 +27,7 @@ import ( "github.com/cgrates/cgrates/rates" "github.com/cgrates/cgrates/servmanager" "github.com/cgrates/cgrates/utils" + //"github.com/cgrates/cgrates/apier/v1" "github.com/cgrates/rpcclient" ) @@ -60,11 +61,6 @@ type RateService struct { //rpc *v1.EventExporterSv1 } -// GetIntenternalChan is deprecated and it will be removed shortly -func (rs *RateService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - panic("deprecated method") -} - // ServiceName returns the service name func (rs *RateService) ServiceName() string { return utils.RateS diff --git a/services/resources.go b/services/resources.go index 3e96c1583..b4d90d985 100644 --- a/services/resources.go +++ b/services/resources.go @@ -94,11 +94,6 @@ func (reS *ResourceService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (reS *ResourceService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return reS.connChan -} - // Reload handles the change of config func (reS *ResourceService) Reload() (err error) { reS.Lock() diff --git a/services/responders.go b/services/responders.go index 1a619cd24..0a52b8785 100644 --- a/services/responders.go +++ b/services/responders.go @@ -75,11 +75,6 @@ func (resp *ResponderService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (resp *ResponderService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return resp.connChan -} - // Reload handles the change of config func (resp *ResponderService) Reload() (err error) { resp.Lock() diff --git a/services/routes.go b/services/routes.go index a40ad7348..9607beac5 100644 --- a/services/routes.go +++ b/services/routes.go @@ -95,11 +95,6 @@ func (routeS *RouteService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (routeS *RouteService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return routeS.connChan -} - // Reload handles the change of config func (routeS *RouteService) Reload() (err error) { return diff --git a/services/schedulers.go b/services/schedulers.go index 670f967a3..b7d69246e 100644 --- a/services/schedulers.go +++ b/services/schedulers.go @@ -90,11 +90,6 @@ func (schS *SchedulerService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (schS *SchedulerService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return schS.connChan -} - // Reload handles the change of config func (schS *SchedulerService) Reload() (err error) { schS.Lock() diff --git a/services/sessions.go b/services/sessions.go index 21b671ffb..f2b1c148d 100644 --- a/services/sessions.go +++ b/services/sessions.go @@ -117,11 +117,6 @@ func (smg *SessionService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (smg *SessionService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return smg.connChan -} - // Reload handles the change of config func (smg *SessionService) Reload() (err error) { return diff --git a/services/sipagent.go b/services/sipagent.go index fa2fc6e76..58b1c202f 100644 --- a/services/sipagent.go +++ b/services/sipagent.go @@ -27,7 +27,6 @@ import ( "github.com/cgrates/cgrates/engine" "github.com/cgrates/cgrates/servmanager" "github.com/cgrates/cgrates/utils" - "github.com/cgrates/rpcclient" ) // NewSIPAgent returns the sip Agent @@ -76,12 +75,6 @@ func (sip *SIPAgent) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -// no chanel for SIPAgent -func (sip *SIPAgent) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return nil -} - // Reload handles the change of config func (sip *SIPAgent) Reload() (err error) { if sip.oldListen == sip.cfg.SIPAgentCfg().Listen { diff --git a/services/stats.go b/services/stats.go index 66e40bf70..7878bddae 100644 --- a/services/stats.go +++ b/services/stats.go @@ -96,11 +96,6 @@ func (sts *StatService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (sts *StatService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return sts.connChan -} - // Reload handles the change of config func (sts *StatService) Reload() (err error) { sts.Lock() diff --git a/services/stordb.go b/services/stordb.go index 4975692ff..72791c870 100644 --- a/services/stordb.go +++ b/services/stordb.go @@ -26,7 +26,6 @@ import ( "github.com/cgrates/cgrates/config" "github.com/cgrates/cgrates/engine" "github.com/cgrates/cgrates/utils" - "github.com/cgrates/rpcclient" ) // NewStorDBService returns the StorDB Service @@ -78,11 +77,6 @@ func (db *StorDBService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (db *StorDBService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return nil -} - // Reload handles the change of config func (db *StorDBService) Reload() (err error) { db.Lock() diff --git a/services/thresholds.go b/services/thresholds.go index 6944ee1f5..b52cd47fb 100644 --- a/services/thresholds.go +++ b/services/thresholds.go @@ -91,11 +91,6 @@ func (thrs *ThresholdService) Start() (err error) { return } -// GetIntenternalChan returns the internal connection chanel -func (thrs *ThresholdService) GetIntenternalChan() (conn chan rpcclient.ClientConnector) { - return thrs.connChan -} - // Reload handles the change of config func (thrs *ThresholdService) Reload() (err error) { thrs.Lock() diff --git a/servmanager/servmanager.go b/servmanager/servmanager.go index 2124d5353..9a372552d 100644 --- a/servmanager/servmanager.go +++ b/servmanager/servmanager.go @@ -380,8 +380,6 @@ type Service interface { Reload() error // Shutdown stops the service Shutdown() error - // GetIntenternalChan returns the internal connection chanel - GetIntenternalChan() chan rpcclient.ClientConnector // IsRunning returns if the service is running IsRunning() bool // ShouldRun returns if the service should be running