Kea  1.5.0
Methods are used to handle commands.

The following methods are used to handle commands: More...

Functions

static isc::data::ConstElementPtr isc::stats::StatsMgr::statisticGetAllHandler (const std::string &name, const isc::data::ConstElementPtr &params)
 Handles statistic-get-all command. More...
 
static isc::data::ConstElementPtr isc::stats::StatsMgr::statisticGetHandler (const std::string &name, const isc::data::ConstElementPtr &params)
 Handles statistic-get command. More...
 
static isc::data::ConstElementPtr isc::stats::StatsMgr::statisticRemoveAllHandler (const std::string &name, const isc::data::ConstElementPtr &params)
 Handles statistic-remove-all command. More...
 
static isc::data::ConstElementPtr isc::stats::StatsMgr::statisticRemoveHandler (const std::string &name, const isc::data::ConstElementPtr &params)
 Handles statistic-remove command. More...
 
static isc::data::ConstElementPtr isc::stats::StatsMgr::statisticResetAllHandler (const std::string &name, const isc::data::ConstElementPtr &params)
 Handles statistic-reset-all command. More...
 
static isc::data::ConstElementPtr isc::stats::StatsMgr::statisticResetHandler (const std::string &name, const isc::data::ConstElementPtr &params)
 Handles statistic-reset command. More...
 

Detailed Description

The following methods are used to handle commands:

Function Documentation

◆ statisticGetAllHandler()

isc::data::ConstElementPtr isc::stats::StatsMgr::statisticGetAllHandler ( const std::string &  name,
const isc::data::ConstElementPtr params 
)
static

Handles statistic-get-all command.

This method handles statistic-get-all command, which returns values of all statistics. Params parameter is ignored.

Parameters
namename of the command (ignored, should be "statistic-get-all")
paramsignored
Returns
answer containing values of all statistic

Definition at line 197 of file stats_mgr.cc.

References isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::getAll(), and isc::stats::StatsMgr::instance().

+ Here is the call graph for this function:

◆ statisticGetHandler()

isc::data::ConstElementPtr isc::stats::StatsMgr::statisticGetHandler ( const std::string &  name,
const isc::data::ConstElementPtr params 
)
static

Handles statistic-get command.

This method handles statistic-get command, which returns value of a given statistic). It expects one parameter stored in params map: name: name-of-the-statistic

Example params structure: { "name": "packets-received" }

Parameters
namename of the command (ignored, should be "statistic-get")
paramsstructure containing a map that contains "name"
Returns
answer containing details of specified statistic

Definition at line 144 of file stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::get(), and isc::stats::StatsMgr::instance().

+ Here is the call graph for this function:

◆ statisticRemoveAllHandler()

isc::data::ConstElementPtr isc::stats::StatsMgr::statisticRemoveAllHandler ( const std::string &  name,
const isc::data::ConstElementPtr params 
)
static

Handles statistic-remove-all command.

This method handles statistic-remove-all command, which removes all statistics. Params parameter is ignored.

Parameters
namename of the command (ignored, should be "statistic-remove-all")
paramsignored
Returns
answer confirming success of this operation

Definition at line 189 of file stats_mgr.cc.

References isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::instance(), and isc::stats::StatsMgr::removeAll().

+ Here is the call graph for this function:

◆ statisticRemoveHandler()

isc::data::ConstElementPtr isc::stats::StatsMgr::statisticRemoveHandler ( const std::string &  name,
const isc::data::ConstElementPtr params 
)
static

Handles statistic-remove command.

This method handles statistic-reset command, which removes a given statistic completely. It expects one parameter stored in params map: name: name-of-the-statistic

Example params structure: { "name": "packets-received" }

Parameters
namename of the command (ignored, should be "statistic-remove")
paramsstructure containing a map that contains "name" element
Returns
answer containing confirmation

Definition at line 172 of file stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::del(), and isc::stats::StatsMgr::instance().

+ Here is the call graph for this function:

◆ statisticResetAllHandler()

isc::data::ConstElementPtr isc::stats::StatsMgr::statisticResetAllHandler ( const std::string &  name,
const isc::data::ConstElementPtr params 
)
static

Handles statistic-reset-all command.

This method handles statistic-reset-all command, which sets values of all statistics back to zero. Params parameter is ignored.

Parameters
namename of the command (ignored, should be "statistic-reset-all")
paramsignored
Returns
answer confirming success of this operation

Definition at line 204 of file stats_mgr.cc.

References isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::instance(), and isc::stats::StatsMgr::resetAll().

+ Here is the call graph for this function:

◆ statisticResetHandler()

isc::data::ConstElementPtr isc::stats::StatsMgr::statisticResetHandler ( const std::string &  name,
const isc::data::ConstElementPtr params 
)
static

Handles statistic-reset command.

This method handles statistic-reset command, which resets value of a given statistic. It expects one parameter stored in params map: name: name-of-the-statistic

Example params structure: { "name": "packets-received" }

Parameters
namename of the command (ignored, should be "statistic-reset")
paramsstructure containing a map that contains "name"
Returns
answer containing confirmation

Definition at line 155 of file stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::instance(), and isc::stats::StatsMgr::reset().

+ Here is the call graph for this function: