From a8cffe19a0c545450c3cd34d41ef628acf7e7119 Mon Sep 17 00:00:00 2001 From: doujiang24 Date: Fri, 31 Dec 2021 17:23:45 +0800 Subject: [PATCH 1/2] added comments to clearify the meaning of the "Continue" and "Stop" FilterStatus. --- network_filter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network_filter.go b/network_filter.go index 549d526..cda622f 100644 --- a/network_filter.go +++ b/network_filter.go @@ -26,8 +26,8 @@ type FilterStatus string // FilterStatus types const ( - Continue FilterStatus = "Continue" - Stop FilterStatus = "Stop" + Continue FilterStatus = "Continue" // will continue other filters + Stop FilterStatus = "Stop" // will skip other filters ) // FilterManager is a groups of filters From adb8cc54fb432abbb0326480f93ec5bcf3d86174 Mon Sep 17 00:00:00 2001 From: doujiang24 Date: Fri, 31 Dec 2021 18:21:01 +0800 Subject: [PATCH 2/2] also clearify the StreamFilterStop. --- stream_filter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream_filter.go b/stream_filter.go index 655d990..6254a8f 100644 --- a/stream_filter.go +++ b/stream_filter.go @@ -27,7 +27,7 @@ type StreamFilterStatus string const ( // Continue filter chain iteration. StreamFilterContinue StreamFilterStatus = "Continue" - // Do not iterate to next iterator. + // will skip other filters in the same phase (be careful) StreamFilterStop StreamFilterStatus = "Stop" // terminate request. StreamFiltertermination StreamFilterStatus = "termination"