From 8ea8739e109eafc3dad8d96b42479f9b7a59d33b Mon Sep 17 00:00:00 2001 From: DanB Date: Wed, 30 Jan 2019 13:54:15 +0100 Subject: [PATCH] DispatcherProfile updated to contain DispatcherConn --- dispatchers/libdispatcher.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dispatchers/libdispatcher.go b/dispatchers/libdispatcher.go index 3918a2682..b508764c4 100644 --- a/dispatchers/libdispatcher.go +++ b/dispatchers/libdispatcher.go @@ -24,17 +24,25 @@ import ( "github.com/cgrates/cgrates/utils" ) +type DispatcherConn struct { + ID string + FilterIDs []string + Weight float64 // applied in case of multiple connections need to be ordered + Params map[string]interface{} // additional parameters stored for a session + Blocker bool // no connection after this one +} + // DispatcherProfile is the config for one Dispatcher type DispatcherProfile struct { Tenant string ID string Subsystems []string FilterIDs []string - ActivationInterval *utils.ActivationInterval // Activation interval + ActivationInterval *utils.ActivationInterval // activation interval Strategy string StrategyParams map[string]interface{} // ie for distribution, set here the pool weights - ConnIDs []string // dispatch to these connections - Weight float64 + Weight float64 // used for profile sorting on match + Connections []*DispatcherConn // dispatch to these connections } func (dP *DispatcherProfile) TenantID() string {