rrdfunctions.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef NETDATA_RRDFUNCTIONS_H
  2. #define NETDATA_RRDFUNCTIONS_H 1
  3. #include "rrd.h"
  4. void rrdfunctions_init(RRDHOST *host);
  5. void rrdfunctions_destroy(RRDHOST *host);
  6. void rrd_collector_started(void);
  7. void rrd_collector_finished(void);
  8. typedef void (*function_data_ready_callback)(BUFFER *wb, int code, void *callback_data);
  9. typedef int (*function_execute_at_collector)(BUFFER *wb, int timeout, const char *function, void *collector_data,
  10. function_data_ready_callback callback, void *callback_data);
  11. void rrd_collector_add_function(RRDHOST *host, RRDSET *st, const char *name, int timeout, const char *help,
  12. bool sync, function_execute_at_collector function, void *collector_data);
  13. int rrd_call_function_and_wait(RRDHOST *host, BUFFER *wb, int timeout, const char *name);
  14. typedef void (*rrd_call_function_async_callback)(BUFFER *wb, int code, void *callback_data);
  15. int rrd_call_function_async(RRDHOST *host, BUFFER *wb, int timeout, const char *name, rrd_call_function_async_callback, void *callback_data);
  16. void rrd_functions_expose_rrdpush(RRDSET *st, BUFFER *wb);
  17. void rrd_functions_expose_global_rrdpush(RRDHOST *host, BUFFER *wb);
  18. void chart_functions2json(RRDSET *st, BUFFER *wb, int tabs, const char *kq, const char *sq);
  19. void chart_functions_to_dict(DICTIONARY *rrdset_functions_view, DICTIONARY *dst, void *value, size_t value_size);
  20. void host_functions_to_dict(RRDHOST *host, DICTIONARY *dst, void *value, size_t value_size, STRING **help);
  21. void host_functions2json(RRDHOST *host, BUFFER *wb);
  22. uint8_t functions_format_to_content_type(const char *format);
  23. const char *functions_content_type_to_format(HTTP_CONTENT_TYPE content_type);
  24. int rrd_call_function_error(BUFFER *wb, const char *msg, int code);
  25. int rrdhost_function_streaming(BUFFER *wb, int timeout, const char *function, void *collector_data,
  26. function_data_ready_callback callback, void *callback_data);
  27. #define RRDFUNCTIONS_STREAMING_HELP "Streaming status for parents and children."
  28. #endif // NETDATA_RRDFUNCTIONS_H