@@ -43,6 +43,7 @@ struct event_type {
43
43
44
44
int interval_sec ;
45
45
int interval_nsec ;
46
+ struct flb_input_instance * ins ;
46
47
};
47
48
48
49
static struct ctrace_id * create_random_span_id ()
@@ -405,6 +406,7 @@ static int cb_event_type_init(struct flb_input_instance *ins,
405
406
flb_errno ();
406
407
return -1 ;
407
408
}
409
+ ctx -> ins = ins ;
408
410
409
411
ret = flb_input_config_map_set (ins , (void * ) ctx );
410
412
if (ret == -1 ) {
@@ -451,6 +453,20 @@ static int cb_event_type_exit(void *data, struct flb_config *config)
451
453
return 0 ;
452
454
}
453
455
456
+ static void cb_event_type_pause (void * data , struct flb_config * config )
457
+ {
458
+ struct event_type * ctx = data ;
459
+
460
+ flb_input_collector_pause (ctx -> coll_fd , ctx -> ins );
461
+ }
462
+
463
+ static void cb_event_type_resume (void * data , struct flb_config * config )
464
+ {
465
+ struct event_type * ctx = data ;
466
+
467
+ flb_input_collector_resume (ctx -> coll_fd , ctx -> ins );
468
+ }
469
+
454
470
/* Configuration properties map */
455
471
static struct flb_config_map config_map [] = {
456
472
{
@@ -480,8 +496,8 @@ struct flb_input_plugin in_event_type_plugin = {
480
496
.cb_pre_run = NULL ,
481
497
.cb_collect = NULL ,
482
498
.cb_flush_buf = NULL ,
483
- .cb_pause = NULL ,
484
- .cb_resume = NULL ,
499
+ .cb_pause = cb_event_type_pause ,
500
+ .cb_resume = cb_event_type_resume ,
485
501
.cb_exit = cb_event_type_exit ,
486
502
.config_map = config_map ,
487
503
.flags = FLB_INPUT_CORO | FLB_INPUT_THREADED
0 commit comments