| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | |
| 3 | #ifndef NETDATA_EXPORTING_PROMETHEUS_REMOTE_WRITE_H |
| 4 | #define NETDATA_EXPORTING_PROMETHEUS_REMOTE_WRITE_H |
| 5 | |
| 6 | #include "exporting/exporting_engine.h" |
| 7 | #include "exporting/prometheus/prometheus.h" |
| 8 | #include "remote_write_request.h" |
| 9 | |
| 10 | struct prometheus_remote_write_specific_data { |
| 11 | void *write_request; |
| 12 | }; |
| 13 | |
| 14 | struct prometheus_remote_write_variables_callback_options { |
| 15 | RRDHOST *host; |
| 16 | time_t now; |
| 17 | struct instance *instance; |
| 18 | }; |
| 19 | |
| 20 | int init_prometheus_remote_write_instance(struct instance *instance); |
| 21 | void clean_prometheus_remote_write(struct instance *instance); |
| 22 | |
| 23 | int format_host_prometheus_remote_write(struct instance *instance, RRDHOST *host); |
| 24 | int format_chart_prometheus_remote_write(struct instance *instance, RRDSET *st); |
| 25 | int format_dimension_prometheus_remote_write(struct instance *instance, RRDDIM *rd); |
| 26 | int format_variables_prometheus_remote_write(struct instance *instance, RRDHOST *host); |
| 27 | int format_batch_prometheus_remote_write(struct instance *instance); |
| 28 | |
| 29 | void prometheus_remote_write_prepare_header(struct instance *instance); |
| 30 | int process_prometheus_remote_write_response(BUFFER *buffer, struct instance *instance); |
| 31 | |
| 32 | #endif //NETDATA_EXPORTING_PROMETHEUS_REMOTE_WRITE_H |