aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/tsdb.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/tsdb.h')
-rw-r--r--src/plugins/tsdb.h10
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