Teonet library  0.4.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
metric.h
Go to the documentation of this file.
1 #ifndef METRIC_H
2 #define METRIC_H
3 
4 #include <netinet/in.h>
5 
6 typedef struct teoMetricClass {
7  void *ke;
8  struct sockaddr_in to;
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
17 
18 // Send counter metric
19 void teoMetricCounter(teoMetricClass *tm, const char *name, int value);
20 void teoMetricCounterf(teoMetricClass *tm, const char *name, double value);
21 
22 // Send time(ms) metric
23 void teoMetricMs(teoMetricClass *tm, const char *name, double value);
24 
25 // Send gauge metric
26 void teoMetricGauge(teoMetricClass *tm, const char *name, int value);
27 void teoMetricGaugef(teoMetricClass *tm, const char *name, double value);
28 
29 #ifdef __cplusplus
30 }
31 #endif
32 
33 #endif /* METRIC_H */
void * ke
Definition: metric.h:7
void teoMetricDestroy(teoMetricClass *tm)
Destroy Metrics module.
Definition: metric.c:50
Definition: metric.h:6
void teoMetricGauge(teoMetricClass *tm, const char *name, int value)
Send gauge teonet metrics.
Definition: metric.c:144
#define ke
void teoMetricMs(teoMetricClass *tm, const char *name, double value)
Send time(ms) teonet metric.
Definition: metric.c:132
void teoMetricCounter(teoMetricClass *tm, const char *name, int value)
Send counter teonet metric.
Definition: metric.c:108
struct sockaddr_in to
Definition: metric.h:8
void teoMetricCounterf(teoMetricClass *tm, const char *name, double value)
Send counter teonet metric.
Definition: metric.c:120
teoMetricClass * teoMetricInit(void *ke)
Initialize Metrics module.
Definition: metric.c:23
void teoMetricGaugef(teoMetricClass *tm, const char *name, double value)
Send gauge teonet metrics.
Definition: metric.c:156
struct teoMetricClass teoMetricClass