diff --git a/api/v1alpha1/envoyproxy_metric_types.go b/api/v1alpha1/envoyproxy_metric_types.go index 170a1686b004..5a88fca2de15 100644 --- a/api/v1alpha1/envoyproxy_metric_types.go +++ b/api/v1alpha1/envoyproxy_metric_types.go @@ -60,6 +60,7 @@ type ProxyPrometheusProvider struct { } // Match defines the stats match configuration. +// TODO: zhaohuabing this type should be renamed to StatsMatch type Match struct { // MatcherType defines the stats matcher type // @@ -70,6 +71,7 @@ type Match struct { type MatcherType string +// TODO: zhaohuabing the const types should be prefixed with StatsMatch const ( Prefix MatcherType = "Prefix" RegularExpression MatcherType = "RegularExpression" diff --git a/api/v1alpha1/ratelimitfilter_types.go b/api/v1alpha1/ratelimitfilter_types.go index 44a24ef935ec..a71cdd882e83 100644 --- a/api/v1alpha1/ratelimitfilter_types.go +++ b/api/v1alpha1/ratelimitfilter_types.go @@ -130,6 +130,7 @@ type SourceMatch struct { } // HeaderMatch defines the match attributes within the HTTP Headers of the request. +// TODO: zhaohuabing this type could be replaced with a general purpose StringMatch type. type HeaderMatch struct { // Type specifies how to match against the value of the header. // diff --git a/api/v1alpha1/securitypolicy_types.go b/api/v1alpha1/securitypolicy_types.go index 2ec4e969d2a0..593d1b6de4e1 100644 --- a/api/v1alpha1/securitypolicy_types.go +++ b/api/v1alpha1/securitypolicy_types.go @@ -61,7 +61,8 @@ type CORS struct { } // StringMatch defines how to match any strings. -// TODO: zhaohuabing make this a shared type for all APIs +// This is a general purpose match condition that can be used by other EG APIs +// that need to match against a string. type StringMatch struct { // Type specifies how to match against a string. // diff --git a/site/content/en/latest/api/extension_types.md b/site/content/en/latest/api/extension_types.md index 28069b5670c0..840cb583844f 100644 --- a/site/content/en/latest/api/extension_types.md +++ b/site/content/en/latest/api/extension_types.md @@ -835,7 +835,7 @@ _Appears in:_ -HeaderMatch defines the match attributes within the HTTP Headers of the request. +HeaderMatch defines the match attributes within the HTTP Headers of the request. TODO: zhaohuabing this type could be replaced with a general purpose StringMatch type. _Appears in:_ - [RateLimitSelectCondition](#ratelimitselectcondition) @@ -1040,7 +1040,7 @@ _Appears in:_ -Match defines the stats match configuration. +Match defines the stats match configuration. TODO: zhaohuabing this type should be renamed to StatsMatch _Appears in:_ - [ProxyMetrics](#proxymetrics) @@ -1617,7 +1617,7 @@ _Appears in:_ -StringMatch defines how to match any strings. TODO: zhaohuabing make this a shared type for all APIs +StringMatch defines how to match any strings. This is a general purpose match condition that can be used by other EG APIs that need to match against a string. _Appears in:_ - [CORS](#cors)