mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Remove cache_age from APIs and toturial
This commit is contained in:
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
Rating system designed to be used in VoIP Carriers World
|
||||
Copyright (C) 2012-2015 ITsysCOM
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
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 console
|
||||
|
||||
import "github.com/cgrates/cgrates/utils"
|
||||
|
||||
func init() {
|
||||
c := &CmdGetCacheAge{
|
||||
name: "cache_age",
|
||||
rpcMethod: "ApierV1.GetCachedItemAge",
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
}
|
||||
|
||||
// Commander implementation
|
||||
type CmdGetCacheAge struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *StringWrapper
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
func (self *CmdGetCacheAge) Name() string {
|
||||
return self.name
|
||||
}
|
||||
|
||||
func (self *CmdGetCacheAge) RpcMethod() string {
|
||||
return self.rpcMethod
|
||||
}
|
||||
|
||||
func (self *CmdGetCacheAge) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &StringWrapper{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
func (self *CmdGetCacheAge) PostprocessRpcParams() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *CmdGetCacheAge) RpcResult() interface{} {
|
||||
return &utils.CachedItemAge{}
|
||||
}
|
||||
@@ -56,16 +56,6 @@ following rules:
|
||||
|
||||
To verify that all actions successfully performed, we use following *cgr-console* commands:
|
||||
|
||||
- Make sure our rates were loaded successfully and they are already in cache:
|
||||
|
||||
::
|
||||
|
||||
cgr-console cache_stats
|
||||
cgr-console 'cache_age 1002'
|
||||
cgr-console 'cache_age RP_RETAIL1'
|
||||
cgr-console 'cache_age *out:cgrates.org:call:*any'
|
||||
cgr-console 'cache_age LOG_WARNING'
|
||||
|
||||
- Make sure all our balances were topped-up:
|
||||
|
||||
::
|
||||
|
||||
@@ -584,23 +584,6 @@ type CacheStats struct {
|
||||
LastLoadTime string
|
||||
}
|
||||
|
||||
type AttrCachedItemAge struct {
|
||||
Category string // Item's category, same name as .csv files without extension
|
||||
ItemId string // Item's identity tag
|
||||
}
|
||||
|
||||
type CachedItemAge struct {
|
||||
Destination time.Duration
|
||||
RatingPlan time.Duration
|
||||
RatingProfile time.Duration
|
||||
Action time.Duration
|
||||
ActionPlan time.Duration
|
||||
SharedGroup time.Duration
|
||||
DerivedChargers time.Duration
|
||||
Alias time.Duration
|
||||
LcrProfiles time.Duration
|
||||
}
|
||||
|
||||
type AttrExpFileCdrs struct {
|
||||
CdrFormat *string // Cdr output file format <CdreCdrFormats>
|
||||
FieldSeparator *string // Separator used between fields
|
||||
|
||||
Reference in New Issue
Block a user