From a2aacd87b21894cc8f5b5234a53b6d41712914c2 Mon Sep 17 00:00:00 2001 From: Ilia Petrov Date: Mon, 6 Jul 2026 10:31:19 +0300 Subject: [PATCH] plugin_proxy: add config map arg to the plugin registration Signed-off-by: Ilia Petrov --- include/fluent-bit/flb_plugin_proxy.h | 11 ++++++----- src/flb_plugin_proxy.c | 3 +++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/fluent-bit/flb_plugin_proxy.h b/include/fluent-bit/flb_plugin_proxy.h index ca224437a11..cbdca58eab5 100644 --- a/include/fluent-bit/flb_plugin_proxy.h +++ b/include/fluent-bit/flb_plugin_proxy.h @@ -35,12 +35,13 @@ struct flb_plugin_proxy_def { /* Fields populated once remote flb_cb_register() is called */ - int type; /* defined by FLB_PROXY_[INPUT|OUTPUT]_PLUGIN */ - int proxy; /* proxy type */ + int type; /* defined by FLB_PROXY_[INPUT|OUTPUT]_PLUGIN */ + int proxy; /* proxy type */ int flags; - char *name; /* plugin short name */ - char *description; /* plugin description */ - int event_type; /* event type (logs/metrics/traces) */ + char *name; /* plugin short name */ + char *description; /* plugin description */ + int event_type; /* event type (logs/metrics/traces) */ + struct flb_config_map *config_map; /* plugin's configuration */ }; /* Proxy context */ diff --git a/src/flb_plugin_proxy.c b/src/flb_plugin_proxy.c index b812f8a370b..831ea0e0766 100644 --- a/src/flb_plugin_proxy.c +++ b/src/flb_plugin_proxy.c @@ -361,6 +361,7 @@ static int flb_proxy_register_output(struct flb_plugin_proxy *proxy, out->proxy = proxy; out->flags = def->flags; out->name = flb_strdup(def->name); + out->config_map = def->config_map; /* If event_type is unset (0) then default to logs (this is the current behavior) */ if (def->event_type == 0) { @@ -404,6 +405,7 @@ static int flb_proxy_register_input(struct flb_plugin_proxy *proxy, in->flags = def->flags | FLB_INPUT_THREADED; in->name = flb_strdup(def->name); in->description = def->description; + in->config_map = def->config_map; mk_list_add(&in->_head, &config->in_plugins); @@ -505,6 +507,7 @@ int flb_plugin_proxy_register(struct flb_plugin_proxy *proxy, * - plugin type (or proxy type, e.g: Golang) * - plugin name * - plugin description + * - plugin's configuration */ /* Do the registration */