Add AccountS in dispatcher

This commit is contained in:
TeoV
2020-12-22 14:13:41 +02:00
committed by Dan Christian Bogos
parent 610cf862bd
commit 42add2a12c
2 changed files with 18 additions and 1 deletions

View File

@@ -1313,7 +1313,21 @@ type DispatcherActionSv1 struct {
dR *dispatchers.DispatcherService
}
// Ping implements RateSv1Ping
// Ping implements ActionSv1Ping
func (dR *DispatcherActionSv1) Ping(args *utils.CGREventWithOpts, reply *string) error {
return dR.dR.ActionSv1Ping(args, reply)
}
func NewDispatcherAccountSv1(dps *dispatchers.DispatcherService) *DispatcherAccountSv1 {
return &DispatcherAccountSv1{dR: dps}
}
// Exports RPC from RLs
type DispatcherAccountSv1 struct {
dR *dispatchers.DispatcherService
}
// Ping implements AccountSv1Ping
func (dR *DispatcherAccountSv1) Ping(args *utils.CGREventWithOpts, reply *string) error {
return dR.dR.AccountSv1Ping(args, reply)
}

View File

@@ -155,6 +155,9 @@ func (dspS *DispatcherService) Start() (err error) {
dspS.server.RpcRegisterName(utils.ActionSv1,
v1.NewDispatcherActionSv1(dspS.dspS))
dspS.server.RpcRegisterName(utils.AccountSv1,
v1.NewDispatcherAccountSv1(dspS.dspS))
dspS.connChan <- dspS.anz.GetInternalCodec(dspS.dspS, utils.DispatcherS)
return