mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Added GetService to ServiceManager
This commit is contained in:
committed by
Dan Christian Bogos
parent
32c606467f
commit
9824406198
@@ -458,6 +458,15 @@ func (srvMngr *ServiceManager) reloadService(srv Service, shouldRun bool) (err e
|
||||
return
|
||||
}
|
||||
|
||||
// GetService returns the named service
|
||||
func (srvMngr *ServiceManager) GetService(subsystem string) (srv Service, err error) {
|
||||
var has bool
|
||||
if srv, has = srvMngr.subsystems[subsystem]; !has {
|
||||
return nil, utils.ErrNotFound
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// ServiceProvider should implement this to provide information for service
|
||||
type ServiceProvider interface {
|
||||
// GetDM returns the DataManager
|
||||
|
||||
Reference in New Issue
Block a user