File tree Expand file tree Collapse file tree 3 files changed +476
-4
lines changed Expand file tree Collapse file tree 3 files changed +476
-4
lines changed Original file line number Diff line number Diff line change @@ -645,7 +645,7 @@ static int cb_es_init(struct flb_output_instance *ins,
645645 return 0 ;
646646}
647647
648- static struct flb_elasticsearch_config * flb_elasticsearch_target (
648+ struct flb_elasticsearch_config * flb_elasticsearch_target (
649649 struct flb_elasticsearch * ctx , struct flb_upstream_node * * node )
650650{
651651 struct flb_elasticsearch_config * ec ;
Original file line number Diff line number Diff line change 2222
2323#include <monkey/mk_core/mk_list.h>
2424#include <fluent-bit/flb_sds.h>
25+ #include <fluent-bit/flb_upstream_node.h>
2526
2627#define FLB_ES_DEFAULT_HOST "127.0.0.1"
2728#define FLB_ES_DEFAULT_PORT 9200
@@ -174,4 +175,20 @@ struct flb_elasticsearch {
174175 struct flb_output_instance * ins ;
175176};
176177
178+ /**
179+ * Get plugin configuration.
180+ * In HA mode, the selected upstream node is also output.
181+ * In HA mode, the returned plugin configuration matches the output upstream node.
182+ *
183+ * @param ctx Non-NULL plugin context.
184+ * @param node Non-NULL output parameter for selected upstream node.
185+ * `*node` is set to NULL if not in HA mode or
186+ * there is no upstream node.
187+ *
188+ * @return Configuration of plugin or NULL if error happened or
189+ * there is no upstream node (in HA mode).
190+ */
191+ struct flb_elasticsearch_config * flb_elasticsearch_target (
192+ struct flb_elasticsearch * ctx , struct flb_upstream_node * * node );
193+
177194#endif
You can’t perform that action at this time.
0 commit comments