mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Rename dispatcher to dispatchers
This commit is contained in:
committed by
Dan Christian Bogos
parent
7db3a96229
commit
ef1fee9925
@@ -19,18 +19,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/sessions"
|
||||
)
|
||||
|
||||
func NewDispatcherThresholdSv1(dps *dispatcher.DispatcherService) *DispatcherThresholdSv1 {
|
||||
func NewDispatcherThresholdSv1(dps *dispatchers.DispatcherService) *DispatcherThresholdSv1 {
|
||||
return &DispatcherThresholdSv1{dS: dps}
|
||||
}
|
||||
|
||||
// Exports RPC from RLs
|
||||
type DispatcherThresholdSv1 struct {
|
||||
dS *dispatcher.DispatcherService
|
||||
dS *dispatchers.DispatcherService
|
||||
}
|
||||
|
||||
// Ping implements ThresholdSv1Ping
|
||||
@@ -39,24 +39,24 @@ func (dT *DispatcherThresholdSv1) Ping(ign string, reply *string) error {
|
||||
}
|
||||
|
||||
// GetThresholdsForEvent implements ThresholdSv1GetThresholdsForEvent
|
||||
func (dT *DispatcherThresholdSv1) GetThresholdsForEvent(tntID *dispatcher.ArgsProcessEventWithApiKey,
|
||||
func (dT *DispatcherThresholdSv1) GetThresholdsForEvent(tntID *dispatchers.ArgsProcessEventWithApiKey,
|
||||
t *engine.Thresholds) error {
|
||||
return dT.dS.ThresholdSv1GetThresholdsForEvent(tntID, t)
|
||||
}
|
||||
|
||||
// ProcessEvent implements ThresholdSv1ProcessEvent
|
||||
func (dT *DispatcherThresholdSv1) ProcessEvent(args *dispatcher.ArgsProcessEventWithApiKey,
|
||||
func (dT *DispatcherThresholdSv1) ProcessEvent(args *dispatchers.ArgsProcessEventWithApiKey,
|
||||
tIDs *[]string) error {
|
||||
return dT.dS.ThresholdSv1ProcessEvent(args, tIDs)
|
||||
}
|
||||
|
||||
func NewDispatcherStatSv1(dps *dispatcher.DispatcherService) *DispatcherStatSv1 {
|
||||
func NewDispatcherStatSv1(dps *dispatchers.DispatcherService) *DispatcherStatSv1 {
|
||||
return &DispatcherStatSv1{dS: dps}
|
||||
}
|
||||
|
||||
// Exports RPC from RLs
|
||||
type DispatcherStatSv1 struct {
|
||||
dS *dispatcher.DispatcherService
|
||||
dS *dispatchers.DispatcherService
|
||||
}
|
||||
|
||||
// Ping implements StatSv1Ping
|
||||
@@ -65,28 +65,28 @@ func (dSts *DispatcherStatSv1) Ping(ign string, reply *string) error {
|
||||
}
|
||||
|
||||
// GetStatQueuesForEvent implements StatSv1GetStatQueuesForEvent
|
||||
func (dSts *DispatcherStatSv1) GetStatQueuesForEvent(args *dispatcher.ArgsStatProcessEventWithApiKey, reply *[]string) error {
|
||||
func (dSts *DispatcherStatSv1) GetStatQueuesForEvent(args *dispatchers.ArgsStatProcessEventWithApiKey, reply *[]string) error {
|
||||
return dSts.dS.StatSv1GetStatQueuesForEvent(args, reply)
|
||||
}
|
||||
|
||||
// GetQueueStringMetrics implements StatSv1GetQueueStringMetrics
|
||||
func (dSts *DispatcherStatSv1) GetQueueStringMetrics(args *dispatcher.TntIDWithApiKey,
|
||||
func (dSts *DispatcherStatSv1) GetQueueStringMetrics(args *dispatchers.TntIDWithApiKey,
|
||||
reply *map[string]string) error {
|
||||
return dSts.dS.StatSv1GetQueueStringMetrics(args, reply)
|
||||
}
|
||||
|
||||
// GetQueueStringMetrics implements StatSv1ProcessEvent
|
||||
func (dSts *DispatcherStatSv1) ProcessEvent(args *dispatcher.ArgsStatProcessEventWithApiKey, reply *[]string) error {
|
||||
func (dSts *DispatcherStatSv1) ProcessEvent(args *dispatchers.ArgsStatProcessEventWithApiKey, reply *[]string) error {
|
||||
return dSts.dS.StatSv1ProcessEvent(args, reply)
|
||||
}
|
||||
|
||||
func NewDispatcherResourceSv1(dps *dispatcher.DispatcherService) *DispatcherResourceSv1 {
|
||||
func NewDispatcherResourceSv1(dps *dispatchers.DispatcherService) *DispatcherResourceSv1 {
|
||||
return &DispatcherResourceSv1{dRs: dps}
|
||||
}
|
||||
|
||||
// Exports RPC from RLs
|
||||
type DispatcherResourceSv1 struct {
|
||||
dRs *dispatcher.DispatcherService
|
||||
dRs *dispatchers.DispatcherService
|
||||
}
|
||||
|
||||
// Ping implements ResourceSv1Ping
|
||||
@@ -95,18 +95,18 @@ func (dRs *DispatcherResourceSv1) Ping(ign string, reply *string) error {
|
||||
}
|
||||
|
||||
// GetResourcesForEvent implements ResourceSv1GetResourcesForEvent
|
||||
func (dRs *DispatcherResourceSv1) GetResourcesForEvent(args *dispatcher.ArgsV1ResUsageWithApiKey,
|
||||
func (dRs *DispatcherResourceSv1) GetResourcesForEvent(args *dispatchers.ArgsV1ResUsageWithApiKey,
|
||||
reply *engine.Resources) error {
|
||||
return dRs.dRs.ResourceSv1GetResourcesForEvent(args, reply)
|
||||
}
|
||||
|
||||
func NewDispatcherSupplierSv1(dps *dispatcher.DispatcherService) *DispatcherSupplierSv1 {
|
||||
func NewDispatcherSupplierSv1(dps *dispatchers.DispatcherService) *DispatcherSupplierSv1 {
|
||||
return &DispatcherSupplierSv1{dSup: dps}
|
||||
}
|
||||
|
||||
// Exports RPC from RLs
|
||||
type DispatcherSupplierSv1 struct {
|
||||
dSup *dispatcher.DispatcherService
|
||||
dSup *dispatchers.DispatcherService
|
||||
}
|
||||
|
||||
// Ping implements SupplierSv1Ping
|
||||
@@ -115,18 +115,18 @@ func (dSup *DispatcherSupplierSv1) Ping(ign string, reply *string) error {
|
||||
}
|
||||
|
||||
// GetSuppliers implements SupplierSv1GetSuppliers
|
||||
func (dSup *DispatcherSupplierSv1) GetSuppliers(args *dispatcher.ArgsGetSuppliersWithApiKey,
|
||||
func (dSup *DispatcherSupplierSv1) GetSuppliers(args *dispatchers.ArgsGetSuppliersWithApiKey,
|
||||
reply *engine.SortedSuppliers) error {
|
||||
return dSup.dSup.SupplierSv1GetSuppliers(args, reply)
|
||||
}
|
||||
|
||||
func NewDispatcherAttributeSv1(dps *dispatcher.DispatcherService) *DispatcherAttributeSv1 {
|
||||
func NewDispatcherAttributeSv1(dps *dispatchers.DispatcherService) *DispatcherAttributeSv1 {
|
||||
return &DispatcherAttributeSv1{dA: dps}
|
||||
}
|
||||
|
||||
// Exports RPC from RLs
|
||||
type DispatcherAttributeSv1 struct {
|
||||
dA *dispatcher.DispatcherService
|
||||
dA *dispatchers.DispatcherService
|
||||
}
|
||||
|
||||
// Ping implements SupplierSv1Ping
|
||||
@@ -135,24 +135,24 @@ func (dA *DispatcherAttributeSv1) Ping(ign string, reply *string) error {
|
||||
}
|
||||
|
||||
// GetAttributeForEvent implements AttributeSv1GetAttributeForEvent
|
||||
func (dA *DispatcherAttributeSv1) GetAttributeForEvent(args *dispatcher.ArgsAttrProcessEventWithApiKey,
|
||||
func (dA *DispatcherAttributeSv1) GetAttributeForEvent(args *dispatchers.ArgsAttrProcessEventWithApiKey,
|
||||
reply *engine.AttributeProfile) error {
|
||||
return dA.dA.AttributeSv1GetAttributeForEvent(args, reply)
|
||||
}
|
||||
|
||||
// ProcessEvent implements AttributeSv1ProcessEvent
|
||||
func (dA *DispatcherAttributeSv1) ProcessEvent(args *dispatcher.ArgsAttrProcessEventWithApiKey,
|
||||
func (dA *DispatcherAttributeSv1) ProcessEvent(args *dispatchers.ArgsAttrProcessEventWithApiKey,
|
||||
reply *engine.AttrSProcessEventReply) error {
|
||||
return dA.dA.AttributeSv1ProcessEvent(args, reply)
|
||||
}
|
||||
|
||||
func NewDispatcherSessionSv1(dps *dispatcher.DispatcherService) *DispatcherSessionSv1 {
|
||||
func NewDispatcherSessionSv1(dps *dispatchers.DispatcherService) *DispatcherSessionSv1 {
|
||||
return &DispatcherSessionSv1{dS: dps}
|
||||
}
|
||||
|
||||
// Exports RPC from RLs
|
||||
type DispatcherSessionSv1 struct {
|
||||
dS *dispatcher.DispatcherService
|
||||
dS *dispatchers.DispatcherService
|
||||
}
|
||||
|
||||
// Ping implements SessionSv1Ping
|
||||
@@ -161,48 +161,48 @@ func (dS *DispatcherSessionSv1) Ping(ign string, reply *string) error {
|
||||
}
|
||||
|
||||
// AuthorizeEventWithDigest implements SessionSv1AuthorizeEventWithDigest
|
||||
func (dS *DispatcherSessionSv1) AuthorizeEventWithDigest(args *dispatcher.AuthorizeArgsWithApiKey,
|
||||
func (dS *DispatcherSessionSv1) AuthorizeEventWithDigest(args *dispatchers.AuthorizeArgsWithApiKey,
|
||||
reply *sessions.V1AuthorizeReplyWithDigest) error {
|
||||
return dS.dS.SessionSv1AuthorizeEventWithDigest(args, reply)
|
||||
}
|
||||
|
||||
// InitiateSessionWithDigest implements SessionSv1InitiateSessionWithDigest
|
||||
func (dS *DispatcherSessionSv1) InitiateSessionWithDigest(args *dispatcher.InitArgsWithApiKey,
|
||||
func (dS *DispatcherSessionSv1) InitiateSessionWithDigest(args *dispatchers.InitArgsWithApiKey,
|
||||
reply *sessions.V1InitSessionReply) (err error) {
|
||||
return dS.dS.SessionSv1InitiateSessionWithDigest(args, reply)
|
||||
}
|
||||
|
||||
// ProcessCDR implements SessionSv1ProcessCDR
|
||||
func (dS *DispatcherSessionSv1) ProcessCDR(args *dispatcher.CGREvWithApiKey,
|
||||
func (dS *DispatcherSessionSv1) ProcessCDR(args *dispatchers.CGREvWithApiKey,
|
||||
reply *string) (err error) {
|
||||
return dS.dS.SessionSv1ProcessCDR(args, reply)
|
||||
}
|
||||
|
||||
// ProcessEvent implements SessionSv1ProcessEvent
|
||||
func (dS *DispatcherSessionSv1) ProcessEvent(args *dispatcher.ProcessEventWithApiKey,
|
||||
func (dS *DispatcherSessionSv1) ProcessEvent(args *dispatchers.ProcessEventWithApiKey,
|
||||
reply *sessions.V1ProcessEventReply) (err error) {
|
||||
return dS.dS.SessionSv1ProcessEvent(args, reply)
|
||||
}
|
||||
|
||||
// TerminateSession implements SessionSv1TerminateSession
|
||||
func (dS *DispatcherSessionSv1) TerminateSession(args *dispatcher.TerminateSessionWithApiKey,
|
||||
func (dS *DispatcherSessionSv1) TerminateSession(args *dispatchers.TerminateSessionWithApiKey,
|
||||
reply *string) (err error) {
|
||||
return dS.dS.SessionSv1TerminateSession(args, reply)
|
||||
}
|
||||
|
||||
// UpdateSession implements SessionSv1UpdateSession
|
||||
func (dS *DispatcherSessionSv1) UpdateSession(args *dispatcher.UpdateSessionWithApiKey,
|
||||
func (dS *DispatcherSessionSv1) UpdateSession(args *dispatchers.UpdateSessionWithApiKey,
|
||||
reply *sessions.V1UpdateSessionReply) (err error) {
|
||||
return dS.dS.SessionSv1UpdateSession(args, reply)
|
||||
}
|
||||
|
||||
func NewDispatcherChargerSv1(dps *dispatcher.DispatcherService) *DispatcherChargerSv1 {
|
||||
func NewDispatcherChargerSv1(dps *dispatchers.DispatcherService) *DispatcherChargerSv1 {
|
||||
return &DispatcherChargerSv1{dC: dps}
|
||||
}
|
||||
|
||||
// Exports RPC from RLs
|
||||
type DispatcherChargerSv1 struct {
|
||||
dC *dispatcher.DispatcherService
|
||||
dC *dispatchers.DispatcherService
|
||||
}
|
||||
|
||||
// Ping implements ChargerSv1Ping
|
||||
@@ -211,13 +211,13 @@ func (dC *DispatcherChargerSv1) Ping(ign string, reply *string) error {
|
||||
}
|
||||
|
||||
// GetChargersForEvent implements ChargerSv1GetChargersForEvent
|
||||
func (dC *DispatcherChargerSv1) GetChargersForEvent(args *dispatcher.CGREvWithApiKey,
|
||||
func (dC *DispatcherChargerSv1) GetChargersForEvent(args *dispatchers.CGREvWithApiKey,
|
||||
reply *engine.ChargerProfiles) (err error) {
|
||||
return dC.dC.ChargerSv1GetChargersForEvent(args, reply)
|
||||
}
|
||||
|
||||
// ProcessEvent implements ChargerSv1ProcessEvent
|
||||
func (dC *DispatcherChargerSv1) ProcessEvent(args *dispatcher.CGREvWithApiKey,
|
||||
func (dC *DispatcherChargerSv1) ProcessEvent(args *dispatchers.CGREvWithApiKey,
|
||||
reply *[]*engine.AttrSProcessEventReply) (err error) {
|
||||
return dC.dC.ChargerSv1ProcessEvent(args, reply)
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ import (
|
||||
"github.com/cgrates/cgrates/apier/v2"
|
||||
"github.com/cgrates/cgrates/cdrc"
|
||||
"github.com/cgrates/cgrates/config"
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/loaders"
|
||||
"github.com/cgrates/cgrates/scheduler"
|
||||
@@ -1083,7 +1083,7 @@ func startDispatcherService(internalDispatcherSChan, internalRaterChan chan rpcc
|
||||
return
|
||||
}
|
||||
}
|
||||
dspS, err := dispatcher.NewDispatcherService(dm, ralsConns, resSConns,
|
||||
dspS, err := dispatchers.NewDispatcherService(dm, ralsConns, resSConns,
|
||||
threshSConns, statSConns, suplSConns, attrSConns, sessionsSConns, chargerSConns)
|
||||
if err != nil {
|
||||
utils.Logger.Crit(fmt.Sprintf("<%s> Could not init, error: %s", utils.DispatcherS, err.Error()))
|
||||
|
||||
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
package console
|
||||
|
||||
import (
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -28,7 +28,7 @@ func init() {
|
||||
c := &CmdGetAttributeForEvent{
|
||||
name: "attributes_for_event",
|
||||
rpcMethod: utils.AttributeSv1GetAttributeForEvent,
|
||||
rpcParams: &dispatcher.ArgsAttrProcessEventWithApiKey{},
|
||||
rpcParams: &dispatchers.ArgsAttrProcessEventWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -37,7 +37,7 @@ func init() {
|
||||
type CmdGetAttributeForEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.ArgsAttrProcessEventWithApiKey
|
||||
rpcParams *dispatchers.ArgsAttrProcessEventWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ func (self *CmdGetAttributeForEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdGetAttributeForEvent) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.ArgsAttrProcessEventWithApiKey{}
|
||||
self.rpcParams = &dispatchers.ArgsAttrProcessEventWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -30,7 +30,7 @@ func init() {
|
||||
c := &CmdAttributesProcessEvent{
|
||||
name: "attributes_process_event",
|
||||
rpcMethod: utils.AttributeSv1ProcessEvent,
|
||||
rpcParams: &dispatcher.ArgsAttrProcessEventWithApiKey{},
|
||||
rpcParams: &dispatchers.ArgsAttrProcessEventWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +39,7 @@ func init() {
|
||||
type CmdAttributesProcessEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.ArgsAttrProcessEventWithApiKey
|
||||
rpcParams *dispatchers.ArgsAttrProcessEventWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func (self *CmdAttributesProcessEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdAttributesProcessEvent) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.ArgsAttrProcessEventWithApiKey{}
|
||||
self.rpcParams = &dispatchers.ArgsAttrProcessEventWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -30,7 +30,7 @@ func init() {
|
||||
c := &CmdGetResourceForEvent{
|
||||
name: "resources_for_event",
|
||||
rpcMethod: utils.ResourceSv1GetResourcesForEvent,
|
||||
rpcParams: &dispatcher.ArgsV1ResUsageWithApiKey{},
|
||||
rpcParams: &dispatchers.ArgsV1ResUsageWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -40,7 +40,7 @@ func init() {
|
||||
type CmdGetResourceForEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.ArgsV1ResUsageWithApiKey
|
||||
rpcParams *dispatchers.ArgsV1ResUsageWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ func (self *CmdGetResourceForEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdGetResourceForEvent) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.ArgsV1ResUsageWithApiKey{}
|
||||
self.rpcParams = &dispatchers.ArgsV1ResUsageWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/sessions"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -30,7 +30,7 @@ func init() {
|
||||
c := &CmdSessionsAuthorize{
|
||||
name: "session_authorize_event",
|
||||
rpcMethod: utils.SessionSv1AuthorizeEventWithDigest,
|
||||
rpcParams: &dispatcher.AuthorizeArgsWithApiKey{},
|
||||
rpcParams: &dispatchers.AuthorizeArgsWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +39,7 @@ func init() {
|
||||
type CmdSessionsAuthorize struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.AuthorizeArgsWithApiKey
|
||||
rpcParams *dispatchers.AuthorizeArgsWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func (self *CmdSessionsAuthorize) RpcMethod() string {
|
||||
|
||||
func (self *CmdSessionsAuthorize) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.AuthorizeArgsWithApiKey{}
|
||||
self.rpcParams = &dispatchers.AuthorizeArgsWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/sessions"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -30,7 +30,7 @@ func init() {
|
||||
c := &CmdSessionsInitiate{
|
||||
name: "session_initiate",
|
||||
rpcMethod: utils.SessionSv1InitiateSessionWithDigest,
|
||||
rpcParams: &dispatcher.InitArgsWithApiKey{},
|
||||
rpcParams: &dispatchers.InitArgsWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +39,7 @@ func init() {
|
||||
type CmdSessionsInitiate struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.InitArgsWithApiKey
|
||||
rpcParams *dispatchers.InitArgsWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func (self *CmdSessionsInitiate) RpcMethod() string {
|
||||
|
||||
func (self *CmdSessionsInitiate) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.InitArgsWithApiKey{}
|
||||
self.rpcParams = &dispatchers.InitArgsWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -29,7 +29,7 @@ func init() {
|
||||
c := &CmdSessionsProcessCDR{
|
||||
name: "session_process_cdr",
|
||||
rpcMethod: utils.SessionSv1ProcessCDR,
|
||||
rpcParams: &dispatcher.CGREvWithApiKey{},
|
||||
rpcParams: &dispatchers.CGREvWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -38,7 +38,7 @@ func init() {
|
||||
type CmdSessionsProcessCDR struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.CGREvWithApiKey
|
||||
rpcParams *dispatchers.CGREvWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ func (self *CmdSessionsProcessCDR) RpcMethod() string {
|
||||
|
||||
func (self *CmdSessionsProcessCDR) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.CGREvWithApiKey{}
|
||||
self.rpcParams = &dispatchers.CGREvWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/sessions"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -30,7 +30,7 @@ func init() {
|
||||
c := &CmdSessionsProcessEvent{
|
||||
name: "session_process_event",
|
||||
rpcMethod: utils.SessionSv1ProcessEvent,
|
||||
rpcParams: &dispatcher.ProcessEventWithApiKey{},
|
||||
rpcParams: &dispatchers.ProcessEventWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +39,7 @@ func init() {
|
||||
type CmdSessionsProcessEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.ProcessEventWithApiKey
|
||||
rpcParams *dispatchers.ProcessEventWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func (self *CmdSessionsProcessEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdSessionsProcessEvent) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.ProcessEventWithApiKey{}
|
||||
self.rpcParams = &dispatchers.ProcessEventWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -29,7 +29,7 @@ func init() {
|
||||
c := &CmdSessionsTerminate{
|
||||
name: "session_terminate",
|
||||
rpcMethod: utils.SessionSv1TerminateSession,
|
||||
rpcParams: &dispatcher.TerminateSessionWithApiKey{},
|
||||
rpcParams: &dispatchers.TerminateSessionWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -38,7 +38,7 @@ func init() {
|
||||
type CmdSessionsTerminate struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.TerminateSessionWithApiKey
|
||||
rpcParams *dispatchers.TerminateSessionWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ func (self *CmdSessionsTerminate) RpcMethod() string {
|
||||
|
||||
func (self *CmdSessionsTerminate) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.TerminateSessionWithApiKey{}
|
||||
self.rpcParams = &dispatchers.TerminateSessionWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/sessions"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -30,7 +30,7 @@ func init() {
|
||||
c := &CmdSessionsUpdate{
|
||||
name: "session_update",
|
||||
rpcMethod: utils.SessionSv1UpdateSession,
|
||||
rpcParams: &dispatcher.UpdateSessionWithApiKey{},
|
||||
rpcParams: &dispatchers.UpdateSessionWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +39,7 @@ func init() {
|
||||
type CmdSessionsUpdate struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.UpdateSessionWithApiKey
|
||||
rpcParams *dispatchers.UpdateSessionWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func (self *CmdSessionsUpdate) RpcMethod() string {
|
||||
|
||||
func (self *CmdSessionsUpdate) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.UpdateSessionWithApiKey{}
|
||||
self.rpcParams = &dispatchers.UpdateSessionWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -29,7 +29,7 @@ func init() {
|
||||
c := &CmdStatsQueueForEvent{
|
||||
name: "stats_for_event",
|
||||
rpcMethod: utils.StatSv1GetStatQueuesForEvent,
|
||||
rpcParams: &dispatcher.ArgsStatProcessEventWithApiKey{},
|
||||
rpcParams: &dispatchers.ArgsStatProcessEventWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +39,7 @@ func init() {
|
||||
type CmdStatsQueueForEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.ArgsStatProcessEventWithApiKey
|
||||
rpcParams *dispatchers.ArgsStatProcessEventWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func (self *CmdStatsQueueForEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdStatsQueueForEvent) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.ArgsStatProcessEventWithApiKey{}
|
||||
self.rpcParams = &dispatchers.ArgsStatProcessEventWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
package console
|
||||
|
||||
import (
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -27,7 +27,7 @@ func init() {
|
||||
c := &CmdGetStatQueueStringMetrics{
|
||||
name: "stats_metrics",
|
||||
rpcMethod: utils.StatSv1GetQueueStringMetrics,
|
||||
rpcParams: &dispatcher.TntIDWithApiKey{},
|
||||
rpcParams: &dispatchers.TntIDWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -37,7 +37,7 @@ func init() {
|
||||
type CmdGetStatQueueStringMetrics struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.TntIDWithApiKey
|
||||
rpcParams *dispatchers.TntIDWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ func (self *CmdGetStatQueueStringMetrics) RpcMethod() string {
|
||||
|
||||
func (self *CmdGetStatQueueStringMetrics) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.TntIDWithApiKey{}
|
||||
self.rpcParams = &dispatchers.TntIDWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -29,7 +29,7 @@ func init() {
|
||||
c := &CmdStatQueueProcessEvent{
|
||||
name: "stats_process_event",
|
||||
rpcMethod: utils.StatSv1ProcessEvent,
|
||||
rpcParams: &dispatcher.ArgsStatProcessEventWithApiKey{},
|
||||
rpcParams: &dispatchers.ArgsStatProcessEventWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +39,7 @@ func init() {
|
||||
type CmdStatQueueProcessEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.ArgsStatProcessEventWithApiKey
|
||||
rpcParams *dispatchers.ArgsStatProcessEventWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func (self *CmdStatQueueProcessEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdStatQueueProcessEvent) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.ArgsStatProcessEventWithApiKey{}
|
||||
self.rpcParams = &dispatchers.ArgsStatProcessEventWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -30,7 +30,7 @@ func init() {
|
||||
c := &CmdSuppliersSort{
|
||||
name: "suppliers",
|
||||
rpcMethod: utils.SupplierSv1GetSuppliers,
|
||||
rpcParams: &dispatcher.ArgsGetSuppliersWithApiKey{},
|
||||
rpcParams: &dispatchers.ArgsGetSuppliersWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +39,7 @@ func init() {
|
||||
type CmdSuppliersSort struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.ArgsGetSuppliersWithApiKey
|
||||
rpcParams *dispatchers.ArgsGetSuppliersWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func (self *CmdSuppliersSort) RpcMethod() string {
|
||||
|
||||
func (self *CmdSuppliersSort) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.ArgsGetSuppliersWithApiKey{}
|
||||
self.rpcParams = &dispatchers.ArgsGetSuppliersWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
package console
|
||||
|
||||
import (
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -30,7 +30,7 @@ func init() {
|
||||
c := &CmdThresholdsForEvent{
|
||||
name: "thresholds_for_event",
|
||||
rpcMethod: utils.ThresholdSv1GetThresholdsForEvent,
|
||||
rpcParams: &dispatcher.ArgsProcessEventWithApiKey{},
|
||||
rpcParams: &dispatchers.ArgsProcessEventWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +39,7 @@ func init() {
|
||||
type CmdThresholdsForEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.ArgsProcessEventWithApiKey
|
||||
rpcParams *dispatchers.ArgsProcessEventWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func (self *CmdThresholdsForEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdThresholdsForEvent) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.ArgsProcessEventWithApiKey{}
|
||||
self.rpcParams = &dispatchers.ArgsProcessEventWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/dispatcher"
|
||||
"github.com/cgrates/cgrates/dispatchers"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -29,7 +29,7 @@ func init() {
|
||||
c := &CmdThresholdProcessEvent{
|
||||
name: "thresholds_process_event",
|
||||
rpcMethod: utils.ThresholdSv1ProcessEvent,
|
||||
rpcParams: &dispatcher.ArgsProcessEventWithApiKey{},
|
||||
rpcParams: &dispatchers.ArgsProcessEventWithApiKey{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -38,7 +38,7 @@ func init() {
|
||||
type CmdThresholdProcessEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *dispatcher.ArgsProcessEventWithApiKey
|
||||
rpcParams *dispatchers.ArgsProcessEventWithApiKey
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ func (self *CmdThresholdProcessEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdThresholdProcessEvent) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &dispatcher.ArgsProcessEventWithApiKey{}
|
||||
self.rpcParams = &dispatchers.ArgsProcessEventWithApiKey{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"net/rpc"
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"net/rpc"
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"net/rpc"
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"github.com/cgrates/cgrates/sessions"
|
||||
@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"net/rpc"
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"time"
|
||||
@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"net/rpc"
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"net/rpc"
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"net/rpc"
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package dispatcher
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"strings"
|
||||
Reference in New Issue
Block a user