9 #ifndef INCLUDE_FUNAPI_MANAGEMENT_COUNTER_H_ 10 #define INCLUDE_FUNAPI_MANAGEMENT_COUNTER_H_ 12 #include <boost/asio/ip/address.hpp> 20 typedef boost::function<
21 http::StatusCode(
const string &,
const string &, Json *)> CounterCallback;
25 void UpdateCounter(
const string &counter_type,
26 const string &counter_path,
27 const int32_t &value);
31 void UpdateCounter(
const string &counter_type,
32 const string &counter_path,
33 const int64_t &value);
37 void UpdateCounter(
const string &counter_type,
38 const string &counter_path,
43 void UpdateCounter(
const string &counter_type,
44 const string &counter_path,
49 void UpdateCounter(
const string &counter_type,
50 const string &counter_path,
51 const string &description,
52 const int32_t &value);
56 void UpdateCounter(
const string &counter_type,
57 const string &counter_path,
58 const string &description,
59 const int64_t &value);
63 void UpdateCounter(
const string &counter_type,
64 const string &counter_path,
65 const string &description,
70 void UpdateCounter(
const string &counter_type,
71 const string &counter_path,
72 const string &description,
77 void IncreaseCounterBy(
const string &counter_type,
78 const string &counter_path,
79 const int32_t &value);
83 void DecreaseCounterBy(
const string &counter_type,
84 const string &counter_path,
85 const int32_t &value);
89 void IncreaseCounterBy(
const string &counter_type,
90 const string &counter_path,
91 const int64_t &value);
95 void DecreaseCounterBy(
const string &counter_type,
96 const string &counter_path,
97 const int64_t &value);
100 FUNAPI_DLL_VISIBILITY
101 void IncreaseCounterBy(
const string &counter_type,
102 const string &counter_path,
103 const double &value);
106 FUNAPI_DLL_VISIBILITY
107 void DecreaseCounterBy(
const string &counter_type,
108 const string &counter_path,
109 const double &value);
112 FUNAPI_DLL_VISIBILITY
113 int64_t ReadCounterAsInteger(
const string &counter_type,
114 const string &counter_path);
117 FUNAPI_DLL_VISIBILITY
118 double ReadCounterAsDouble(
const string &counter_type,
119 const string &counter_path);
122 FUNAPI_DLL_VISIBILITY
123 string ReadCounterAsString(
const string &counter_type,
124 const string &counter_path);
127 FUNAPI_DLL_VISIBILITY Json ReadAllCounters();
130 FUNAPI_DLL_VISIBILITY
131 void RegisterCallableCounter(
const string &counter_type,
132 const string &counter_path,
134 const CounterCallback &value_cb);
137 FUNAPI_DLL_VISIBILITY
138 void MonitorCounter(
const string &counter_type,
139 const string &counter_path,
144 #endif // INCLUDE_FUNAPI_MANAGEMENT_COUNTER_H_