#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/uio.h>
#include <netdb.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <curl/curl.h>
Go to the source code of this file.
|
int | format_line (char **buf, int *len, size_t used,...) |
|
int | post_http (influx_client_t *c,...) |
|
int | send_udp (influx_client_t *c,...) |
|
int | post_curl (influx_v2_client_t *c,...) |
|
int | _escaped_append (char **dest, size_t *len, size_t *used, const char *src, const char *escape_seq) |
|
int | _begin_line (char **buf) |
|
int | _format_line (char **buf, va_list ap) |
|
int | _format_line2 (char **buf, va_list ap, size_t *, size_t) |
|
int | post_http_send_line (influx_client_t *c, char *buf, int len) |
|
int | send_udp_line (influx_client_t *c, char *line, int len) |
|
◆ _APPEND
#define _APPEND |
( |
| fmter... | ) |
|
Value: for (;;) { \
if ((written = snprintf(*buf + used, len - used, ##fmter)) < 0) \
goto FAIL; \
if (used + written >= len && !(*buf = (char*)realloc(*buf, len *= 2))) \
return -1; \
else { \
used += written; \
break; \
} \
}
◆ _GET_NEXT_CHAR
#define _GET_NEXT_CHAR |
( |
| ) |
|
Value: (ch = (len >= (int)iv[0].iov_len && \
(iv[0].iov_len = recv(sock, iv[0].iov_base, iv[0].iov_len, len = 0)) == (size_t)(-1) \
? 0 \
: *((char*)iv[0].iov_base + len++)))
◆ _GET_NUMBER
Value:_LOOP_NEXT(
if (ch >=
'0' && ch <=
'9') n = n * 10 + (ch -
'0');
else break;)
#define _LOOP_NEXT(statement)
◆ _LOOP_NEXT
#define _LOOP_NEXT |
( |
| statement | ) |
|
Value: for (;;) { \
ret_code = -8; \
goto END; \
} \
statement \
}
◆ _UNTIL
◆ IF_TYPE_ARG_END
#define IF_TYPE_ARG_END 0 |
◆ IF_TYPE_FIELD_BOOLEAN
#define IF_TYPE_FIELD_BOOLEAN 6 |
◆ IF_TYPE_FIELD_FLOAT
#define IF_TYPE_FIELD_FLOAT 4 |
◆ IF_TYPE_FIELD_INTEGER
#define IF_TYPE_FIELD_INTEGER 5 |
◆ IF_TYPE_FIELD_STRING
#define IF_TYPE_FIELD_STRING 3 |
◆ IF_TYPE_MEAS
◆ IF_TYPE_TAG
◆ IF_TYPE_TIMESTAMP
#define IF_TYPE_TIMESTAMP 7 |
◆ INFLUX_END
◆ INFLUX_F_BOL
#define INFLUX_F_BOL |
( |
| k, |
|
|
| v ) |
Value:
#define IF_TYPE_FIELD_BOOLEAN
Definition influxdb.h:71
◆ INFLUX_F_FLT
#define INFLUX_F_FLT |
( |
| k, |
|
|
| v, |
|
|
| p ) |
Value:
#define IF_TYPE_FIELD_FLOAT
Definition influxdb.h:69
◆ INFLUX_F_INT
#define INFLUX_F_INT |
( |
| k, |
|
|
| v ) |
Value:
#define IF_TYPE_FIELD_INTEGER
Definition influxdb.h:70
◆ INFLUX_F_STR
#define INFLUX_F_STR |
( |
| k, |
|
|
| v ) |
Value:
#define IF_TYPE_FIELD_STRING
Definition influxdb.h:68
◆ INFLUX_MEAS
Value:
#define IF_TYPE_MEAS
Definition influxdb.h:66
◆ INFLUX_TAG
#define INFLUX_TAG |
( |
| k, |
|
|
| v ) |
Value:
#define IF_TYPE_TAG
Definition influxdb.h:67
◆ INFLUX_TS
Value:
#define IF_TYPE_TIMESTAMP
Definition influxdb.h:72
◆ influx_client_t
◆ influx_v2_client_t
◆ _begin_line()
int _begin_line |
( |
char ** | buf | ) |
|
◆ _escaped_append()
int _escaped_append |
( |
char ** | dest, |
|
|
size_t * | len, |
|
|
size_t * | used, |
|
|
const char * | src, |
|
|
const char * | escape_seq ) |
◆ _format_line()
int _format_line |
( |
char ** | buf, |
|
|
va_list | ap ) |
◆ _format_line2()
int _format_line2 |
( |
char ** | buf, |
|
|
va_list | ap, |
|
|
size_t * | _len, |
|
|
size_t | used ) |
◆ format_line()
int format_line |
( |
char ** | buf, |
|
|
int * | len, |
|
|
size_t | used, |
|
|
| ... ) |
◆ post_curl()
◆ post_http()
◆ post_http_send_line()
◆ send_udp()
◆ send_udp_line()