Exemplo n.º 1
0
func (self *ApierV1) GetCacheStats(attrs utils.AttrCacheStats, reply *utils.CacheStats) error {
	cs := new(utils.CacheStats)
	cs.Destinations = cache2go.CountEntries(engine.DESTINATION_PREFIX)
	cs.RatingPlans = cache2go.CountEntries(engine.RATING_PLAN_PREFIX)
	cs.RatingProfiles = cache2go.CountEntries(engine.RATING_PROFILE_PREFIX)
	cs.Actions = cache2go.CountEntries(engine.ACTION_PREFIX)
	cs.SharedGroups = cache2go.CountEntries(engine.SHARED_GROUP_PREFIX)
	cs.RatingAliases = cache2go.CountEntries(engine.RP_ALIAS_PREFIX)
	cs.AccountAliases = cache2go.CountEntries(engine.ACC_ALIAS_PREFIX)
	cs.DerivedChargers = cache2go.CountEntries(engine.DERIVEDCHARGERS_PREFIX)
	*reply = *cs
	return nil
}