@@ -262,7 +262,7 @@ impl Dispatcher {
262
262
}
263
263
}
264
264
265
- fn on_new_connection ( & self , context_id : u32 ) -> Action {
265
+ fn on_new_connection ( & self , context_id : u32 ) -> FilterStatus {
266
266
if let Some ( stream) = self . streams . borrow_mut ( ) . get_mut ( & context_id) {
267
267
self . active_id . set ( context_id) ;
268
268
stream. on_new_connection ( )
@@ -271,7 +271,7 @@ impl Dispatcher {
271
271
}
272
272
}
273
273
274
- fn on_downstream_data ( & self , context_id : u32 , data_size : usize , end_of_stream : bool ) -> Action {
274
+ fn on_downstream_data ( & self , context_id : u32 , data_size : usize , end_of_stream : bool ) -> FilterStatus {
275
275
if let Some ( stream) = self . streams . borrow_mut ( ) . get_mut ( & context_id) {
276
276
self . active_id . set ( context_id) ;
277
277
stream. on_downstream_data ( data_size, end_of_stream)
@@ -289,7 +289,7 @@ impl Dispatcher {
289
289
}
290
290
}
291
291
292
- fn on_upstream_data ( & self , context_id : u32 , data_size : usize , end_of_stream : bool ) -> Action {
292
+ fn on_upstream_data ( & self , context_id : u32 , data_size : usize , end_of_stream : bool ) -> FilterStatus {
293
293
if let Some ( stream) = self . streams . borrow_mut ( ) . get_mut ( & context_id) {
294
294
self . active_id . set ( context_id) ;
295
295
stream. on_upstream_data ( data_size, end_of_stream)
@@ -307,7 +307,7 @@ impl Dispatcher {
307
307
}
308
308
}
309
309
310
- fn on_http_request_headers ( & self , context_id : u32 , num_headers : usize ) -> Action {
310
+ fn on_http_request_headers ( & self , context_id : u32 , num_headers : usize ) -> FilterHeadersStatus {
311
311
if let Some ( http_stream) = self . http_streams . borrow_mut ( ) . get_mut ( & context_id) {
312
312
self . active_id . set ( context_id) ;
313
313
http_stream. on_http_request_headers ( num_headers)
@@ -321,7 +321,7 @@ impl Dispatcher {
321
321
context_id : u32 ,
322
322
body_size : usize ,
323
323
end_of_stream : bool ,
324
- ) -> Action {
324
+ ) -> FilterDataStatus {
325
325
if let Some ( http_stream) = self . http_streams . borrow_mut ( ) . get_mut ( & context_id) {
326
326
self . active_id . set ( context_id) ;
327
327
http_stream. on_http_request_body ( body_size, end_of_stream)
@@ -330,7 +330,7 @@ impl Dispatcher {
330
330
}
331
331
}
332
332
333
- fn on_http_request_trailers ( & self , context_id : u32 , num_trailers : usize ) -> Action {
333
+ fn on_http_request_trailers ( & self , context_id : u32 , num_trailers : usize ) -> FilterTrailersStatus {
334
334
if let Some ( http_stream) = self . http_streams . borrow_mut ( ) . get_mut ( & context_id) {
335
335
self . active_id . set ( context_id) ;
336
336
http_stream. on_http_request_trailers ( num_trailers)
@@ -339,7 +339,7 @@ impl Dispatcher {
339
339
}
340
340
}
341
341
342
- fn on_http_response_headers ( & self , context_id : u32 , num_headers : usize ) -> Action {
342
+ fn on_http_response_headers ( & self , context_id : u32 , num_headers : usize ) -> FilterHeadersStatus {
343
343
if let Some ( http_stream) = self . http_streams . borrow_mut ( ) . get_mut ( & context_id) {
344
344
self . active_id . set ( context_id) ;
345
345
http_stream. on_http_response_headers ( num_headers)
@@ -353,7 +353,7 @@ impl Dispatcher {
353
353
context_id : u32 ,
354
354
body_size : usize ,
355
355
end_of_stream : bool ,
356
- ) -> Action {
356
+ ) -> FilterDataStatus {
357
357
if let Some ( http_stream) = self . http_streams . borrow_mut ( ) . get_mut ( & context_id) {
358
358
self . active_id . set ( context_id) ;
359
359
http_stream. on_http_response_body ( body_size, end_of_stream)
@@ -362,7 +362,7 @@ impl Dispatcher {
362
362
}
363
363
}
364
364
365
- fn on_http_response_trailers ( & self , context_id : u32 , num_trailers : usize ) -> Action {
365
+ fn on_http_response_trailers ( & self , context_id : u32 , num_trailers : usize ) -> FilterTrailersStatus {
366
366
if let Some ( http_stream) = self . http_streams . borrow_mut ( ) . get_mut ( & context_id) {
367
367
self . active_id . set ( context_id) ;
368
368
http_stream. on_http_response_trailers ( num_trailers)
@@ -439,7 +439,7 @@ pub extern "C" fn proxy_on_queue_ready(context_id: u32, queue_id: u32) {
439
439
}
440
440
441
441
#[ no_mangle]
442
- pub extern "C" fn proxy_on_new_connection ( context_id : u32 ) -> Action {
442
+ pub extern "C" fn proxy_on_new_connection ( context_id : u32 ) -> FilterStatus {
443
443
DISPATCHER . with ( |dispatcher| dispatcher. on_new_connection ( context_id) )
444
444
}
445
445
@@ -448,7 +448,7 @@ pub extern "C" fn proxy_on_downstream_data(
448
448
context_id : u32 ,
449
449
data_size : usize ,
450
450
end_of_stream : bool ,
451
- ) -> Action {
451
+ ) -> FilterStatus {
452
452
DISPATCHER
453
453
. with ( |dispatcher| dispatcher. on_downstream_data ( context_id, data_size, end_of_stream) )
454
454
}
@@ -463,7 +463,7 @@ pub extern "C" fn proxy_on_upstream_data(
463
463
context_id : u32 ,
464
464
data_size : usize ,
465
465
end_of_stream : bool ,
466
- ) -> Action {
466
+ ) -> FilterStatus {
467
467
DISPATCHER . with ( |dispatcher| dispatcher. on_upstream_data ( context_id, data_size, end_of_stream) )
468
468
}
469
469
@@ -473,7 +473,7 @@ pub extern "C" fn proxy_on_upstream_connection_close(context_id: u32, peer_type:
473
473
}
474
474
475
475
#[ no_mangle]
476
- pub extern "C" fn proxy_on_request_headers ( context_id : u32 , num_headers : usize ) -> Action {
476
+ pub extern "C" fn proxy_on_request_headers ( context_id : u32 , num_headers : usize ) -> FilterHeadersStatus {
477
477
DISPATCHER . with ( |dispatcher| dispatcher. on_http_request_headers ( context_id, num_headers) )
478
478
}
479
479
@@ -482,18 +482,18 @@ pub extern "C" fn proxy_on_request_body(
482
482
context_id : u32 ,
483
483
body_size : usize ,
484
484
end_of_stream : bool ,
485
- ) -> Action {
485
+ ) -> FilterDataStatus {
486
486
DISPATCHER
487
487
. with ( |dispatcher| dispatcher. on_http_request_body ( context_id, body_size, end_of_stream) )
488
488
}
489
489
490
490
#[ no_mangle]
491
- pub extern "C" fn proxy_on_request_trailers ( context_id : u32 , num_trailers : usize ) -> Action {
491
+ pub extern "C" fn proxy_on_request_trailers ( context_id : u32 , num_trailers : usize ) -> FilterTrailersStatus {
492
492
DISPATCHER . with ( |dispatcher| dispatcher. on_http_request_trailers ( context_id, num_trailers) )
493
493
}
494
494
495
495
#[ no_mangle]
496
- pub extern "C" fn proxy_on_response_headers ( context_id : u32 , num_headers : usize ) -> Action {
496
+ pub extern "C" fn proxy_on_response_headers ( context_id : u32 , num_headers : usize ) -> FilterHeadersStatus {
497
497
DISPATCHER . with ( |dispatcher| dispatcher. on_http_response_headers ( context_id, num_headers) )
498
498
}
499
499
@@ -502,13 +502,13 @@ pub extern "C" fn proxy_on_response_body(
502
502
context_id : u32 ,
503
503
body_size : usize ,
504
504
end_of_stream : bool ,
505
- ) -> Action {
505
+ ) -> FilterDataStatus {
506
506
DISPATCHER
507
507
. with ( |dispatcher| dispatcher. on_http_response_body ( context_id, body_size, end_of_stream) )
508
508
}
509
509
510
510
#[ no_mangle]
511
- pub extern "C" fn proxy_on_response_trailers ( context_id : u32 , num_trailers : usize ) -> Action {
511
+ pub extern "C" fn proxy_on_response_trailers ( context_id : u32 , num_trailers : usize ) -> FilterTrailersStatus {
512
512
DISPATCHER . with ( |dispatcher| dispatcher. on_http_response_trailers ( context_id, num_trailers) )
513
513
}
514
514
0 commit comments