Skip to content

Commit

Permalink
downstream: expose net.keepalive config flag
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Jul 3, 2024
1 parent b6c9c21 commit 3914200
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/fluent-bit/flb_downstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ struct flb_downstream {

struct mk_list busy_queue;
struct mk_list destroy_queue;

/* this is a config map reference coming from the plugin net_setup field */
struct flb_net_setup *net_setup;
};

static inline int flb_downstream_is_shutting_down(struct flb_downstream *downstream)
Expand Down
9 changes: 9 additions & 0 deletions src/flb_downstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ struct flb_config_map downstream_net[] = {
"disabled, the timeout is logged as a debug message"
},

{
FLB_CONFIG_MAP_BOOL, "net.keepalive", "true",
0, FLB_TRUE, offsetof(struct flb_net_setup, keepalive),
"Enable or disable Keepalive support"
},

/* EOF */
{0}
};
Expand Down Expand Up @@ -107,6 +113,9 @@ int flb_downstream_setup(struct flb_downstream *stream,
return -1;
}

/* map the net_setup config map coming from the caller */
stream->net_setup = net_setup;

mk_list_init(&stream->busy_queue);
mk_list_init(&stream->destroy_queue);

Expand Down

0 comments on commit 3914200

Please sign in to comment.