forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GrpcFieldExtraction Filter (envoyproxy#28393)
Signed-off-by: Xuyang Tao <taoxuy@google.com>
- Loading branch information
Showing
23 changed files
with
2,523 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
docs/root/configuration/http/http_filters/grpc_field_extraction_filter.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.._config_http_filters_grpc_field_extraction: | ||
|
||
gRPC Field Extraction | ||
===================== | ||
|
||
* gRPC :ref:`architecture overview <arch_overview_grpc>` | ||
* This filter should be configured with the type URL ``type.googleapis.com/envoy.extensions.filters.http.grpc_field_extraction.v3.GrpcFieldExtractionConfig``. | ||
* :ref:`v3 API reference <envoy_v3_api_msg_extensions.filters.http.grpc_field_extraction.v3.GrpcFieldExtractionConfig>`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
source/extensions/filters/http/grpc_field_extraction/BUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
load( | ||
"//bazel:envoy_build_system.bzl", | ||
"envoy_cc_extension", | ||
"envoy_cc_library", | ||
"envoy_extension_package", | ||
) | ||
|
||
licenses(["notice"]) # Apache 2 | ||
|
||
envoy_extension_package() | ||
|
||
envoy_cc_library( | ||
name = "extractor", | ||
hdrs = ["extractor.h"], | ||
external_deps = ["grpc_transcoding"], | ||
deps = [ | ||
"@com_google_absl//absl/status", | ||
"@com_google_protofieldextraction//:all_libs", | ||
"@envoy_api//envoy/extensions/filters/http/grpc_field_extraction/v3:pkg_cc_proto", | ||
], | ||
) | ||
|
||
envoy_cc_library( | ||
name = "extractor_impl", | ||
srcs = ["extractor_impl.cc"], | ||
hdrs = ["extractor_impl.h"], | ||
external_deps = [ | ||
"grpc_transcoding", | ||
], | ||
deps = [ | ||
"extractor", | ||
"//source/common/common:minimal_logger_lib", | ||
"@com_google_absl//absl/status", | ||
"@com_google_protofieldextraction//:all_libs", | ||
"@envoy_api//envoy/extensions/filters/http/grpc_field_extraction/v3:pkg_cc_proto", | ||
], | ||
) | ||
|
||
envoy_cc_extension( | ||
name = "filter_config", | ||
srcs = ["filter_config.cc"], | ||
hdrs = ["filter_config.h"], | ||
deps = [ | ||
":extractor_impl", | ||
"//source/common/grpc:common_lib", | ||
"//source/extensions/filters/http/common:factory_base_lib", | ||
"@envoy_api//envoy/extensions/filters/http/grpc_field_extraction/v3:pkg_cc_proto", | ||
], | ||
) | ||
|
||
envoy_cc_library( | ||
name = "filter", | ||
srcs = ["filter.cc"], | ||
hdrs = ["filter.h"], | ||
external_deps = [ | ||
"grpc_transcoding", | ||
], | ||
deps = [ | ||
"extractor_impl", | ||
"filter_config", | ||
"//source/common/http:codes_lib", | ||
"//source/extensions/filters/http/common:pass_through_filter_lib", | ||
"//source/extensions/filters/http/grpc_field_extraction/message_converter:message_converter_lib", | ||
"@envoy_api//envoy/extensions/filters/http/grpc_field_extraction/v3:pkg_cc_proto", | ||
], | ||
) | ||
|
||
envoy_cc_extension( | ||
name = "config", | ||
srcs = ["config.cc"], | ||
hdrs = ["config.h"], | ||
deps = [ | ||
"extractor_impl", | ||
"filter", | ||
"filter_config", | ||
"@envoy_api//envoy/extensions/filters/http/grpc_field_extraction/v3:pkg_cc_proto", | ||
], | ||
) |
Oops, something went wrong.