mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-23 08:08:45 +05:00
more commands and help
This commit is contained in:
58
console/get_cache_stats.go
Normal file
58
console/get_cache_stats.go
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
Rating system designed to be used in VoIP Carriers World
|
||||
Copyright (C) 2013 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 := &CmdGetCacheStats{
|
||||
name: "get_cache_stats",
|
||||
rpcMethod: "ApierV1.GetCachedStats",
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
}
|
||||
|
||||
// Commander implementation
|
||||
type CmdGetCacheStats struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *utils.AttrCacheStats
|
||||
rpcResult utils.CacheStats
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
func (self *CmdGetCacheStats) Name() string {
|
||||
return self.name
|
||||
}
|
||||
|
||||
func (self *CmdGetCacheStats) RpcMethod() string {
|
||||
return self.rpcMethod
|
||||
}
|
||||
|
||||
func (self *CmdGetCacheStats) RpcParams() interface{} {
|
||||
if self.rpcParams == nil {
|
||||
self.rpcParams = &utils.AttrCacheStats{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
func (self *CmdGetCacheStats) RpcResult() interface{} {
|
||||
return &self.rpcResult
|
||||
}
|
||||
Reference in New Issue
Block a user