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

Function ts_lua_mgmt_get_counter

plugins/lua/ts_lua_mgmt.cc:67–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67static int
68ts_lua_mgmt_get_counter(lua_State *L)
69{
70 const char *name;
71 size_t name_len;
72 TSMgmtCounter counter_val;
73
74 name = luaL_checklstring(L, 1, &name_len);
75 if (TS_SUCCESS == TSMgmtCounterGet(name, &counter_val)) {
76 lua_pushinteger(L, counter_val);
77 return 1;
78 }
79
80 return 0;
81}
82
83static int
84ts_lua_mgmt_get_float(lua_State *L)

Callers

nothing calls this directly

Calls 1

TSMgmtCounterGetFunction · 0.85

Tested by

no test coverage detected