File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131
3232#include <monkey/mk_core.h>
3333
34+ struct flb_router ;
35+
3436#define FLB_CONFIG_FLUSH_SECS 1
3537#define FLB_CONFIG_HTTP_LISTEN "0.0.0.0"
3638#define FLB_CONFIG_HTTP_PORT "2020"
@@ -293,9 +295,7 @@ struct flb_config {
293295 int hot_reload_watchdog_timeout_seconds ;
294296
295297 /* Routing */
296- size_t route_mask_size ;
297- size_t route_mask_slots ;
298- uint64_t * route_empty_mask ;
298+ struct flb_router * router ;
299299#ifdef FLB_SYSTEM_WINDOWS
300300 /* maxstdio (Windows) */
301301 int win_maxstdio ;
Original file line number Diff line number Diff line change @@ -304,7 +304,14 @@ struct flb_config *flb_config_init()
304304 }
305305
306306 /* Routing */
307- flb_routes_mask_set_size (1 , config );
307+ config -> router = flb_router_create (config );
308+ if (!config -> router ) {
309+ flb_error ("[config] could not create router" );
310+ flb_cf_destroy (cf );
311+ flb_free (config );
312+ return NULL ;
313+ }
314+ flb_routes_mask_set_size (1 , config -> router );
308315
309316 config -> cio = NULL ;
310317 config -> storage_path = NULL ;
@@ -613,7 +620,8 @@ void flb_config_exit(struct flb_config *config)
613620
614621 /* release task map */
615622 flb_config_task_map_resize (config , 0 );
616- flb_routes_empty_mask_destroy (config );
623+
624+ flb_router_destroy (config -> router );
617625
618626 /* Clean up router input routes */
619627 flb_router_routes_destroy (& config -> input_routes );
You can’t perform that action at this time.
0 commit comments