mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-12 02:26:26 +05:00
Add Charger in LoaderS
This commit is contained in:
committed by
Dan Christian Bogos
parent
eabaec98e6
commit
6764c68156
@@ -19,12 +19,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
package dispatcher
|
||||
|
||||
import (
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
func (dS *DispatcherService) ChargerSv1Ping(ign string, reply *string) error {
|
||||
if dS.chargerS == nil {
|
||||
return utils.NewErrNotConnected(utils.ChargerS)
|
||||
return utils.NewErrNotConnected(utils.AttributeS)
|
||||
}
|
||||
return dS.chargerS.Call(utils.ChargerSv1Ping, ign, reply)
|
||||
}
|
||||
|
||||
func (dS *DispatcherService) ChargerSv1GetChargersForEvent(args *ArgsAttrProcessEventWithApiKey,
|
||||
reply *engine.AttributeProfile) (err error) {
|
||||
if dS.attrS == nil {
|
||||
return utils.NewErrNotConnected(utils.AttributeS)
|
||||
}
|
||||
if err = dS.authorize(utils.AttributeSv1GetAttributeForEvent, args.AttrArgsProcessEvent.CGREvent.Tenant,
|
||||
args.APIKey, args.AttrArgsProcessEvent.CGREvent.Time); err != nil {
|
||||
return
|
||||
}
|
||||
return dS.attrS.Call(utils.AttributeSv1GetAttributeForEvent, args.AttrArgsProcessEvent, reply)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user