Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filters: Add dependencies.proto #14750

Merged
merged 17 commits into from
Jan 22, 2021
1 change: 1 addition & 0 deletions api/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 9 additions & 0 deletions api/envoy/extensions/filters/common/dependency/v3/BUILD
Original file line number Diff line number Diff line change
@@ -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"],
)
37 changes: 37 additions & 0 deletions api/envoy/extensions/filters/common/dependency/v3/dependency.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
syntax = "proto3";

package envoy.extensions.filters.common.dependency.v3;

import "udpa/annotations/migrate.proto";
import "udpa/annotations/status.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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: proto enums should be all caps, e.g. HEADER

FilterStateKey = 1;
DynamicMetadata = 2;
}

DependencyType type = 1;

string name = 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please comment all fields.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this is not exactly an API proto, please consider specifying default values if there are, and use PGV for required fields or other fields constraints.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, I think? Not sure if there are validation rules possible for fields other than the string.

}

// Dependency specification for a filter.
message FilterDependencies {
repeated Dependency decode_dependencies = 1;

repeated Dependency decode_providencies = 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaning towards decode_providers etc. as something a bit clearer for those not in on the original design discussion.


repeated Dependency encode_dependencies = 3;

repeated Dependency encode_providencies = 4;
}
1 change: 1 addition & 0 deletions api/versioning/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.