rrdfunctions.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  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 chart_functions2json(RRDSET *st, BUFFER *wb, int tabs, const char *kq, const char *sq);
  18. void chart_functions_to_dict(DICTIONARY *rrdset_functions_view, DICTIONARY *dst);
  19. void host_functions2json(RRDHOST *host, BUFFER *wb, int tabs, const char *kq, const char *sq);
  20. uint8_t functions_format_to_content_type(const char *format);
  21. const char *functions_content_type_to_format(uint8_t content_type);
  22. int rrd_call_function_error(BUFFER *wb, const char *msg, int code);
  23. #endif // NETDATA_RRDFUNCTIONS_H