MCPcopy Create free account
hub / github.com/apache/trafficserver / TSMgmtIntGet

Function TSMgmtIntGet

src/api/InkAPI.cc:3245–3262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3243}
3244
3245TSReturnCode
3246TSMgmtIntGet(const char *var_name, TSMgmtInt *result)
3247{
3248 auto res = RecGetRecordInt(const_cast<char *>(var_name), static_cast<RecInt *>(result));
3249
3250 // Try the old librecords first
3251 if (res == REC_ERR_FAIL) {
3252 int id = global_api_metrics.lookup(var_name);
3253
3254 if (id == ts::Metrics::NOT_FOUND) {
3255 return TS_ERROR;
3256 } else {
3257 *result = global_api_metrics[id].load();
3258 }
3259 }
3260
3261 return TS_SUCCESS;
3262}
3263
3264TSReturnCode
3265TSMgmtCounterGet(const char *var_name, TSMgmtCounter *result)

Callers 5

ts_lua_script_registeredFunction · 0.85
ts_lua_script_registerFunction · 0.85
ts_lua_mgmt_get_intFunction · 0.85
create_lua_vmsFunction · 0.85

Calls 3

RecGetRecordIntFunction · 0.85
lookupMethod · 0.45
loadMethod · 0.45

Tested by 1