dyncfg.h 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. #ifndef NETDATA_DYNCFG_H
  3. #define NETDATA_DYNCFG_H
  4. #include "../common.h"
  5. #include "../../database/rrd.h"
  6. #include "../../database/rrdfunctions.h"
  7. void dyncfg_add_streaming(BUFFER *wb);
  8. bool dyncfg_available_for_rrdhost(RRDHOST *host);
  9. void dyncfg_host_init(RRDHOST *host);
  10. // low-level API used by plugins.d and high-level API
  11. bool dyncfg_add_low_level(RRDHOST *host, const char *id, const char *path, DYNCFG_STATUS status, DYNCFG_TYPE type,
  12. DYNCFG_SOURCE_TYPE source_type, const char *source, DYNCFG_CMDS cmds,
  13. usec_t created_ut, usec_t modified_ut, bool sync,
  14. rrd_function_execute_cb_t execute_cb, void *execute_cb_data);
  15. void dyncfg_del_low_level(RRDHOST *host, const char *id);
  16. void dyncfg_status_low_level(RRDHOST *host, const char *id, DYNCFG_STATUS status);
  17. void dyncfg_init_low_level(bool load_saved);
  18. // high-level API for internal modules
  19. bool dyncfg_add(RRDHOST *host, const char *id, const char *path, DYNCFG_STATUS status, DYNCFG_TYPE type,
  20. DYNCFG_SOURCE_TYPE source_type, const char *source, DYNCFG_CMDS cmds, dyncfg_cb_t cb, void *data);
  21. void dyncfg_del(RRDHOST *host, const char *id);
  22. void dyncfg_status(RRDHOST *host, const char *id, DYNCFG_STATUS status);
  23. void dyncfg_init(bool load_saved);
  24. #endif //NETDATA_DYNCFG_H