flb_plugin.h 985 B

1234567891011121314151617181920212223242526272829303132333435
  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. /** @file flb_plugin.h
  3. * @brief Header of flb_plugin.c
  4. */
  5. #ifndef FLB_PLUGIN_H_
  6. #define FLB_PLUGIN_H_
  7. #include "file_info.h"
  8. #include <uv.h>
  9. #define LOG_PATH_AUTO "auto"
  10. #define KMSG_DEFAULT_PATH "/dev/kmsg"
  11. #define SYSTEMD_DEFAULT_PATH "SD_JOURNAL_LOCAL_ONLY"
  12. #define DOCKER_EV_DEFAULT_PATH "/var/run/docker.sock"
  13. typedef struct {
  14. char *flush,
  15. *http_listen, *http_port, *http_server,
  16. *log_path, *log_level,
  17. *coro_stack_size;
  18. } flb_srvc_config_t ;
  19. int flb_init(flb_srvc_config_t flb_srvc_config,
  20. const char *const stock_config_dir,
  21. const char *const new_sd_journal_field_prefix);
  22. int flb_run(void);
  23. void flb_terminate(void);
  24. void flb_complete_item_timer_timeout_cb(uv_timer_t *handle);
  25. int flb_add_input(struct File_info *const p_file_info);
  26. int flb_add_fwd_input(Flb_socket_config_t *const forward_in_config);
  27. void flb_free_fwd_input_out_cb(void);
  28. #endif // FLB_PLUGIN_H_