diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-04-14 01:57:17 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2018-07-10 23:41:14 +0200 |
commit | 5d50f0426699a06b5720e10f1feaef35c8b59f57 (patch) | |
tree | 34641293f0eef907c89ffa1cb6d6b80b863106fc /src/plugins/tsdb.h | |
parent | be6447ca2038c84d2e946e27b897815e95c48e34 (diff) |
Improve writer/reader processing
- Handle indefinite number and kind of tags and fields for a metric
- Include only once header files
- Cleaning and ordering code
Change-Id: I14a4f0e6e1626971bff73ce7d9ac067bda69cfc4
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/plugins/tsdb.h')
-rw-r--r-- | src/plugins/tsdb.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/tsdb.h b/src/plugins/tsdb.h index 5c0245c..437c5dc 100644 --- a/src/plugins/tsdb.h +++ b/src/plugins/tsdb.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015, 2016, 2017, 2018 "IoT.bzh" + * Copyright (C) 2018 "IoT.bzh" * Author "Romain Forlot" <romain.forlot@iot.bzh> * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,12 +15,17 @@ * limitations under the License. */ +#ifndef _TSDB_H +#define _TSDB_H + #define AFB_BINDING_VERSION 2 #include <afb/afb-binding.h> #include <json-c/json.h> #include "curl-wrap.h" +#define ERROR -1 + #define DEFAULT_DB "agl-garner" #define DEFAULT_DBHOST "localhost" #define DEFAULT_DBPORT "8086" @@ -35,6 +40,7 @@ enum db_available { struct reader_args { const char *host; const char *port; + u_int32_t delay; }; CURL *influxdb_write(const char* host, const char *port, json_object *metric); @@ -45,3 +51,5 @@ int influxdb_reader(void *args); int db_ping(); u_int64_t get_ts(); + +#endif |