diff --git a/BUILD b/BUILD index 5b413192..effde23b 100644 --- a/BUILD +++ b/BUILD @@ -166,6 +166,7 @@ proto_library( "//envoy/extensions/common/tap/v3:pkg", "//envoy/extensions/compression/gzip/compressor/v3:pkg", "//envoy/extensions/compression/gzip/decompressor/v3:pkg", + "//envoy/extensions/filters/common/dependency/v3:pkg", "//envoy/extensions/filters/common/fault/v3:pkg", "//envoy/extensions/filters/common/matcher/action/v3:pkg", "//envoy/extensions/filters/http/adaptive_concurrency/v3:pkg", diff --git a/envoy/extensions/filters/common/dependency/v3/BUILD b/envoy/extensions/filters/common/dependency/v3/BUILD new file mode 100644 index 00000000..ee92fb65 --- /dev/null +++ b/envoy/extensions/filters/common/dependency/v3/BUILD @@ -0,0 +1,9 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"], +) diff --git a/envoy/extensions/filters/common/dependency/v3/dependency.proto b/envoy/extensions/filters/common/dependency/v3/dependency.proto new file mode 100644 index 00000000..c21408dc --- /dev/null +++ b/envoy/extensions/filters/common/dependency/v3/dependency.proto @@ -0,0 +1,45 @@ +syntax = "proto3"; + +package envoy.extensions.filters.common.dependency.v3; + +import "udpa/annotations/migrate.proto"; +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.common.dependency.v3"; +option java_outer_classname = "DependencyProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Filter dependency specification] + +// Dependency specification and string identifier. +message Dependency { + enum DependencyType { + HEADER = 0; + FILTER_STATE_KEY = 1; + DYNAMIC_METADATA = 2; + } + + // The kind of dependency. + DependencyType type = 1; + + // The string identifier for the dependency. + string name = 2 [(validate.rules).string = {min_len: 1}]; +} + +// Dependency specification for a filter. For a filter chain to be valid, any +// dependency that is required must be provided by an earlier filter. +message FilterDependencies { + // A list of dependencies required on the decode path. + repeated Dependency decode_required = 1; + + // A list of dependencies provided on the encode path. + repeated Dependency decode_provided = 2; + + // A list of dependencies required on the decode path. + repeated Dependency encode_required = 3; + + // A list of dependencies provided on the encode path. + repeated Dependency encode_provided = 4; +} diff --git a/versioning/BUILD b/versioning/BUILD index 3204d928..ba5c589d 100644 --- a/versioning/BUILD +++ b/versioning/BUILD @@ -49,6 +49,7 @@ proto_library( "//envoy/extensions/common/tap/v3:pkg", "//envoy/extensions/compression/gzip/compressor/v3:pkg", "//envoy/extensions/compression/gzip/decompressor/v3:pkg", + "//envoy/extensions/filters/common/dependency/v3:pkg", "//envoy/extensions/filters/common/fault/v3:pkg", "//envoy/extensions/filters/common/matcher/action/v3:pkg", "//envoy/extensions/filters/http/adaptive_concurrency/v3:pkg",