mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Updated DispatcherS with gob encoding
This commit is contained in:
committed by
Dan Christian Bogos
parent
a7eb087660
commit
b86fcd8c0d
@@ -139,18 +139,30 @@ type SQItem struct {
|
||||
|
||||
// StatQueue represents an individual stats instance
|
||||
type StatQueue struct {
|
||||
sync.RWMutex // protect the elements from within
|
||||
Tenant string
|
||||
ID string
|
||||
SQItems []SQItem
|
||||
SQMetrics map[string]StatMetric
|
||||
MinItems int
|
||||
sqPrfl *StatQueueProfile
|
||||
dirty *bool // needs save
|
||||
ttl *time.Duration // timeToLeave, picked on each init
|
||||
lk sync.RWMutex // protect the elements from within
|
||||
Tenant string
|
||||
ID string
|
||||
SQItems []SQItem
|
||||
SQMetrics map[string]StatMetric
|
||||
MinItems int
|
||||
sqPrfl *StatQueueProfile
|
||||
dirty *bool // needs save
|
||||
ttl *time.Duration // timeToLeave, picked on each init
|
||||
}
|
||||
|
||||
// SqID will compose the unique identifier for the StatQueue out of Tenant and ID
|
||||
// RLock only to implement sync.RWMutex methods
|
||||
func (sq *StatQueue) RLock() { sq.lk.RLock() }
|
||||
|
||||
// RUnlock only to implement sync.RWMutex methods
|
||||
func (sq *StatQueue) RUnlock() { sq.lk.RUnlock() }
|
||||
|
||||
// Lock only to implement sync.RWMutex methods
|
||||
func (sq *StatQueue) Lock() { sq.lk.Lock() }
|
||||
|
||||
// Unlock only to implement sync.RWMutex methods
|
||||
func (sq *StatQueue) Unlock() { sq.lk.Unlock() }
|
||||
|
||||
// TenantID will compose the unique identifier for the StatQueue out of Tenant and ID
|
||||
func (sq *StatQueue) TenantID() string {
|
||||
return utils.ConcatenatedKey(sq.Tenant, sq.ID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user