write_riemann: move prototype to header file
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 1 Mar 2016 11:09:40 +0000 (12:09 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 1 Mar 2016 11:09:40 +0000 (12:09 +0100)
src/write_riemann.c
src/write_riemann_threshold.c
src/write_riemann_threshold.h [new file with mode: 0644]

index 328341e..58611a9 100644 (file)
  *   Florian octo Forster <octo at collectd.org>
  */
 
-#include "collectd.h"
-#include "plugin.h"
-#include "common.h"
-#include "configfile.h"
-#include "utils_cache.h"
-#include "riemann.pb-c.h"
-
 #include <sys/socket.h>
 #include <arpa/inet.h>
 #include <errno.h>
 #include <inttypes.h>
 #include <pthread.h>
 
+#include "collectd.h"
+#include "plugin.h"
+#include "common.h"
+#include "configfile.h"
+#include "utils_cache.h"
+#include "riemann.pb-c.h"
+#include "write_riemann_threshold.h"
+
 #define RIEMANN_HOST           "localhost"
 #define RIEMANN_PORT           "5555"
 #define RIEMANN_TTL_FACTOR      2.0
 #define RIEMANN_BATCH_MAX      8192
 
-int write_riemann_threshold_check(const data_set_t *, const value_list_t *, int *);
-
 struct riemann_host {
        char                    *name;
        char                    *event_service_prefix;
index 6d5af03..b1f7297 100644 (file)
  *   Andrés J. Díaz <ajdiaz at connectical.com>
  **/
 
+#include <assert.h>
+#include <ltdl.h>
+#include <pthread.h>
+
 #include "collectd.h"
 #include "common.h"
 #include "plugin.h"
 #include "utils_avltree.h"
 #include "utils_cache.h"
 #include "utils_threshold.h"
-
-#include <assert.h>
-#include <ltdl.h>
-#include <pthread.h>
+#include "write_riemann_threshold.h"
 
 /*
  * Threshold management
diff --git a/src/write_riemann_threshold.h b/src/write_riemann_threshold.h
new file mode 100644 (file)
index 0000000..d3b3fe9
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef WRITE_RIEMANN_THRESHOLD_H
+#define WRITE_RIEMANN_THRESHOLD_H
+
+int write_riemann_threshold_check(const data_set_t *, const value_list_t *, int *);
+
+#endif