Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

es_out: support Upstream Servers with configuration overriding #7608

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
11 changes: 11 additions & 0 deletions include/fluent-bit/flb_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <fluent-bit/flb_macros.h>
#include <fluent-bit/flb_config.h>
#include <fluent-bit/flb_input.h>

/* Lib engine status */
#define FLB_LIB_ERROR -1
Expand Down Expand Up @@ -66,6 +67,16 @@ FLB_EXPORT int flb_output_set_test(flb_ctx_t *ctx, int ffd, char *test_name,
void *, size_t, void *),
void *out_callback_data,
void *test_ctx);
FLB_EXPORT int flb_output_set_test_with_ctx_callback(
flb_ctx_t *ctx, int ffd, char *test_name,
void (*out_callback) (void *, int, int,
void *, size_t, void *),
void *out_callback_data,
void *test_ctx,
void *(*test_ctx_callback) (
struct flb_config *,
struct flb_input_instance *,
void *, void *));
FLB_EXPORT int flb_output_set_callback(flb_ctx_t *ctx, int ffd, char *name,
void (*cb)(char *, void *, void *));

Expand Down
17 changes: 16 additions & 1 deletion include/fluent-bit/flb_output.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,24 @@ struct flb_test_out_formatter {
*/
void *rt_data;

/* optional context for flush callback */
/* optional context for "flush context callback" */
void *flush_ctx;

/*
* Callback
* =========
* Optional "flush context callback": it references the function that extracts
* optional flush context for "formatter callback".
*/
void *(*flush_ctx_callback) (/* Fluent Bit context */
struct flb_config *,
/* plugin that ingested the records */
struct flb_input_instance *,
/* plugin instance context */
void *plugin_context,
/* context for "flush context callback" */
void *flush_ctx);

/*
* Callback
* =========
Expand Down
1 change: 1 addition & 0 deletions plugins/out_es/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
set(src
es_bulk.c
es_conf_parse.c
es_conf.c
es.c
murmur3.c)
Expand Down
Loading