From 1380c4bb071c660c4c464c300b61d7ff49017ad1 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Fri, 12 Dec 2025 22:11:55 +0100 Subject: [PATCH] Add buf linting workflow with Bazel integration via Azure Pipelines Signed-off-by: Matthieu MOREL --- .bazelrc | 3 + BUILD | 31 ++++++++ DEVELOPER.md | 24 ++++++ MODULE.bazel | 1 + bazel/api_build_system.bzl | 17 ++++ bazel/dependency_imports.bzl | 5 ++ bazel/repositories.bzl | 4 + bazel/repository_locations.bzl | 5 ++ buf.lock | 12 +++ buf.yaml | 46 +++++++++++ ci/azure-pipelines.yml | 1 + ci/check.sh | 10 +++ go/udpa/annotations/migrate.pb.go | 25 ++++-- go/udpa/annotations/security.pb.go | 23 ++++-- go/udpa/annotations/sensitive.pb.go | 10 +++ go/udpa/annotations/status.pb.go | 23 ++++-- go/udpa/annotations/versioning.pb.go | 13 +++- go/udpa/data/orca/v1/orca_load_report.pb.go | 30 +++++-- go/udpa/service/orca/v1/orca.pb.go | 16 +++- go/udpa/service/orca/v1/orca_grpc.pb.go | 22 ++++++ go/udpa/type/v1/typed_struct.pb.go | 36 ++++++++- go/xds/annotations/v3/migrate.pb.go | 21 +++-- go/xds/annotations/v3/security.pb.go | 19 +++-- go/xds/annotations/v3/sensitive.pb.go | 6 ++ go/xds/annotations/v3/status.pb.go | 34 +++++--- go/xds/annotations/v3/versioning.pb.go | 10 ++- go/xds/core/v3/authority.pb.go | 3 +- go/xds/core/v3/cidr.pb.go | 10 ++- go/xds/core/v3/collection_entry.pb.go | 29 +++++-- go/xds/core/v3/context_params.pb.go | 8 ++ go/xds/core/v3/extension.pb.go | 17 +++- go/xds/core/v3/resource.pb.go | 14 +++- go/xds/core/v3/resource_locator.pb.go | 86 ++++++++++++++++++--- go/xds/core/v3/resource_name.pb.go | 29 +++++-- go/xds/data/orca/v3/orca_load_report.pb.go | 45 ++++++++--- go/xds/service/orca/v3/orca.pb.go | 12 ++- go/xds/service/orca/v3/orca_grpc.pb.go | 18 +++++ go/xds/type/matcher/v3/cel.pb.go | 26 ++++++- go/xds/type/matcher/v3/domain.pb.go | 29 +++++-- go/xds/type/matcher/v3/http_inputs.pb.go | 10 +++ go/xds/type/matcher/v3/ip.pb.go | 35 +++++++-- go/xds/type/matcher/v3/matcher.pb.go | 72 ++++++++++++++--- go/xds/type/matcher/v3/range.pb.go | 47 +++++++---- go/xds/type/matcher/v3/regex.pb.go | 26 ++++++- go/xds/type/matcher/v3/string.pb.go | 38 ++++++++- go/xds/type/v3/cel.pb.go | 55 ++++++++++--- go/xds/type/v3/range.pb.go | 30 ++++--- go/xds/type/v3/typed_struct.pb.go | 34 +++++++- python/udpa/annotations/security_pb2.py | 4 +- python/udpa/service/orca/v1/orca_pb2.py | 4 +- python/xds/annotations/v3/security_pb2.py | 4 +- python/xds/core/v3/authority_pb2.py | 4 +- python/xds/core/v3/cidr_pb2.py | 4 +- python/xds/core/v3/collection_entry_pb2.py | 4 +- python/xds/core/v3/extension_pb2.py | 4 +- python/xds/core/v3/resource_locator_pb2.py | 4 +- python/xds/core/v3/resource_name_pb2.py | 4 +- python/xds/service/orca/v3/orca_pb2.py | 4 +- python/xds/type/matcher/v3/cel_pb2.py | 4 +- python/xds/type/matcher/v3/domain_pb2.py | 4 +- python/xds/type/matcher/v3/ip_pb2.py | 4 +- python/xds/type/matcher/v3/matcher_pb2.py | 4 +- python/xds/type/matcher/v3/range_pb2.py | 6 +- python/xds/type/matcher/v3/string_pb2.py | 4 +- python/xds/type/v3/cel_pb2.py | 8 +- udpa/annotations/security.proto | 4 +- udpa/data/orca/v1/orca_load_report.proto | 24 ++++-- udpa/service/orca/v1/orca.proto | 11 ++- udpa/type/v1/typed_struct.proto | 8 +- xds/annotations/v3/security.proto | 4 +- xds/core/v3/authority.proto | 8 +- xds/core/v3/cidr.proto | 8 +- xds/core/v3/collection_entry.proto | 9 +-- xds/core/v3/context_params.proto | 7 +- xds/core/v3/extension.proto | 10 +-- xds/core/v3/resource.proto | 6 +- xds/core/v3/resource_locator.proto | 13 ++-- xds/core/v3/resource_name.proto | 8 +- xds/data/orca/v3/orca_load_report.proto | 19 +++-- xds/service/orca/v3/orca.proto | 11 ++- xds/type/matcher/v3/cel.proto | 8 +- xds/type/matcher/v3/domain.proto | 12 ++- xds/type/matcher/v3/http_inputs.proto | 9 +-- xds/type/matcher/v3/ip.proto | 10 +-- xds/type/matcher/v3/matcher.proto | 9 +-- xds/type/matcher/v3/range.proto | 20 ++--- xds/type/matcher/v3/regex.proto | 10 +-- xds/type/matcher/v3/string.proto | 9 +-- xds/type/v3/cel.proto | 19 ++--- xds/type/v3/range.proto | 6 +- xds/type/v3/typed_struct.proto | 8 +- 91 files changed, 1109 insertions(+), 355 deletions(-) create mode 100644 buf.lock create mode 100644 buf.yaml diff --git a/.bazelrc b/.bazelrc index 0f3a602a..5dd0b373 100644 --- a/.bazelrc +++ b/.bazelrc @@ -3,3 +3,6 @@ build:ci --announce_rc # C++17 standard required for newer protobuf and grpc versions build --cxxopt=-std=c++17 build --host_cxxopt=-std=c++17 + +# Enable source_code_info in proto descriptors for buf linting +build --protocopt=--include_source_info diff --git a/BUILD b/BUILD index e69de29b..1fa0c10d 100644 --- a/BUILD +++ b/BUILD @@ -0,0 +1,31 @@ +load("@rules_buf//buf:defs.bzl", "buf_format", "buf_lint_test") + +# Buf configuration files +exports_files([ + "buf.yaml", + "buf.lock", +]) + +# Buf lint test for the entire repository +buf_lint_test( + name = "buf_lint_test", + config = ":buf.yaml", + targets = [ + "//udpa/annotations:pkg", + "//udpa/data/orca/v1:pkg", + "//udpa/service/orca/v1:pkg", + "//udpa/type/v1:pkg", + "//xds/annotations/v3:pkg", + "//xds/core/v3:pkg", + "//xds/data/orca/v3:pkg", + "//xds/service/orca/v3:pkg", + "//xds/type/v3:pkg", + "//xds/type/matcher/v3:pkg", + ], +) + +# Buf format rule - run with: bazel run //:buf_format +# This formats all proto files in the workspace +buf_format( + name = "buf_format", +) diff --git a/DEVELOPER.md b/DEVELOPER.md index 46a10f53..940ad409 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -8,3 +8,27 @@ Run the following command to update the generated files and commit them with you bazel build //... tools/generate_go_protobuf.py ``` + +## Buf tools + +### Format proto files + +To format all proto files in the workspace: + +```sh +bazel run //:buf_format +``` + +To check if proto files are formatted correctly (used in CI): + +```sh +bazel run //:buf_format -- -d +``` + +### Linting + +Buf linting is automatically run as part of the test suite: + +```sh +bazel test //... +``` diff --git a/MODULE.bazel b/MODULE.bazel index 4a74df33..fe9a8924 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -11,6 +11,7 @@ bazel_dep(name = "grpc", version = "1.68.0", repo_name = "com_github_grpc_grpc") bazel_dep(name = "protobuf", version = "29.3", repo_name = "com_google_protobuf") bazel_dep(name = "protoc-gen-validate", version = "1.2.1.bcr.1", repo_name = "com_envoyproxy_protoc_gen_validate") bazel_dep(name = "re2", version = "2024-07-02", repo_name = "com_googlesource_code_re2") +bazel_dep(name = "rules_buf", version = "0.5.2") bazel_dep(name = "rules_cc", version = "0.0.17") bazel_dep(name = "rules_go", version = "0.53.0", repo_name = "io_bazel_rules_go") bazel_dep(name = "rules_python", version = "1.6.3") diff --git a/bazel/api_build_system.bzl b/bazel/api_build_system.bzl index 9d92a402..ffc675bc 100644 --- a/bazel/api_build_system.bzl +++ b/bazel/api_build_system.bzl @@ -4,6 +4,7 @@ load("@com_github_grpc_grpc//bazel:python_rules.bzl", _py_proto_library = "py_pr load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library") load("@io_bazel_rules_go//go:def.bzl", "go_test") load("@io_bazel_rules_go//proto:def.bzl", "go_grpc_library", "go_proto_library") +load("@rules_buf//buf:defs.bzl", "buf_lint_test") load("@rules_cc//cc:cc_test.bzl", "cc_test") load( "//bazel:external_proto_deps.bzl", @@ -101,6 +102,15 @@ def xds_proto_package( deps = [], has_services = False, visibility = ["//visibility:public"]): + """Builds proto targets and creates tests for linting. + + Args: + name: Name of the proto package (default: "pkg") + srcs: List of proto source files + deps: Dependencies on other proto_library targets + has_services: Whether this package contains gRPC services + visibility: Target visibility + """ if srcs == []: srcs = native.glob(["*.proto"]) @@ -136,6 +146,13 @@ def xds_proto_package( ]).to_list(), ) + # Add buf linting test for proto files + buf_lint_test( + name = name + "_buf_lint_test", + config = "//:buf.yaml", + targets = [":" + name], + ) + def xds_cc_test(name, **kwargs): cc_test( name = name, diff --git a/bazel/dependency_imports.bzl b/bazel/dependency_imports.bzl index 1771d79f..2affff2e 100644 --- a/bazel/dependency_imports.bzl +++ b/bazel/dependency_imports.bzl @@ -3,6 +3,7 @@ load("@com_envoyproxy_protoc_gen_validate//bazel:repositories.bzl", "pgv_depende load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language") load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") +load("@rules_buf//buf:repositories.bzl", "rules_buf_dependencies", "rules_buf_toolchains") load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains") # go version for rules_go @@ -18,6 +19,10 @@ def xds_dependency_imports(go_version = GO_VERSION): gazelle_dependencies(go_sdk = "go_sdk") pgv_dependencies() + # Initialize rules_buf for WORKSPACE mode + rules_buf_dependencies() + rules_buf_toolchains(version = "v1.47.2") + # Initialize rules_python for WORKSPACE mode py_repositories() python_register_toolchains( diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 75012a71..05e94b54 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -46,6 +46,10 @@ def xds_api_dependencies(): "rules_cc", locations = REPOSITORY_LOCATIONS, ) + xds_http_archive( + "rules_buf", + locations = REPOSITORY_LOCATIONS, + ) # Old name for backward compatibility. # TODO(roth): Remove once all callers are updated to use the new name. diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 5c08311d..e10b1fb5 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -58,4 +58,9 @@ REPOSITORY_LOCATIONS = dict( strip_prefix = "rules_python-1.6.3", urls = ["https://github.com/bazelbuild/rules_python/archive/1.6.3.tar.gz"], ), + rules_buf = dict( + sha256 = "19d845cedf32c0e74a01af8d0bd904872bddc7905f087318d00b332aa36d3929", + strip_prefix = "rules_buf-0.5.2", + urls = ["https://github.com/bufbuild/rules_buf/archive/refs/tags/v0.5.2.tar.gz"], + ), ) diff --git a/buf.lock b/buf.lock new file mode 100644 index 00000000..458f02da --- /dev/null +++ b/buf.lock @@ -0,0 +1,12 @@ +# Generated by buf. DO NOT EDIT. +version: v2 +deps: + - name: buf.build/envoyproxy/protoc-gen-validate + commit: daf171c6cdb54629b5f51e345a79e4dd + digest: b5:c745e1521879f43740230b1df673d0729f55704efefdcfc489d4a0a2d40c92a26cacfeab62813403040a8b180142d53b398c7ca784a065e43823605ee49681de + - name: buf.build/google/cel-spec + commit: 96eff7bcf453468dbd44b80598bfe1bf + digest: b5:660c244ec1e8a0f26c5431e1901f1d52d322c7ee3fd240cb6832f44d0694384a36ded008af457a9e5268c73adfa00170e972ac4fe44752a693424b3479f30b82 + - name: buf.build/googleapis/googleapis + commit: 004180b77378443887d3b55cabc00384 + digest: b5:e8f475fe3330f31f5fd86ac689093bcd274e19611a09db91f41d637cb9197881ce89882b94d13a58738e53c91c6e4bae7dc1feba85f590164c975a89e25115dc diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 00000000..8a64a617 --- /dev/null +++ b/buf.yaml @@ -0,0 +1,46 @@ +version: v2 +modules: + - path: . + excludes: + - bazel-bin + - bazel-out + - bazel-testlogs + - bazel-xds +deps: + - buf.build/envoyproxy/protoc-gen-validate + - buf.build/googleapis/googleapis + - buf.build/google/cel-spec +lint: + use: + - STANDARD + ignore_only: + # ENUM_VALUE_PREFIX: Legacy enums with established names that cannot be changed for compatibility + ENUM_VALUE_PREFIX: + - udpa/annotations/status.proto # PackageVersionStatus enum + - xds/annotations/v3/status.proto # PackageVersionStatus enum + - xds/core/v3/resource_locator.proto # Scheme enum + # ENUM_ZERO_VALUE_SUFFIX: Legacy enum zero values that predate _UNSPECIFIED convention + ENUM_ZERO_VALUE_SUFFIX: + - udpa/annotations/status.proto # PackageVersionStatus.UNKNOWN + - xds/annotations/v3/status.proto # PackageVersionStatus.UNKNOWN + - xds/core/v3/resource_locator.proto # Scheme.XDSTP + # PACKAGE_VERSION_SUFFIX: udpa.annotations package is legacy and predates versioning requirements + PACKAGE_VERSION_SUFFIX: + - udpa/annotations/migrate.proto + - udpa/annotations/security.proto + - udpa/annotations/sensitive.proto + - udpa/annotations/status.proto + - udpa/annotations/versioning.proto + # RPC naming: ORCA service uses established naming convention that predates buf standards + RPC_REQUEST_RESPONSE_UNIQUE: + - udpa/service/orca/v1/orca.proto # StreamCoreMetrics RPC + - xds/service/orca/v3/orca.proto # StreamCoreMetrics RPC + RPC_REQUEST_STANDARD_NAME: + - udpa/service/orca/v1/orca.proto # StreamCoreMetrics RPC + - xds/service/orca/v3/orca.proto # StreamCoreMetrics RPC + RPC_RESPONSE_STANDARD_NAME: + - udpa/service/orca/v1/orca.proto # StreamCoreMetrics RPC + - xds/service/orca/v3/orca.proto # StreamCoreMetrics RPC +breaking: + use: + - FILE diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 3a7221e2..84e07482 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -18,6 +18,7 @@ jobs: path: $(Agent.TempDirectory)/tmp - bash: ci/check.sh + displayName: 'Run Bazel tests (includes buf linting)' env: TEST_TMPDIR: $(Agent.TempDirectory)/tmp diff --git a/ci/check.sh b/ci/check.sh index 0abcf6cd..ffa414e4 100755 --- a/ci/check.sh +++ b/ci/check.sh @@ -2,6 +2,16 @@ set -e +# Check buf format - this runs buf format in diff mode to verify formatting +echo "Checking proto file formatting with buf..." +bazel run //:buf_format -- -d || { + echo "ERROR: Proto files are not properly formatted." + echo "Run 'bazel run //:buf_format' to fix formatting issues." + exit 1 +} +echo "Proto formatting check passed." + +# Run all tests including buf_lint_test via Bazel bazel test --config=ci //... rm -rf go/xds go/udpa diff --git a/go/udpa/annotations/migrate.pb.go b/go/udpa/annotations/migrate.pb.go index 9244eb6f..9c026cb7 100644 --- a/go/udpa/annotations/migrate.pb.go +++ b/go/udpa/annotations/migrate.pb.go @@ -1,3 +1,7 @@ +// THIS FILE IS DEPRECATED +// Users should instead use the corresponding proto in the xds tree. +// No new changes will be accepted here. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.10 @@ -23,8 +27,9 @@ const ( ) type MigrateAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Rename the message/enum/enum value in next version. + Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -67,9 +72,13 @@ func (x *MigrateAnnotation) GetRename() string { } type FieldMigrateAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"` - OneofPromotion string `protobuf:"bytes,2,opt,name=oneof_promotion,json=oneofPromotion,proto3" json:"oneof_promotion,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Rename the field in next version. + Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"` + // Add the field to a named oneof in next version. If this already exists, the + // field will join its siblings under the oneof, otherwise a new oneof will be + // created with the given name. + OneofPromotion string `protobuf:"bytes,2,opt,name=oneof_promotion,json=oneofPromotion,proto3" json:"oneof_promotion,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -119,8 +128,10 @@ func (x *FieldMigrateAnnotation) GetOneofPromotion() string { } type FileMigrateAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - MoveToPackage string `protobuf:"bytes,2,opt,name=move_to_package,json=moveToPackage,proto3" json:"move_to_package,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Move all types in the file to another package, this implies changing proto + // file path. + MoveToPackage string `protobuf:"bytes,2,opt,name=move_to_package,json=moveToPackage,proto3" json:"move_to_package,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } diff --git a/go/udpa/annotations/security.pb.go b/go/udpa/annotations/security.pb.go index a4247ac0..d148dd79 100644 --- a/go/udpa/annotations/security.pb.go +++ b/go/udpa/annotations/security.pb.go @@ -1,3 +1,7 @@ +// THIS FILE IS DEPRECATED +// Users should instead use the corresponding proto in the xds tree. +// No new changes will be accepted here. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.10 @@ -22,12 +26,16 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// These annotations indicate metadata for the purpose of understanding the +// security significance of fields. type FieldSecurityAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - ConfigureForUntrustedDownstream bool `protobuf:"varint,1,opt,name=configure_for_untrusted_downstream,json=configureForUntrustedDownstream,proto3" json:"configure_for_untrusted_downstream,omitempty"` - ConfigureForUntrustedUpstream bool `protobuf:"varint,2,opt,name=configure_for_untrusted_upstream,json=configureForUntrustedUpstream,proto3" json:"configure_for_untrusted_upstream,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + // Field should be set in the presence of untrusted downstreams. + ConfigureForUntrustedDownstream bool `protobuf:"varint,1,opt,name=configure_for_untrusted_downstream,json=configureForUntrustedDownstream,proto3" json:"configure_for_untrusted_downstream,omitempty"` + // Field should be set in the presence of untrusted upstreams. + ConfigureForUntrustedUpstream bool `protobuf:"varint,2,opt,name=configure_for_untrusted_upstream,json=configureForUntrustedUpstream,proto3" json:"configure_for_untrusted_upstream,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FieldSecurityAnnotation) Reset() { @@ -87,6 +95,9 @@ var file_udpa_annotations_security_proto_extTypes = []protoimpl.ExtensionInfo{ // Extension fields to descriptorpb.FieldOptions. var ( + // Magic number is the 28 most significant bits in the sha256sum of + // "udpa.annotations.security". + // // optional udpa.annotations.FieldSecurityAnnotation security = 11122993; E_Security = &file_udpa_annotations_security_proto_extTypes[0] ) @@ -95,7 +106,7 @@ var File_udpa_annotations_security_proto protoreflect.FileDescriptor const file_udpa_annotations_security_proto_rawDesc = "" + "\n" + - "\x1fudpa/annotations/security.proto\x12\x10udpa.annotations\x1a\x1dudpa/annotations/status.proto\x1a google/protobuf/descriptor.proto\"\xaf\x01\n" + + "\x1fudpa/annotations/security.proto\x12\x10udpa.annotations\x1a google/protobuf/descriptor.proto\x1a\x1dudpa/annotations/status.proto\"\xaf\x01\n" + "\x17FieldSecurityAnnotation\x12K\n" + "\"configure_for_untrusted_downstream\x18\x01 \x01(\bR\x1fconfigureForUntrustedDownstream\x12G\n" + " configure_for_untrusted_upstream\x18\x02 \x01(\bR\x1dconfigureForUntrustedUpstream:g\n" + diff --git a/go/udpa/annotations/sensitive.pb.go b/go/udpa/annotations/sensitive.pb.go index 06d910d0..9ab3c111 100644 --- a/go/udpa/annotations/sensitive.pb.go +++ b/go/udpa/annotations/sensitive.pb.go @@ -1,3 +1,7 @@ +// THIS FILE IS DEPRECATED +// Users should instead use the corresponding proto in the xds tree. +// No new changes will be accepted here. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.10 @@ -34,6 +38,12 @@ var file_udpa_annotations_sensitive_proto_extTypes = []protoimpl.ExtensionInfo{ // Extension fields to descriptorpb.FieldOptions. var ( + // Magic number is the 28 most significant bits in the sha256sum of "udpa.annotations.sensitive". + // When set to true, `sensitive` indicates that this field contains sensitive data, such as + // personally identifiable information, passwords, or private keys, and should be redacted for + // display by tools aware of this annotation. Note that that this has no effect on standard + // Protobuf functions such as `TextFormat::PrintToString`. + // // optional bool sensitive = 76569463; E_Sensitive = &file_udpa_annotations_sensitive_proto_extTypes[0] ) diff --git a/go/udpa/annotations/status.pb.go b/go/udpa/annotations/status.pb.go index 11abcefe..98711c82 100644 --- a/go/udpa/annotations/status.pb.go +++ b/go/udpa/annotations/status.pb.go @@ -1,3 +1,7 @@ +// THIS FILE IS DEPRECATED +// Users should instead use the corresponding proto in the xds tree. +// No new changes will be accepted here. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.10 @@ -25,9 +29,14 @@ const ( type PackageVersionStatus int32 const ( - PackageVersionStatus_UNKNOWN PackageVersionStatus = 0 - PackageVersionStatus_FROZEN PackageVersionStatus = 1 - PackageVersionStatus_ACTIVE PackageVersionStatus = 2 + // Unknown package version status. + PackageVersionStatus_UNKNOWN PackageVersionStatus = 0 + // This version of the package is frozen. + PackageVersionStatus_FROZEN PackageVersionStatus = 1 + // This version of the package is the active development version. + PackageVersionStatus_ACTIVE PackageVersionStatus = 2 + // This version of the package is the candidate for the next major version. It + // is typically machine generated from the active development version. PackageVersionStatus_NEXT_MAJOR_VERSION_CANDIDATE PackageVersionStatus = 3 ) @@ -75,9 +84,11 @@ func (PackageVersionStatus) EnumDescriptor() ([]byte, []int) { } type StatusAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` - PackageVersionStatus PackageVersionStatus `protobuf:"varint,2,opt,name=package_version_status,json=packageVersionStatus,proto3,enum=udpa.annotations.PackageVersionStatus" json:"package_version_status,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // The entity is work-in-progress and subject to breaking changes. + WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` + // The entity belongs to a package with the given version status. + PackageVersionStatus PackageVersionStatus `protobuf:"varint,2,opt,name=package_version_status,json=packageVersionStatus,proto3,enum=udpa.annotations.PackageVersionStatus" json:"package_version_status,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } diff --git a/go/udpa/annotations/versioning.pb.go b/go/udpa/annotations/versioning.pb.go index 8bdcc0a7..80ff6742 100644 --- a/go/udpa/annotations/versioning.pb.go +++ b/go/udpa/annotations/versioning.pb.go @@ -1,3 +1,7 @@ +// THIS FILE IS DEPRECATED +// Users should instead use the corresponding proto in the xds tree. +// No new changes will be accepted here. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.10 @@ -23,8 +27,11 @@ const ( ) type VersioningAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - PreviousMessageType string `protobuf:"bytes,1,opt,name=previous_message_type,json=previousMessageType,proto3" json:"previous_message_type,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Track the previous message type. E.g. this message might be + // udpa.foo.v3alpha.Foo and it was previously udpa.bar.v2.Bar. This + // information is consumed by UDPA via proto descriptors. + PreviousMessageType string `protobuf:"bytes,1,opt,name=previous_message_type,json=previousMessageType,proto3" json:"previous_message_type,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -79,6 +86,8 @@ var file_udpa_annotations_versioning_proto_extTypes = []protoimpl.ExtensionInfo{ // Extension fields to descriptorpb.MessageOptions. var ( + // Magic number derived from 0x78 ('x') 0x44 ('D') 0x53 ('S') + // // optional udpa.annotations.VersioningAnnotation versioning = 7881811; E_Versioning = &file_udpa_annotations_versioning_proto_extTypes[0] ) diff --git a/go/udpa/data/orca/v1/orca_load_report.pb.go b/go/udpa/data/orca/v1/orca_load_report.pb.go index d0ee7c02..105920be 100644 --- a/go/udpa/data/orca/v1/orca_load_report.pb.go +++ b/go/udpa/data/orca/v1/orca_load_report.pb.go @@ -1,3 +1,7 @@ +// THIS FILE IS DEPRECATED +// Users should instead use the corresponding proto in the xds tree. +// No new changes will be accepted here. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.10 @@ -23,14 +27,24 @@ const ( ) type OrcaLoadReport struct { - state protoimpl.MessageState `protogen:"open.v1"` - CpuUtilization float64 `protobuf:"fixed64,1,opt,name=cpu_utilization,json=cpuUtilization,proto3" json:"cpu_utilization,omitempty"` - MemUtilization float64 `protobuf:"fixed64,2,opt,name=mem_utilization,json=memUtilization,proto3" json:"mem_utilization,omitempty"` - Rps uint64 `protobuf:"varint,3,opt,name=rps,proto3" json:"rps,omitempty"` - RequestCost map[string]float64 `protobuf:"bytes,4,rep,name=request_cost,json=requestCost,proto3" json:"request_cost,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - Utilization map[string]float64 `protobuf:"bytes,5,rep,name=utilization,proto3" json:"utilization,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + // CPU utilization expressed as a fraction of available CPU resources. This + // should be derived from the latest sample or measurement. + CpuUtilization float64 `protobuf:"fixed64,1,opt,name=cpu_utilization,json=cpuUtilization,proto3" json:"cpu_utilization,omitempty"` + // Memory utilization expressed as a fraction of available memory + // resources. This should be derived from the latest sample or measurement. + MemUtilization float64 `protobuf:"fixed64,2,opt,name=mem_utilization,json=memUtilization,proto3" json:"mem_utilization,omitempty"` + // Total RPS being served by an endpoint. This should cover all services that an endpoint is + // responsible for. + Rps uint64 `protobuf:"varint,3,opt,name=rps,proto3" json:"rps,omitempty"` + // Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of + // storage) associated with the request. + RequestCost map[string]float64 `protobuf:"bytes,4,rep,name=request_cost,json=requestCost,proto3" json:"request_cost,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + // Resource utilization values. Each value is expressed as a fraction of total resources + // available, derived from the latest sample or measurement. + Utilization map[string]float64 `protobuf:"bytes,5,rep,name=utilization,proto3" json:"utilization,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *OrcaLoadReport) Reset() { diff --git a/go/udpa/service/orca/v1/orca.pb.go b/go/udpa/service/orca/v1/orca.pb.go index d996d4e7..498ccb34 100644 --- a/go/udpa/service/orca/v1/orca.pb.go +++ b/go/udpa/service/orca/v1/orca.pb.go @@ -1,3 +1,7 @@ +// THIS FILE IS DEPRECATED +// Users should instead use the corresponding proto in the xds tree. +// No new changes will be accepted here. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.10 @@ -24,9 +28,13 @@ const ( ) type OrcaLoadReportRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - ReportInterval *durationpb.Duration `protobuf:"bytes,1,opt,name=report_interval,json=reportInterval,proto3" json:"report_interval,omitempty"` - RequestCostNames []string `protobuf:"bytes,2,rep,name=request_cost_names,json=requestCostNames,proto3" json:"request_cost_names,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Interval for generating Open RCA core metric responses. + ReportInterval *durationpb.Duration `protobuf:"bytes,1,opt,name=report_interval,json=reportInterval,proto3" json:"report_interval,omitempty"` + // Request costs to collect. If this is empty, all known requests costs tracked by + // the load reporting agent will be returned. This provides an opportunity for + // the client to selectively obtain a subset of tracked costs. + RequestCostNames []string `protobuf:"bytes,2,rep,name=request_cost_names,json=requestCostNames,proto3" json:"request_cost_names,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -79,7 +87,7 @@ var File_udpa_service_orca_v1_orca_proto protoreflect.FileDescriptor const file_udpa_service_orca_v1_orca_proto_rawDesc = "" + "\n" + - "\x1fudpa/service/orca/v1/orca.proto\x12\x14udpa.service.orca.v1\x1a(udpa/data/orca/v1/orca_load_report.proto\x1a\x1egoogle/protobuf/duration.proto\"\x89\x01\n" + + "\x1fudpa/service/orca/v1/orca.proto\x12\x14udpa.service.orca.v1\x1a\x1egoogle/protobuf/duration.proto\x1a(udpa/data/orca/v1/orca_load_report.proto\"\x89\x01\n" + "\x15OrcaLoadReportRequest\x12B\n" + "\x0freport_interval\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\x0ereportInterval\x12,\n" + "\x12request_cost_names\x18\x02 \x03(\tR\x10requestCostNames2w\n" + diff --git a/go/udpa/service/orca/v1/orca_grpc.pb.go b/go/udpa/service/orca/v1/orca_grpc.pb.go index 8bee1fdf..356d8ca6 100644 --- a/go/udpa/service/orca/v1/orca_grpc.pb.go +++ b/go/udpa/service/orca/v1/orca_grpc.pb.go @@ -1,3 +1,7 @@ +// THIS FILE IS DEPRECATED +// Users should instead use the corresponding proto in the xds tree. +// No new changes will be accepted here. + // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 @@ -26,6 +30,15 @@ const ( // OpenRcaServiceClient is the client API for OpenRcaService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Out-of-band (OOB) load reporting service for the additional load reporting +// agent that does not sit in the request path. Reports are periodically sampled +// with sufficient frequency to provide temporal association with requests. +// OOB reporting compensates the limitation of in-band reporting in revealing +// costs for backends that do not provide a steady stream of telemetry such as +// long running stream operations and zero QPS services. This is a server +// streaming service, client needs to terminate current RPC and initiate +// a new call to change backend reporting frequency. type OpenRcaServiceClient interface { StreamCoreMetrics(ctx context.Context, in *OrcaLoadReportRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[v1.OrcaLoadReport], error) } @@ -60,6 +73,15 @@ type OpenRcaService_StreamCoreMetricsClient = grpc.ServerStreamingClient[v1.Orca // OpenRcaServiceServer is the server API for OpenRcaService service. // All implementations should embed UnimplementedOpenRcaServiceServer // for forward compatibility. +// +// Out-of-band (OOB) load reporting service for the additional load reporting +// agent that does not sit in the request path. Reports are periodically sampled +// with sufficient frequency to provide temporal association with requests. +// OOB reporting compensates the limitation of in-band reporting in revealing +// costs for backends that do not provide a steady stream of telemetry such as +// long running stream operations and zero QPS services. This is a server +// streaming service, client needs to terminate current RPC and initiate +// a new call to change backend reporting frequency. type OpenRcaServiceServer interface { StreamCoreMetrics(*OrcaLoadReportRequest, grpc.ServerStreamingServer[v1.OrcaLoadReport]) error } diff --git a/go/udpa/type/v1/typed_struct.pb.go b/go/udpa/type/v1/typed_struct.pb.go index d693deb8..de0db857 100644 --- a/go/udpa/type/v1/typed_struct.pb.go +++ b/go/udpa/type/v1/typed_struct.pb.go @@ -1,3 +1,7 @@ +// THIS FILE IS DEPRECATED +// Users should instead use the corresponding proto in the xds tree. +// No new changes will be accepted here. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.10 @@ -22,10 +26,36 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// A TypedStruct contains an arbitrary JSON serialized protocol buffer message with a URL that +// describes the type of the serialized message. This is very similar to google.protobuf.Any, +// instead of having protocol buffer binary, this employs google.protobuf.Struct as value. +// +// This message is intended to be embedded inside Any, so it shouldn't be directly referred +// from other UDPA messages. +// +// When packing an opaque extension config, packing the expected type into Any is preferred +// wherever possible for its efficiency. TypedStruct should be used only if a proto descriptor +// is not available, for example if: +// - A control plane sends opaque message that is originally from external source in human readable +// format such as JSON or YAML. +// - The control plane doesn't have the knowledge of the protocol buffer schema hence it cannot +// serialize the message in protocol buffer binary format. +// - The DPLB doesn't have have the knowledge of the protocol buffer schema its plugin or extension +// uses. This has to be indicated in the DPLB capability negotiation. +// +// When a DPLB receives a TypedStruct in Any, it should: +// - Check if the type_url of the TypedStruct matches the type the extension expects. +// - Convert value to the type described in type_url and perform validation. +// TODO(lizan): Figure out how TypeStruct should be used with DPLB extensions that doesn't link +// protobuf descriptor with DPLB itself, (e.g. gRPC LB Plugin, Envoy WASM extensions). type TypedStruct struct { - state protoimpl.MessageState `protogen:"open.v1"` - TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - Value *structpb.Struct `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // A URL that uniquely identifies the type of the serialize protocol buffer message. + // This has same semantics and format described in google.protobuf.Any: + // https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto + TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + // A JSON representation of the above specified type. + Value *structpb.Struct `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } diff --git a/go/xds/annotations/v3/migrate.pb.go b/go/xds/annotations/v3/migrate.pb.go index ffc54dfe..f5176692 100644 --- a/go/xds/annotations/v3/migrate.pb.go +++ b/go/xds/annotations/v3/migrate.pb.go @@ -23,8 +23,9 @@ const ( ) type MigrateAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Rename the message/enum/enum value in next version. + Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -67,9 +68,13 @@ func (x *MigrateAnnotation) GetRename() string { } type FieldMigrateAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"` - OneofPromotion string `protobuf:"bytes,2,opt,name=oneof_promotion,json=oneofPromotion,proto3" json:"oneof_promotion,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Rename the field in next version. + Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"` + // Add the field to a named oneof in next version. If this already exists, the + // field will join its siblings under the oneof, otherwise a new oneof will be + // created with the given name. + OneofPromotion string `protobuf:"bytes,2,opt,name=oneof_promotion,json=oneofPromotion,proto3" json:"oneof_promotion,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -119,8 +124,10 @@ func (x *FieldMigrateAnnotation) GetOneofPromotion() string { } type FileMigrateAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - MoveToPackage string `protobuf:"bytes,2,opt,name=move_to_package,json=moveToPackage,proto3" json:"move_to_package,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Move all types in the file to another package, this implies changing proto + // file path. + MoveToPackage string `protobuf:"bytes,2,opt,name=move_to_package,json=moveToPackage,proto3" json:"move_to_package,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } diff --git a/go/xds/annotations/v3/security.pb.go b/go/xds/annotations/v3/security.pb.go index 1d3bb57b..10bf1945 100644 --- a/go/xds/annotations/v3/security.pb.go +++ b/go/xds/annotations/v3/security.pb.go @@ -22,12 +22,16 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// These annotations indicate metadata for the purpose of understanding the +// security significance of fields. type FieldSecurityAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - ConfigureForUntrustedDownstream bool `protobuf:"varint,1,opt,name=configure_for_untrusted_downstream,json=configureForUntrustedDownstream,proto3" json:"configure_for_untrusted_downstream,omitempty"` - ConfigureForUntrustedUpstream bool `protobuf:"varint,2,opt,name=configure_for_untrusted_upstream,json=configureForUntrustedUpstream,proto3" json:"configure_for_untrusted_upstream,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + // Field should be set in the presence of untrusted downstreams. + ConfigureForUntrustedDownstream bool `protobuf:"varint,1,opt,name=configure_for_untrusted_downstream,json=configureForUntrustedDownstream,proto3" json:"configure_for_untrusted_downstream,omitempty"` + // Field should be set in the presence of untrusted upstreams. + ConfigureForUntrustedUpstream bool `protobuf:"varint,2,opt,name=configure_for_untrusted_upstream,json=configureForUntrustedUpstream,proto3" json:"configure_for_untrusted_upstream,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FieldSecurityAnnotation) Reset() { @@ -87,6 +91,9 @@ var file_xds_annotations_v3_security_proto_extTypes = []protoimpl.ExtensionInfo{ // Extension fields to descriptorpb.FieldOptions. var ( + // Magic number is the 28 most significant bits in the sha256sum of + // "xds.annotations.v3.security". + // // optional xds.annotations.v3.FieldSecurityAnnotation security = 99044135; E_Security = &file_xds_annotations_v3_security_proto_extTypes[0] ) @@ -95,7 +102,7 @@ var File_xds_annotations_v3_security_proto protoreflect.FileDescriptor const file_xds_annotations_v3_security_proto_rawDesc = "" + "\n" + - "!xds/annotations/v3/security.proto\x12\x12xds.annotations.v3\x1a\x1fxds/annotations/v3/status.proto\x1a google/protobuf/descriptor.proto\"\xaf\x01\n" + + "!xds/annotations/v3/security.proto\x12\x12xds.annotations.v3\x1a google/protobuf/descriptor.proto\x1a\x1fxds/annotations/v3/status.proto\"\xaf\x01\n" + "\x17FieldSecurityAnnotation\x12K\n" + "\"configure_for_untrusted_downstream\x18\x01 \x01(\bR\x1fconfigureForUntrustedDownstream\x12G\n" + " configure_for_untrusted_upstream\x18\x02 \x01(\bR\x1dconfigureForUntrustedUpstream:i\n" + diff --git a/go/xds/annotations/v3/sensitive.pb.go b/go/xds/annotations/v3/sensitive.pb.go index b8e80a23..004ea026 100644 --- a/go/xds/annotations/v3/sensitive.pb.go +++ b/go/xds/annotations/v3/sensitive.pb.go @@ -34,6 +34,12 @@ var file_xds_annotations_v3_sensitive_proto_extTypes = []protoimpl.ExtensionInfo // Extension fields to descriptorpb.FieldOptions. var ( + // Magic number is the 28 most significant bits in the sha256sum of "xds.annotations.v3.sensitive". + // When set to true, `sensitive` indicates that this field contains sensitive data, such as + // personally identifiable information, passwords, or private keys, and should be redacted for + // display by tools aware of this annotation. Note that that this has no effect on standard + // Protobuf functions such as `TextFormat::PrintToString`. + // // optional bool sensitive = 61008053; E_Sensitive = &file_xds_annotations_v3_sensitive_proto_extTypes[0] ) diff --git a/go/xds/annotations/v3/status.pb.go b/go/xds/annotations/v3/status.pb.go index bc99db7e..b320173a 100644 --- a/go/xds/annotations/v3/status.pb.go +++ b/go/xds/annotations/v3/status.pb.go @@ -25,9 +25,14 @@ const ( type PackageVersionStatus int32 const ( - PackageVersionStatus_UNKNOWN PackageVersionStatus = 0 - PackageVersionStatus_FROZEN PackageVersionStatus = 1 - PackageVersionStatus_ACTIVE PackageVersionStatus = 2 + // Unknown package version status. + PackageVersionStatus_UNKNOWN PackageVersionStatus = 0 + // This version of the package is frozen. + PackageVersionStatus_FROZEN PackageVersionStatus = 1 + // This version of the package is the active development version. + PackageVersionStatus_ACTIVE PackageVersionStatus = 2 + // This version of the package is the candidate for the next major version. It + // is typically machine generated from the active development version. PackageVersionStatus_NEXT_MAJOR_VERSION_CANDIDATE PackageVersionStatus = 3 ) @@ -75,8 +80,9 @@ func (PackageVersionStatus) EnumDescriptor() ([]byte, []int) { } type FileStatusAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // The entity is work-in-progress and subject to breaking changes. + WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -119,8 +125,9 @@ func (x *FileStatusAnnotation) GetWorkInProgress() bool { } type MessageStatusAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // The entity is work-in-progress and subject to breaking changes. + WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -163,8 +170,9 @@ func (x *MessageStatusAnnotation) GetWorkInProgress() bool { } type FieldStatusAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // The entity is work-in-progress and subject to breaking changes. + WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -207,9 +215,11 @@ func (x *FieldStatusAnnotation) GetWorkInProgress() bool { } type StatusAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` - PackageVersionStatus PackageVersionStatus `protobuf:"varint,2,opt,name=package_version_status,json=packageVersionStatus,proto3,enum=xds.annotations.v3.PackageVersionStatus" json:"package_version_status,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // The entity is work-in-progress and subject to breaking changes. + WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` + // The entity belongs to a package with the given version status. + PackageVersionStatus PackageVersionStatus `protobuf:"varint,2,opt,name=package_version_status,json=packageVersionStatus,proto3,enum=xds.annotations.v3.PackageVersionStatus" json:"package_version_status,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } diff --git a/go/xds/annotations/v3/versioning.pb.go b/go/xds/annotations/v3/versioning.pb.go index 12409472..8a0d6000 100644 --- a/go/xds/annotations/v3/versioning.pb.go +++ b/go/xds/annotations/v3/versioning.pb.go @@ -23,8 +23,11 @@ const ( ) type VersioningAnnotation struct { - state protoimpl.MessageState `protogen:"open.v1"` - PreviousMessageType string `protobuf:"bytes,1,opt,name=previous_message_type,json=previousMessageType,proto3" json:"previous_message_type,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Track the previous message type. E.g. this message might be + // xds.foo.v3alpha.Foo and it was previously xds.bar.v2.Bar. This + // information is consumed by UDPA via proto descriptors. + PreviousMessageType string `protobuf:"bytes,1,opt,name=previous_message_type,json=previousMessageType,proto3" json:"previous_message_type,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -79,6 +82,9 @@ var file_xds_annotations_v3_versioning_proto_extTypes = []protoimpl.ExtensionInf // Extension fields to descriptorpb.MessageOptions. var ( + // Magic number is the 28 most significant bits in the sha256sum of + // "xds.annotations.v3.versioning". + // // optional xds.annotations.v3.VersioningAnnotation versioning = 92389011; E_Versioning = &file_xds_annotations_v3_versioning_proto_extTypes[0] ) diff --git a/go/xds/core/v3/authority.pb.go b/go/xds/core/v3/authority.pb.go index 5b7986e1..aac4e599 100644 --- a/go/xds/core/v3/authority.pb.go +++ b/go/xds/core/v3/authority.pb.go @@ -23,6 +23,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// xDS authority information. type Authority struct { state protoimpl.MessageState `protogen:"open.v1"` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -71,7 +72,7 @@ var File_xds_core_v3_authority_proto protoreflect.FileDescriptor const file_xds_core_v3_authority_proto_rawDesc = "" + "\n" + - "\x1bxds/core/v3/authority.proto\x12\vxds.core.v3\x1a\x1fxds/annotations/v3/status.proto\x1a\x17validate/validate.proto\"(\n" + + "\x1bxds/core/v3/authority.proto\x12\vxds.core.v3\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\"(\n" + "\tAuthority\x12\x1b\n" + "\x04name\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\x04nameBV\xd2Ƥ\xe1\x06\x02\b\x01\n" + "\x16com.github.xds.core.v3B\x0eAuthorityProtoP\x01Z\"github.com/cncf/xds/go/xds/core/v3b\x06proto3" diff --git a/go/xds/core/v3/cidr.pb.go b/go/xds/core/v3/cidr.pb.go index 802414af..f96ed7c6 100644 --- a/go/xds/core/v3/cidr.pb.go +++ b/go/xds/core/v3/cidr.pb.go @@ -24,9 +24,13 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// CidrRange specifies an IP Address and a prefix length to construct +// the subnet mask for a `CIDR `_ range. type CidrRange struct { - state protoimpl.MessageState `protogen:"open.v1"` - AddressPrefix string `protobuf:"bytes,1,opt,name=address_prefix,json=addressPrefix,proto3" json:"address_prefix,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // IPv4 or IPv6 address, e.g. “192.0.0.0“ or “2001:db8::“. + AddressPrefix string `protobuf:"bytes,1,opt,name=address_prefix,json=addressPrefix,proto3" json:"address_prefix,omitempty"` + // Length of prefix, e.g. 0, 32. Defaults to 0 when unset. PrefixLen *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -80,7 +84,7 @@ var File_xds_core_v3_cidr_proto protoreflect.FileDescriptor const file_xds_core_v3_cidr_proto_rawDesc = "" + "\n" + - "\x16xds/core/v3/cidr.proto\x12\vxds.core.v3\x1a\x1fxds/annotations/v3/status.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17validate/validate.proto\"\x82\x01\n" + + "\x16xds/core/v3/cidr.proto\x12\vxds.core.v3\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\"\x82\x01\n" + "\tCidrRange\x12.\n" + "\x0eaddress_prefix\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\raddressPrefix\x12E\n" + "\n" + diff --git a/go/xds/core/v3/collection_entry.pb.go b/go/xds/core/v3/collection_entry.pb.go index 089200ae..f4785b70 100644 --- a/go/xds/core/v3/collection_entry.pb.go +++ b/go/xds/core/v3/collection_entry.pb.go @@ -24,6 +24,15 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// xDS collection resource wrapper. This encapsulates a xDS resource when +// appearing inside a list collection resource. List collection resources are +// regular Resource messages of type: +// +// .. code-block:: proto +// +// message Collection { +// repeated CollectionEntry resources = 1; +// } type CollectionEntry struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to ResourceSpecifier: @@ -95,10 +104,12 @@ type isCollectionEntry_ResourceSpecifier interface { } type CollectionEntry_Locator struct { + // A resource locator describing how the member resource is to be located. Locator *ResourceLocator `protobuf:"bytes,1,opt,name=locator,proto3,oneof"` } type CollectionEntry_InlineEntry_ struct { + // The resource is inlined in the list collection. InlineEntry *CollectionEntry_InlineEntry `protobuf:"bytes,2,opt,name=inline_entry,json=inlineEntry,proto3,oneof"` } @@ -106,11 +117,19 @@ func (*CollectionEntry_Locator) isCollectionEntry_ResourceSpecifier() {} func (*CollectionEntry_InlineEntry_) isCollectionEntry_ResourceSpecifier() {} +// Inlined resource entry. type CollectionEntry_InlineEntry struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Resource *anypb.Any `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Optional name to describe the inlined resource. Resource names must match + // “[a-zA-Z0-9_-\./]+“ (TODO(htuch): turn this into a PGV constraint once + // finalized, probably should be a RFC3986 pchar). This name allows + // reference via the #entry directive in ResourceLocator. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The resource's logical version. It is illegal to have the same named xDS + // resource name at a given version with different resource payloads. + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + // The resource payload, including type URL. + Resource *anypb.Any `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -170,7 +189,7 @@ var File_xds_core_v3_collection_entry_proto protoreflect.FileDescriptor const file_xds_core_v3_collection_entry_proto_rawDesc = "" + "\n" + - "\"xds/core/v3/collection_entry.proto\x12\vxds.core.v3\x1a\x19google/protobuf/any.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\"xds/core/v3/resource_locator.proto\x1a\x17validate/validate.proto\"\xc3\x02\n" + + "\"xds/core/v3/collection_entry.proto\x12\vxds.core.v3\x1a\x19google/protobuf/any.proto\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\"xds/core/v3/resource_locator.proto\"\xc3\x02\n" + "\x0fCollectionEntry\x128\n" + "\alocator\x18\x01 \x01(\v2\x1c.xds.core.v3.ResourceLocatorH\x00R\alocator\x12M\n" + "\finline_entry\x18\x02 \x01(\v2(.xds.core.v3.CollectionEntry.InlineEntryH\x00R\vinlineEntry\x1a\x8b\x01\n" + diff --git a/go/xds/core/v3/context_params.pb.go b/go/xds/core/v3/context_params.pb.go index 7fadbf53..17482509 100644 --- a/go/xds/core/v3/context_params.pb.go +++ b/go/xds/core/v3/context_params.pb.go @@ -22,6 +22,14 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Additional parameters that can be used to select resource variants. These include any +// global context parameters, per-resource type client feature capabilities and per-resource +// type functional attributes. All per-resource type attributes will be `xds.resource.` +// prefixed and some of these are documented below: +// +// `xds.resource.listening_address`: The value is "IP:port" (e.g. "10.1.1.3:8080") which is +// +// the listening address of a Listener. Used in a Listener resource query. type ContextParams struct { state protoimpl.MessageState `protogen:"open.v1"` Params map[string]string `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` diff --git a/go/xds/core/v3/extension.pb.go b/go/xds/core/v3/extension.pb.go index 9d0a3ed4..1ec2a893 100644 --- a/go/xds/core/v3/extension.pb.go +++ b/go/xds/core/v3/extension.pb.go @@ -23,10 +23,19 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Message type for extension configuration. type TypedExtensionConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - TypedConfig *anypb.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // The name of an extension. This is not used to select the extension, instead + // it serves the role of an opaque identifier. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The typed config for the extension. The type URL will be used to identify + // the extension. In the case that the type URL is *xds.type.v3.TypedStruct* + // (or, for historical reasons, *udpa.type.v1.TypedStruct*), the inner type + // URL of *TypedStruct* will be utilized. See the + // :ref:`extension configuration overview + // ` for further details. + TypedConfig *anypb.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -79,7 +88,7 @@ var File_xds_core_v3_extension_proto protoreflect.FileDescriptor const file_xds_core_v3_extension_proto_rawDesc = "" + "\n" + - "\x1bxds/core/v3/extension.proto\x12\vxds.core.v3\x1a\x17validate/validate.proto\x1a\x19google/protobuf/any.proto\"v\n" + + "\x1bxds/core/v3/extension.proto\x12\vxds.core.v3\x1a\x19google/protobuf/any.proto\x1a\x17validate/validate.proto\"v\n" + "\x14TypedExtensionConfig\x12\x1b\n" + "\x04name\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\x04name\x12A\n" + "\ftyped_config\x18\x02 \x01(\v2\x14.google.protobuf.AnyB\b\xfaB\x05\xa2\x01\x02\b\x01R\vtypedConfigBN\n" + diff --git a/go/xds/core/v3/resource.pb.go b/go/xds/core/v3/resource.pb.go index b8356baf..f7fbe77b 100644 --- a/go/xds/core/v3/resource.pb.go +++ b/go/xds/core/v3/resource.pb.go @@ -23,11 +23,17 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// xDS resource wrapper. This encapsulates a xDS resource when appearing in an +// xDS transport discovery response or when accessed as a filesystem object. type Resource struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name *ResourceName `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Resource *anypb.Any `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Resource name. This may be omitted for filesystem resources. + Name *ResourceName `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The resource's logical version. It is illegal to have the same named xDS + // resource name at a given version with different resource payloads. + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + // The resource payload, including type URL. + Resource *anypb.Any `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } diff --git a/go/xds/core/v3/resource_locator.pb.go b/go/xds/core/v3/resource_locator.pb.go index b3743883..baf634de 100644 --- a/go/xds/core/v3/resource_locator.pb.go +++ b/go/xds/core/v3/resource_locator.pb.go @@ -72,19 +72,49 @@ func (ResourceLocator_Scheme) EnumDescriptor() ([]byte, []int) { return file_xds_core_v3_resource_locator_proto_rawDescGZIP(), []int{0, 0} } +// xDS resource locators identify a xDS resource name and instruct the +// data-plane load balancer on how the resource may be located. +// +// Resource locators have a canonical xdstp:// URI representation: +// +// xdstp://{authority}/{type_url}/{id}?{context_params}{#directive,*} +// +// where context_params take the form of URI query parameters. +// +// Resource locators have a similar canonical http:// URI representation: +// +// http://{authority}/{type_url}/{id}?{context_params}{#directive,*} +// +// Resource locators also have a simplified file:// URI representation: +// +// file:///{id}{#directive,*} type ResourceLocator struct { - state protoimpl.MessageState `protogen:"open.v1"` - Scheme ResourceLocator_Scheme `protobuf:"varint,1,opt,name=scheme,proto3,enum=xds.core.v3.ResourceLocator_Scheme" json:"scheme,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` - ResourceType string `protobuf:"bytes,4,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // URI scheme. + Scheme ResourceLocator_Scheme `protobuf:"varint,1,opt,name=scheme,proto3,enum=xds.core.v3.ResourceLocator_Scheme" json:"scheme,omitempty"` + // Opaque identifier for the resource. Any '/' will not be escaped during URI + // encoding and will form part of the URI path. This may end + // with ‘*’ for glob collection references. + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + // Logical authority for resource (not necessarily transport network address). + // Authorities are opaque in the xDS API, data-plane load balancers will map + // them to concrete network transports such as an xDS management server, e.g. + // via envoy.config.core.v3.ConfigSource. + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` + // Fully qualified resource type (as in type URL without types.googleapis.com/ + // prefix). + ResourceType string `protobuf:"bytes,4,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` // Types that are valid to be assigned to ContextParamSpecifier: // // *ResourceLocator_ExactContext ContextParamSpecifier isResourceLocator_ContextParamSpecifier `protobuf_oneof:"context_param_specifier"` - Directives []*ResourceLocator_Directive `protobuf:"bytes,6,rep,name=directives,proto3" json:"directives,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // A list of directives that appear in the xDS resource locator #fragment. + // + // When encoding to URI form, directives are percent encoded with comma + // separation. + Directives []*ResourceLocator_Directive `protobuf:"bytes,6,rep,name=directives,proto3" json:"directives,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ResourceLocator) Reset() { @@ -173,11 +203,36 @@ type isResourceLocator_ContextParamSpecifier interface { } type ResourceLocator_ExactContext struct { + // Additional parameters that can be used to select resource variants. + // Matches must be exact, i.e. all context parameters must match exactly and + // there must be no additional context parameters set on the matched + // resource. ExactContext *ContextParams `protobuf:"bytes,5,opt,name=exact_context,json=exactContext,proto3,oneof"` } func (*ResourceLocator_ExactContext) isResourceLocator_ContextParamSpecifier() {} +// Directives provide information to data-plane load balancers on how xDS +// resource names are to be interpreted and potentially further resolved. For +// example, they may provide alternative resource locators for when primary +// resolution fails. Directives are not part of resource names and do not +// appear in a xDS transport discovery request. +// +// When encoding to URIs, directives take the form: +// +// = +// +// For example, we can have alt=xdstp://foo/bar or entry=some%20thing. Each +// directive value type may have its own string encoding, in the case of +// ResourceLocator there is a recursive URI encoding. +// +// Percent encoding applies to the URI encoding of the directive value. +// Multiple directives are comma-separated, so the reserved characters that +// require percent encoding in a directive value are [',', '#', '[', ']', +// '%']. These are the RFC3986 fragment reserved characters with the addition +// of the xDS scheme specific ','. See +// https://tools.ietf.org/html/rfc3986#page-49 for further details on URI ABNF +// and reserved characters. type ResourceLocator_Directive struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Directive: @@ -249,10 +304,23 @@ type isResourceLocator_Directive_Directive interface { } type ResourceLocator_Directive_Alt struct { + // An alternative resource locator for fallback if the resource is + // unavailable. For example, take the resource locator: + // + // xdstp://foo/some-type/some-route-table#alt=xdstp://bar/some-type/another-route-table + // + // If the data-plane load balancer is unable to reach `foo` to fetch the + // resource, it will fallback to `bar`. Alternative resources do not need + // to have equivalent content, but they should be functional substitutes. Alt *ResourceLocator `protobuf:"bytes,1,opt,name=alt,proto3,oneof"` } type ResourceLocator_Directive_Entry struct { + // List collections support inlining of resources via the entry field in + // Resource. These inlined Resource objects may have an optional name + // field specified. When specified, the entry directive allows + // ResourceLocator to directly reference these inlined resources, e.g. + // xdstp://.../foo#entry=bar. Entry string `protobuf:"bytes,2,opt,name=entry,proto3,oneof"` } @@ -264,7 +332,7 @@ var File_xds_core_v3_resource_locator_proto protoreflect.FileDescriptor const file_xds_core_v3_resource_locator_proto_rawDesc = "" + "\n" + - "\"xds/core/v3/resource_locator.proto\x12\vxds.core.v3\x1a\x1fxds/annotations/v3/status.proto\x1a xds/core/v3/context_params.proto\x1a\x17validate/validate.proto\"\x8e\x04\n" + + "\"xds/core/v3/resource_locator.proto\x12\vxds.core.v3\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\x1a xds/core/v3/context_params.proto\"\x8e\x04\n" + "\x0fResourceLocator\x12E\n" + "\x06scheme\x18\x01 \x01(\x0e2#.xds.core.v3.ResourceLocator.SchemeB\b\xfaB\x05\x82\x01\x02\x10\x01R\x06scheme\x12\x0e\n" + "\x02id\x18\x02 \x01(\tR\x02id\x12\x1c\n" + diff --git a/go/xds/core/v3/resource_name.pb.go b/go/xds/core/v3/resource_name.pb.go index d55126a1..71883462 100644 --- a/go/xds/core/v3/resource_name.pb.go +++ b/go/xds/core/v3/resource_name.pb.go @@ -23,12 +23,29 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// xDS resource name. This has a canonical xdstp:// URI representation: +// +// xdstp://{authority}/{type_url}/{id}?{context_params} +// +// where context_params take the form of URI query parameters. +// +// A xDS resource name fully identifies a network resource for transport +// purposes. xDS resource names in this form appear only in discovery +// request/response messages used with the xDS transport. type ResourceName struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` - ResourceType string `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - Context *ContextParams `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Opaque identifier for the resource. Any '/' will not be escaped during URI + // encoding and will form part of the URI path. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Logical authority for resource (not necessarily transport network address). + // Authorities are opaque in the xDS API, data-plane load balancers will map + // them to concrete network transports such as an xDS management server. + Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` + // Fully qualified resource type (as in type URL without types.googleapis.com/ + // prefix). + ResourceType string `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` + // Additional parameters that can be used to select resource variants. + Context *ContextParams `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -95,7 +112,7 @@ var File_xds_core_v3_resource_name_proto protoreflect.FileDescriptor const file_xds_core_v3_resource_name_proto_rawDesc = "" + "\n" + - "\x1fxds/core/v3/resource_name.proto\x12\vxds.core.v3\x1a\x1fxds/annotations/v3/status.proto\x1a xds/core/v3/context_params.proto\x1a\x17validate/validate.proto\"\xa0\x01\n" + + "\x1fxds/core/v3/resource_name.proto\x12\vxds.core.v3\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\x1a xds/core/v3/context_params.proto\"\xa0\x01\n" + "\fResourceName\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1c\n" + "\tauthority\x18\x02 \x01(\tR\tauthority\x12,\n" + diff --git a/go/xds/data/orca/v3/orca_load_report.pb.go b/go/xds/data/orca/v3/orca_load_report.pb.go index 44db3318..aad1cd70 100644 --- a/go/xds/data/orca/v3/orca_load_report.pb.go +++ b/go/xds/data/orca/v3/orca_load_report.pb.go @@ -23,17 +23,42 @@ const ( ) type OrcaLoadReport struct { - state protoimpl.MessageState `protogen:"open.v1"` - CpuUtilization float64 `protobuf:"fixed64,1,opt,name=cpu_utilization,json=cpuUtilization,proto3" json:"cpu_utilization,omitempty"` - MemUtilization float64 `protobuf:"fixed64,2,opt,name=mem_utilization,json=memUtilization,proto3" json:"mem_utilization,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // CPU utilization expressed as a fraction of available CPU resources. This + // should be derived from the latest sample or measurement. The value may be + // larger than 1.0 when the usage exceeds the reporter dependent notion of + // soft limits. + CpuUtilization float64 `protobuf:"fixed64,1,opt,name=cpu_utilization,json=cpuUtilization,proto3" json:"cpu_utilization,omitempty"` + // Memory utilization expressed as a fraction of available memory + // resources. This should be derived from the latest sample or measurement. + MemUtilization float64 `protobuf:"fixed64,2,opt,name=mem_utilization,json=memUtilization,proto3" json:"mem_utilization,omitempty"` + // Total RPS being served by an endpoint. This should cover all services that an endpoint is + // responsible for. + // Deprecated -- use “rps_fractional“ field instead. + // // Deprecated: Marked as deprecated in xds/data/orca/v3/orca_load_report.proto. - Rps uint64 `protobuf:"varint,3,opt,name=rps,proto3" json:"rps,omitempty"` - RequestCost map[string]float64 `protobuf:"bytes,4,rep,name=request_cost,json=requestCost,proto3" json:"request_cost,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - Utilization map[string]float64 `protobuf:"bytes,5,rep,name=utilization,proto3" json:"utilization,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - RpsFractional float64 `protobuf:"fixed64,6,opt,name=rps_fractional,json=rpsFractional,proto3" json:"rps_fractional,omitempty"` - Eps float64 `protobuf:"fixed64,7,opt,name=eps,proto3" json:"eps,omitempty"` - NamedMetrics map[string]float64 `protobuf:"bytes,8,rep,name=named_metrics,json=namedMetrics,proto3" json:"named_metrics,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - ApplicationUtilization float64 `protobuf:"fixed64,9,opt,name=application_utilization,json=applicationUtilization,proto3" json:"application_utilization,omitempty"` + Rps uint64 `protobuf:"varint,3,opt,name=rps,proto3" json:"rps,omitempty"` + // Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of + // storage) associated with the request. + RequestCost map[string]float64 `protobuf:"bytes,4,rep,name=request_cost,json=requestCost,proto3" json:"request_cost,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + // Resource utilization values. Each value is expressed as a fraction of total resources + // available, derived from the latest sample or measurement. + Utilization map[string]float64 `protobuf:"bytes,5,rep,name=utilization,proto3" json:"utilization,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + // Total RPS being served by an endpoint. This should cover all services that an endpoint is + // responsible for. + RpsFractional float64 `protobuf:"fixed64,6,opt,name=rps_fractional,json=rpsFractional,proto3" json:"rps_fractional,omitempty"` + // Total EPS (errors/second) being served by an endpoint. This should cover + // all services that an endpoint is responsible for. + Eps float64 `protobuf:"fixed64,7,opt,name=eps,proto3" json:"eps,omitempty"` + // Application specific opaque metrics. + NamedMetrics map[string]float64 `protobuf:"bytes,8,rep,name=named_metrics,json=namedMetrics,proto3" json:"named_metrics,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + // Application specific utilization expressed as a fraction of available + // resources. For example, an application may report the max of CPU and memory + // utilization for better load balancing if it is both CPU and memory bound. + // This should be derived from the latest sample or measurement. + // The value may be larger than 1.0 when the usage exceeds the reporter + // dependent notion of soft limits. + ApplicationUtilization float64 `protobuf:"fixed64,9,opt,name=application_utilization,json=applicationUtilization,proto3" json:"application_utilization,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } diff --git a/go/xds/service/orca/v3/orca.pb.go b/go/xds/service/orca/v3/orca.pb.go index 35ac9b6f..071d9bdf 100644 --- a/go/xds/service/orca/v3/orca.pb.go +++ b/go/xds/service/orca/v3/orca.pb.go @@ -24,9 +24,13 @@ const ( ) type OrcaLoadReportRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - ReportInterval *durationpb.Duration `protobuf:"bytes,1,opt,name=report_interval,json=reportInterval,proto3" json:"report_interval,omitempty"` - RequestCostNames []string `protobuf:"bytes,2,rep,name=request_cost_names,json=requestCostNames,proto3" json:"request_cost_names,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Interval for generating Open RCA core metric responses. + ReportInterval *durationpb.Duration `protobuf:"bytes,1,opt,name=report_interval,json=reportInterval,proto3" json:"report_interval,omitempty"` + // Request costs to collect. If this is empty, all known requests costs tracked by + // the load reporting agent will be returned. This provides an opportunity for + // the client to selectively obtain a subset of tracked costs. + RequestCostNames []string `protobuf:"bytes,2,rep,name=request_cost_names,json=requestCostNames,proto3" json:"request_cost_names,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -79,7 +83,7 @@ var File_xds_service_orca_v3_orca_proto protoreflect.FileDescriptor const file_xds_service_orca_v3_orca_proto_rawDesc = "" + "\n" + - "\x1exds/service/orca/v3/orca.proto\x12\x13xds.service.orca.v3\x1a'xds/data/orca/v3/orca_load_report.proto\x1a\x1egoogle/protobuf/duration.proto\"\x89\x01\n" + + "\x1exds/service/orca/v3/orca.proto\x12\x13xds.service.orca.v3\x1a\x1egoogle/protobuf/duration.proto\x1a'xds/data/orca/v3/orca_load_report.proto\"\x89\x01\n" + "\x15OrcaLoadReportRequest\x12B\n" + "\x0freport_interval\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\x0ereportInterval\x12,\n" + "\x12request_cost_names\x18\x02 \x03(\tR\x10requestCostNames2u\n" + diff --git a/go/xds/service/orca/v3/orca_grpc.pb.go b/go/xds/service/orca/v3/orca_grpc.pb.go index f0666e2e..ac7dd91c 100644 --- a/go/xds/service/orca/v3/orca_grpc.pb.go +++ b/go/xds/service/orca/v3/orca_grpc.pb.go @@ -26,6 +26,15 @@ const ( // OpenRcaServiceClient is the client API for OpenRcaService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Out-of-band (OOB) load reporting service for the additional load reporting +// agent that does not sit in the request path. Reports are periodically sampled +// with sufficient frequency to provide temporal association with requests. +// OOB reporting compensates the limitation of in-band reporting in revealing +// costs for backends that do not provide a steady stream of telemetry such as +// long running stream operations and zero QPS services. This is a server +// streaming service, client needs to terminate current RPC and initiate +// a new call to change backend reporting frequency. type OpenRcaServiceClient interface { StreamCoreMetrics(ctx context.Context, in *OrcaLoadReportRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[v3.OrcaLoadReport], error) } @@ -60,6 +69,15 @@ type OpenRcaService_StreamCoreMetricsClient = grpc.ServerStreamingClient[v3.Orca // OpenRcaServiceServer is the server API for OpenRcaService service. // All implementations should embed UnimplementedOpenRcaServiceServer // for forward compatibility. +// +// Out-of-band (OOB) load reporting service for the additional load reporting +// agent that does not sit in the request path. Reports are periodically sampled +// with sufficient frequency to provide temporal association with requests. +// OOB reporting compensates the limitation of in-band reporting in revealing +// costs for backends that do not provide a steady stream of telemetry such as +// long running stream operations and zero QPS services. This is a server +// streaming service, client needs to terminate current RPC and initiate +// a new call to change backend reporting frequency. type OpenRcaServiceServer interface { StreamCoreMetrics(*OrcaLoadReportRequest, grpc.ServerStreamingServer[v3.OrcaLoadReport]) error } diff --git a/go/xds/type/matcher/v3/cel.pb.go b/go/xds/type/matcher/v3/cel.pb.go index b44d6399..364de044 100644 --- a/go/xds/type/matcher/v3/cel.pb.go +++ b/go/xds/type/matcher/v3/cel.pb.go @@ -23,10 +23,28 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Performs a match by evaluating a `Common Expression Language +// `_ (CEL) expression against the standardized set of +// :ref:`HTTP attributes ` specified via “HttpAttributesCelMatchInput“. +// +// .. attention:: +// +// The match is ``true``, iff the result of the evaluation is a bool AND true. +// In all other cases, the match is ``false``, including but not limited to: non-bool types, +// ``false``, ``null``, ``int(1)``, etc. +// In case CEL expression raises an error, the result of the evaluation is interpreted "no match". +// +// Refer to :ref:`Unified Matcher API ` documentation +// for usage details. +// +// [#comment: envoy.matching.matchers.cel_matcher] type CelMatcher struct { - state protoimpl.MessageState `protogen:"open.v1"` - ExprMatch *v3.CelExpression `protobuf:"bytes,1,opt,name=expr_match,json=exprMatch,proto3" json:"expr_match,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Either parsed or checked representation of the CEL program. + ExprMatch *v3.CelExpression `protobuf:"bytes,1,opt,name=expr_match,json=exprMatch,proto3" json:"expr_match,omitempty"` + // Free-form description of the CEL AST, e.g. the original expression text, to be + // used for debugging assistance. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -79,7 +97,7 @@ var File_xds_type_matcher_v3_cel_proto protoreflect.FileDescriptor const file_xds_type_matcher_v3_cel_proto_rawDesc = "" + "\n" + - "\x1dxds/type/matcher/v3/cel.proto\x12\x13xds.type.matcher.v3\x1a\x15xds/type/v3/cel.proto\x1a\x17validate/validate.proto\"s\n" + + "\x1dxds/type/matcher/v3/cel.proto\x12\x13xds.type.matcher.v3\x1a\x17validate/validate.proto\x1a\x15xds/type/v3/cel.proto\"s\n" + "\n" + "CelMatcher\x12C\n" + "\n" + diff --git a/go/xds/type/matcher/v3/domain.pb.go b/go/xds/type/matcher/v3/domain.pb.go index 5154da58..fa7f97ac 100644 --- a/go/xds/type/matcher/v3/domain.pb.go +++ b/go/xds/type/matcher/v3/domain.pb.go @@ -23,8 +23,19 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Matches a fully qualified server name against a set of domain +// names with optional wildcards. type ServerNameMatcher struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState `protogen:"open.v1"` + // Match a server name by multiple domain matchers. Each domain, exact or + // wildcard, must appear at most once across all the domain matchers. + // + // The server name will be matched against all wildcard domains starting from + // the longest suffix, i.e. “www.example.com“ input will be first matched + // against “www.example.com“, then “*.example.com“, then “*.com“, then + // “*“, until the associated matcher action accepts the input. Note that + // wildcards must be on a dot border, and values like “*w.example.com“ are + // invalid. DomainMatchers []*ServerNameMatcher_DomainMatcher `protobuf:"bytes,1,rep,name=domain_matchers,json=domainMatchers,proto3" json:"domain_matchers,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -67,10 +78,18 @@ func (x *ServerNameMatcher) GetDomainMatchers() []*ServerNameMatcher_DomainMatch return nil } +// Specifies a set of exact and wildcard domains and a match action. The +// wildcard symbol “*“ must appear at most once as the left-most part of +// the domain on a dot border. The wildcard matches one or more non-empty +// domain parts. type ServerNameMatcher_DomainMatcher struct { - state protoimpl.MessageState `protogen:"open.v1"` - Domains []string `protobuf:"bytes,1,rep,name=domains,proto3" json:"domains,omitempty"` - OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // A non-empty set of domain names with optional wildcards, e.g. + // “www.example.com“, “*.com“, or “*“. + Domains []string `protobuf:"bytes,1,rep,name=domains,proto3" json:"domains,omitempty"` + // Match action to apply when the server name matches any of the domain + // names in the matcher. + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -123,7 +142,7 @@ var File_xds_type_matcher_v3_domain_proto protoreflect.FileDescriptor const file_xds_type_matcher_v3_domain_proto_rawDesc = "" + "\n" + - " xds/type/matcher/v3/domain.proto\x12\x13xds.type.matcher.v3\x1a\x1fxds/annotations/v3/status.proto\x1a!xds/type/matcher/v3/matcher.proto\x1a\x17validate/validate.proto\"\xe8\x01\n" + + " xds/type/matcher/v3/domain.proto\x12\x13xds.type.matcher.v3\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\x1a!xds/type/matcher/v3/matcher.proto\"\xe8\x01\n" + "\x11ServerNameMatcher\x12]\n" + "\x0fdomain_matchers\x18\x01 \x03(\v24.xds.type.matcher.v3.ServerNameMatcher.DomainMatcherR\x0edomainMatchers\x1at\n" + "\rDomainMatcher\x12\"\n" + diff --git a/go/xds/type/matcher/v3/http_inputs.pb.go b/go/xds/type/matcher/v3/http_inputs.pb.go index 2badad7f..9ac3843e 100644 --- a/go/xds/type/matcher/v3/http_inputs.pb.go +++ b/go/xds/type/matcher/v3/http_inputs.pb.go @@ -21,6 +21,16 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Specifies that matching should be performed on the set of :ref:`HTTP attributes +// `. +// +// The attributes will be exposed via `Common Expression Language +// `_ runtime to associated CEL matcher. +// +// Refer to :ref:`Unified Matcher API ` documentation +// for usage details. +// +// [#comment: envoy.matching.inputs.cel_data_input] type HttpAttributesCelMatchInput struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields diff --git a/go/xds/type/matcher/v3/ip.pb.go b/go/xds/type/matcher/v3/ip.pb.go index 3b0fd22b..a0c962c0 100644 --- a/go/xds/type/matcher/v3/ip.pb.go +++ b/go/xds/type/matcher/v3/ip.pb.go @@ -24,8 +24,10 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Matches a specific IP address against a set of possibly overlapping subnets using a trie. type IPMatcher struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState `protogen:"open.v1"` + // Match IP address by CIDR ranges. RangeMatchers []*IPMatcher_IPRangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -68,11 +70,32 @@ func (x *IPMatcher) GetRangeMatchers() []*IPMatcher_IPRangeMatcher { return nil } +// Specifies a list of IP address ranges and a match action. type IPMatcher_IPRangeMatcher struct { - state protoimpl.MessageState `protogen:"open.v1"` - Ranges []*v3.CidrRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` - OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` - Exclusive bool `protobuf:"varint,3,opt,name=exclusive,proto3" json:"exclusive,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // A non-empty set of CIDR ranges. + Ranges []*v3.CidrRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` + // Match action to apply when the IP address is within one of the CIDR ranges. + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` + // Indicates whether this match option should be considered if there is a + // more specific matcher. Exclusive matchers are not selected whenever a + // more specific matcher exists (e.g. matcher with a longer prefix) even + // when the more specific matcher fails its nested match condition. + // Non-exclusive matchers are considered if the more specific matcher + // exists but its nested match condition does not entirely match. + // Non-exclusive matchers are selected in the order of their specificity + // first (longest prefix first), then the order of declaration next. + // + // For example, consider two range matchers: an exclusive matcher *X* on + // “0.0.0.0/0“ and a matcher *Y* on “192.0.0.0/2“ with a nested match + // condition *Z*. For the input IP “192.168.0.1“ matcher *Y* is the most + // specific. If its nested match condition *Z* does not accept the input, + // then the less specific matcher *X* does not apply either despite the + // input being within the range, because matcher *X* is exclusive. + // + // The opposite is true if matcher *X* is not marked as exclusive. In that + // case matcher *X* always matches whenever matcher "*Y* rejects the input. + Exclusive bool `protobuf:"varint,3,opt,name=exclusive,proto3" json:"exclusive,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -132,7 +155,7 @@ var File_xds_type_matcher_v3_ip_proto protoreflect.FileDescriptor const file_xds_type_matcher_v3_ip_proto_rawDesc = "" + "\n" + - "\x1cxds/type/matcher/v3/ip.proto\x12\x13xds.type.matcher.v3\x1a\x1fxds/annotations/v3/status.proto\x1a\x16xds/core/v3/cidr.proto\x1a!xds/type/matcher/v3/matcher.proto\x1a\x17validate/validate.proto\"\x8d\x02\n" + + "\x1cxds/type/matcher/v3/ip.proto\x12\x13xds.type.matcher.v3\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\x16xds/core/v3/cidr.proto\x1a!xds/type/matcher/v3/matcher.proto\"\x8d\x02\n" + "\tIPMatcher\x12T\n" + "\x0erange_matchers\x18\x01 \x03(\v2-.xds.type.matcher.v3.IPMatcher.IPRangeMatcherR\rrangeMatchers\x1a\xa9\x01\n" + "\x0eIPRangeMatcher\x128\n" + diff --git a/go/xds/type/matcher/v3/matcher.pb.go b/go/xds/type/matcher/v3/matcher.pb.go index 707269b2..3bdf757d 100644 --- a/go/xds/type/matcher/v3/matcher.pb.go +++ b/go/xds/type/matcher/v3/matcher.pb.go @@ -23,14 +23,22 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// A matcher, which may traverse a matching tree in order to result in a match action. +// During matching, the tree will be traversed until a match is found, or if no match +// is found the action specified by the most specific on_no_match will be evaluated. +// As an on_no_match might result in another matching tree being evaluated, this process +// might repeat several times until the final OnMatch (or no match) is decided. type Matcher struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to MatcherType: // // *Matcher_MatcherList_ // *Matcher_MatcherTree_ - MatcherType isMatcher_MatcherType `protobuf_oneof:"matcher_type"` - OnNoMatch *Matcher_OnMatch `protobuf:"bytes,3,opt,name=on_no_match,json=onNoMatch,proto3" json:"on_no_match,omitempty"` + MatcherType isMatcher_MatcherType `protobuf_oneof:"matcher_type"` + // Optional OnMatch to use if no matcher above matched (e.g., if there are no matchers specified + // above, or if none of the matches specified above succeeded). + // If no matcher above matched and this field is not populated, the match will be considered unsuccessful. + OnNoMatch *Matcher_OnMatch `protobuf:"bytes,3,opt,name=on_no_match,json=onNoMatch,proto3" json:"on_no_match,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -102,10 +110,12 @@ type isMatcher_MatcherType interface { } type Matcher_MatcherList_ struct { + // A linear list of matchers to evaluate. MatcherList *Matcher_MatcherList `protobuf:"bytes,1,opt,name=matcher_list,json=matcherList,proto3,oneof"` } type Matcher_MatcherTree_ struct { + // A match tree to evaluate. MatcherTree *Matcher_MatcherTree `protobuf:"bytes,2,opt,name=matcher_tree,json=matcherTree,proto3,oneof"` } @@ -113,14 +123,21 @@ func (*Matcher_MatcherList_) isMatcher_MatcherType() {} func (*Matcher_MatcherTree_) isMatcher_MatcherType() {} +// What to do if a match is successful. type Matcher_OnMatch struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to OnMatch: // // *Matcher_OnMatch_Matcher // *Matcher_OnMatch_Action - OnMatch isMatcher_OnMatch_OnMatch `protobuf_oneof:"on_match"` - KeepMatching bool `protobuf:"varint,3,opt,name=keep_matching,json=keepMatching,proto3" json:"keep_matching,omitempty"` + OnMatch isMatcher_OnMatch_OnMatch `protobuf_oneof:"on_match"` + // If true and the Matcher matches, the action will be taken but the caller + // will behave as if the Matcher did not match. A subsequent matcher or + // on_no_match action will be used instead. + // This field is not supported in all contexts in which the matcher API is + // used. If this field is set in a context in which it's not supported, + // the resource will be rejected. + KeepMatching bool `protobuf:"varint,3,opt,name=keep_matching,json=keepMatching,proto3" json:"keep_matching,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -192,10 +209,16 @@ type isMatcher_OnMatch_OnMatch interface { } type Matcher_OnMatch_Matcher struct { + // Nested matcher to evaluate. + // If the nested matcher does not match and does not specify + // on_no_match, then this matcher is considered not to have + // matched, even if a predicate at this level or above returned + // true. Matcher *Matcher `protobuf:"bytes,1,opt,name=matcher,proto3,oneof"` } type Matcher_OnMatch_Action struct { + // Protocol-specific action to take. Action *v3.TypedExtensionConfig `protobuf:"bytes,2,opt,name=action,proto3,oneof"` } @@ -203,8 +226,12 @@ func (*Matcher_OnMatch_Matcher) isMatcher_OnMatch_OnMatch() {} func (*Matcher_OnMatch_Action) isMatcher_OnMatch_OnMatch() {} +// A linear list of field matchers. +// The field matchers are evaluated in order, and the first match +// wins. type Matcher_MatcherList struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState `protogen:"open.v1"` + // A list of matchers. First match wins. Matchers []*Matcher_MatcherList_FieldMatcher `protobuf:"bytes,1,rep,name=matchers,proto3" json:"matchers,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -248,8 +275,13 @@ func (x *Matcher_MatcherList) GetMatchers() []*Matcher_MatcherList_FieldMatcher } type Matcher_MatcherTree struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState `protogen:"open.v1"` + // Protocol-specific specification of input field to match on. Input *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` + // Exact or prefix match maps in which to look up the input value. + // If the lookup succeeds, the match is considered successful, and + // the corresponding OnMatch is used. + // // Types that are valid to be assigned to TreeType: // // *Matcher_MatcherTree_ExactMatchMap @@ -340,10 +372,12 @@ type Matcher_MatcherTree_ExactMatchMap struct { } type Matcher_MatcherTree_PrefixMatchMap struct { + // Longest matching prefix wins. PrefixMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,3,opt,name=prefix_match_map,json=prefixMatchMap,proto3,oneof"` } type Matcher_MatcherTree_CustomMatch struct { + // Extension for custom matching logic. CustomMatch *v3.TypedExtensionConfig `protobuf:"bytes,4,opt,name=custom_match,json=customMatch,proto3,oneof"` } @@ -353,6 +387,7 @@ func (*Matcher_MatcherTree_PrefixMatchMap) isMatcher_MatcherTree_TreeType() {} func (*Matcher_MatcherTree_CustomMatch) isMatcher_MatcherTree_TreeType() {} +// Predicate to determine if a match is successful. type Matcher_MatcherList_Predicate struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to MatchType: @@ -444,18 +479,22 @@ type isMatcher_MatcherList_Predicate_MatchType interface { } type Matcher_MatcherList_Predicate_SinglePredicate_ struct { + // A single predicate to evaluate. SinglePredicate *Matcher_MatcherList_Predicate_SinglePredicate `protobuf:"bytes,1,opt,name=single_predicate,json=singlePredicate,proto3,oneof"` } type Matcher_MatcherList_Predicate_OrMatcher struct { + // A list of predicates to be OR-ed together. OrMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,2,opt,name=or_matcher,json=orMatcher,proto3,oneof"` } type Matcher_MatcherList_Predicate_AndMatcher struct { + // A list of predicates to be AND-ed together. AndMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,3,opt,name=and_matcher,json=andMatcher,proto3,oneof"` } type Matcher_MatcherList_Predicate_NotMatcher struct { + // The invert of a predicate NotMatcher *Matcher_MatcherList_Predicate `protobuf:"bytes,4,opt,name=not_matcher,json=notMatcher,proto3,oneof"` } @@ -467,10 +506,13 @@ func (*Matcher_MatcherList_Predicate_AndMatcher) isMatcher_MatcherList_Predicate func (*Matcher_MatcherList_Predicate_NotMatcher) isMatcher_MatcherList_Predicate_MatchType() {} +// An individual matcher. type Matcher_MatcherList_FieldMatcher struct { - state protoimpl.MessageState `protogen:"open.v1"` - Predicate *Matcher_MatcherList_Predicate `protobuf:"bytes,1,opt,name=predicate,proto3" json:"predicate,omitempty"` - OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Determines if the match succeeds. + Predicate *Matcher_MatcherList_Predicate `protobuf:"bytes,1,opt,name=predicate,proto3" json:"predicate,omitempty"` + // What to do if the match succeeds. + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -519,8 +561,11 @@ func (x *Matcher_MatcherList_FieldMatcher) GetOnMatch() *Matcher_OnMatch { return nil } +// Predicate for a single input field. type Matcher_MatcherList_Predicate_SinglePredicate struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState `protogen:"open.v1"` + // Protocol-specific specification of input field to match on. + // [#extension-category: envoy.matching.common_inputs] Input *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // Types that are valid to be assigned to Matcher: // @@ -598,10 +643,13 @@ type isMatcher_MatcherList_Predicate_SinglePredicate_Matcher interface { } type Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch struct { + // Built-in string matcher. ValueMatch *StringMatcher `protobuf:"bytes,2,opt,name=value_match,json=valueMatch,proto3,oneof"` } type Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch struct { + // Extension for custom matching logic. + // [#extension-category: envoy.matching.input_matchers] CustomMatch *v3.TypedExtensionConfig `protobuf:"bytes,3,opt,name=custom_match,json=customMatch,proto3,oneof"` } @@ -611,6 +659,7 @@ func (*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch) isMatcher_Match func (*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() { } +// A list of two or more matchers. Used to allow using a list within a oneof. type Matcher_MatcherList_Predicate_PredicateList struct { state protoimpl.MessageState `protogen:"open.v1"` Predicate []*Matcher_MatcherList_Predicate `protobuf:"bytes,1,rep,name=predicate,proto3" json:"predicate,omitempty"` @@ -655,6 +704,7 @@ func (x *Matcher_MatcherList_Predicate_PredicateList) GetPredicate() []*Matcher_ return nil } +// A map of configured matchers. Used to allow using a map within a oneof. type Matcher_MatcherTree_MatchMap struct { state protoimpl.MessageState `protogen:"open.v1"` Map map[string]*Matcher_OnMatch `protobuf:"bytes,1,rep,name=map,proto3" json:"map,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` @@ -703,7 +753,7 @@ var File_xds_type_matcher_v3_matcher_proto protoreflect.FileDescriptor const file_xds_type_matcher_v3_matcher_proto_rawDesc = "" + "\n" + - "!xds/type/matcher/v3/matcher.proto\x12\x13xds.type.matcher.v3\x1a\x1bxds/core/v3/extension.proto\x1a xds/type/matcher/v3/string.proto\x1a\x17validate/validate.proto\"\x9b\x10\n" + + "!xds/type/matcher/v3/matcher.proto\x12\x13xds.type.matcher.v3\x1a\x17validate/validate.proto\x1a\x1bxds/core/v3/extension.proto\x1a xds/type/matcher/v3/string.proto\"\x9b\x10\n" + "\aMatcher\x12M\n" + "\fmatcher_list\x18\x01 \x01(\v2(.xds.type.matcher.v3.Matcher.MatcherListH\x00R\vmatcherList\x12M\n" + "\fmatcher_tree\x18\x02 \x01(\v2(.xds.type.matcher.v3.Matcher.MatcherTreeH\x00R\vmatcherTree\x12D\n" + diff --git a/go/xds/type/matcher/v3/range.pb.go b/go/xds/type/matcher/v3/range.pb.go index 6128c727..f6b5ca84 100644 --- a/go/xds/type/matcher/v3/range.pb.go +++ b/go/xds/type/matcher/v3/range.pb.go @@ -23,8 +23,12 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Specifies a set of ranges for matching an int64 number and the associated +// match actions. type Int64RangeMatcher struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState `protogen:"open.v1"` + // Match a number by a list of number ranges. If multiple ranges contain the + // input number, then the first action in this list is taken. RangeMatchers []*Int64RangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -67,8 +71,12 @@ func (x *Int64RangeMatcher) GetRangeMatchers() []*Int64RangeMatcher_RangeMatcher return nil } +// Specifies a set of ranges for matching an int32 number and the associated +// match actions. type Int32RangeMatcher struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState `protogen:"open.v1"` + // Match a number by a list of number ranges. If multiple ranges contain the + // input number, then the first action in this list is taken. RangeMatchers []*Int32RangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -111,8 +119,12 @@ func (x *Int32RangeMatcher) GetRangeMatchers() []*Int32RangeMatcher_RangeMatcher return nil } +// Specifies a set of ranges for matching a double number and the associated +// match actions. type DoubleRangeMatcher struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState `protogen:"open.v1"` + // Match a number by a list of number ranges. If multiple ranges contain the + // input number, then the first action in this list is taken. RangeMatchers []*DoubleRangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -155,10 +167,13 @@ func (x *DoubleRangeMatcher) GetRangeMatchers() []*DoubleRangeMatcher_RangeMatch return nil } +// Specifies a list of number ranges and a match action. type Int64RangeMatcher_RangeMatcher struct { - state protoimpl.MessageState `protogen:"open.v1"` - Ranges []*v3.Int64Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` - OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // A non-empty set of int64 ranges. + Ranges []*v3.Int64Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` + // Match action to apply when the input number is within one of the ranges. + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -207,10 +222,13 @@ func (x *Int64RangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch { return nil } +// Specifies a list of number ranges and a match action. type Int32RangeMatcher_RangeMatcher struct { - state protoimpl.MessageState `protogen:"open.v1"` - Ranges []*v3.Int32Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` - OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // A non-empty set of int32 ranges. + Ranges []*v3.Int32Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` + // Match action to apply when the input number is within one of the ranges. + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -259,10 +277,13 @@ func (x *Int32RangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch { return nil } +// Specifies a list of number ranges and a match action. type DoubleRangeMatcher_RangeMatcher struct { - state protoimpl.MessageState `protogen:"open.v1"` - Ranges []*v3.DoubleRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` - OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // A non-empty set of double ranges. + Ranges []*v3.DoubleRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` + // Match action to apply when the input number is within one of the ranges. + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -315,7 +336,7 @@ var File_xds_type_matcher_v3_range_proto protoreflect.FileDescriptor const file_xds_type_matcher_v3_range_proto_rawDesc = "" + "\n" + - "\x1fxds/type/matcher/v3/range.proto\x12\x13xds.type.matcher.v3\x1a\x17xds/type/v3/range.proto\x1a!xds/type/matcher/v3/matcher.proto\x1a\x17validate/validate.proto\"\xfc\x01\n" + + "\x1fxds/type/matcher/v3/range.proto\x12\x13xds.type.matcher.v3\x1a\x17validate/validate.proto\x1a!xds/type/matcher/v3/matcher.proto\x1a\x17xds/type/v3/range.proto\"\xfc\x01\n" + "\x11Int64RangeMatcher\x12Z\n" + "\x0erange_matchers\x18\x01 \x03(\v23.xds.type.matcher.v3.Int64RangeMatcher.RangeMatcherR\rrangeMatchers\x1a\x8a\x01\n" + "\fRangeMatcher\x129\n" + diff --git a/go/xds/type/matcher/v3/regex.pb.go b/go/xds/type/matcher/v3/regex.pb.go index a83f7f82..f8217078 100644 --- a/go/xds/type/matcher/v3/regex.pb.go +++ b/go/xds/type/matcher/v3/regex.pb.go @@ -22,13 +22,16 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// A regex matcher designed for safety when used with untrusted input. type RegexMatcher struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to EngineType: // // *RegexMatcher_GoogleRe2 - EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"` - Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"` + EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"` + // The regex match string. The string must be supported by the configured + // engine. + Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -91,11 +94,30 @@ type isRegexMatcher_EngineType interface { } type RegexMatcher_GoogleRe2 struct { + // Google's RE2 regex engine. GoogleRe2 *RegexMatcher_GoogleRE2 `protobuf:"bytes,1,opt,name=google_re2,json=googleRe2,proto3,oneof"` } func (*RegexMatcher_GoogleRe2) isRegexMatcher_EngineType() {} +// Google's `RE2 `_ regex engine. The regex +// string must adhere to the documented `syntax +// `_. The engine is designed to +// complete execution in linear time as well as limit the amount of memory +// used. +// +// Envoy supports program size checking via runtime. The runtime keys +// `re2.max_program_size.error_level` and `re2.max_program_size.warn_level` +// can be set to integers as the maximum program size or complexity that a +// compiled regex can have before an exception is thrown or a warning is +// logged, respectively. `re2.max_program_size.error_level` defaults to 100, +// and `re2.max_program_size.warn_level` has no default if unset (will not +// check/log a warning). +// +// Envoy emits two stats for tracking the program size of regexes: the +// histogram `re2.program_size`, which records the program size, and the +// counter `re2.exceeded_warn_level`, which is incremented each time the +// program size exceeds the warn level threshold. type RegexMatcher_GoogleRE2 struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields diff --git a/go/xds/type/matcher/v3/string.pb.go b/go/xds/type/matcher/v3/string.pb.go index 4670fc90..d6de4907 100644 --- a/go/xds/type/matcher/v3/string.pb.go +++ b/go/xds/type/matcher/v3/string.pb.go @@ -23,6 +23,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Specifies the way to match a string. +// [#next-free-field: 9] type StringMatcher struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to MatchPattern: @@ -33,8 +35,11 @@ type StringMatcher struct { // *StringMatcher_SafeRegex // *StringMatcher_Contains // *StringMatcher_Custom - MatchPattern isStringMatcher_MatchPattern `protobuf_oneof:"match_pattern"` - IgnoreCase bool `protobuf:"varint,6,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"` + MatchPattern isStringMatcher_MatchPattern `protobuf_oneof:"match_pattern"` + // If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no + // effect for the safe_regex match. + // For example, the matcher *data* will match both input string *Data* and *data* if set to true. + IgnoreCase bool `protobuf:"varint,6,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -142,26 +147,52 @@ type isStringMatcher_MatchPattern interface { } type StringMatcher_Exact struct { + // The input string must match exactly the string specified here. + // + // Examples: + // + // * *abc* only matches the value *abc*. Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"` } type StringMatcher_Prefix struct { + // The input string must have the prefix specified here. + // Note: empty prefix is not allowed, please use regex instead. + // + // Examples: + // + // * *abc* matches the value *abc.xyz* Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"` } type StringMatcher_Suffix struct { + // The input string must have the suffix specified here. + // Note: empty prefix is not allowed, please use regex instead. + // + // Examples: + // + // * *abc* matches the value *xyz.abc* Suffix string `protobuf:"bytes,3,opt,name=suffix,proto3,oneof"` } type StringMatcher_SafeRegex struct { + // The input string must match the regular expression specified here. SafeRegex *RegexMatcher `protobuf:"bytes,5,opt,name=safe_regex,json=safeRegex,proto3,oneof"` } type StringMatcher_Contains struct { + // The input string must have the substring specified here. + // Note: empty contains match is not allowed, please use regex instead. + // + // Examples: + // + // * *abc* matches the value *xyz.abc.def* Contains string `protobuf:"bytes,7,opt,name=contains,proto3,oneof"` } type StringMatcher_Custom struct { + // Use an extension as the matcher type. + // [#extension-category: envoy.string_matcher] Custom *v3.TypedExtensionConfig `protobuf:"bytes,8,opt,name=custom,proto3,oneof"` } @@ -177,6 +208,7 @@ func (*StringMatcher_Contains) isStringMatcher_MatchPattern() {} func (*StringMatcher_Custom) isStringMatcher_MatchPattern() {} +// Specifies a list of ways to match a string. type ListStringMatcher struct { state protoimpl.MessageState `protogen:"open.v1"` Patterns []*StringMatcher `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"` @@ -225,7 +257,7 @@ var File_xds_type_matcher_v3_string_proto protoreflect.FileDescriptor const file_xds_type_matcher_v3_string_proto_rawDesc = "" + "\n" + - " xds/type/matcher/v3/string.proto\x12\x13xds.type.matcher.v3\x1a\x1bxds/core/v3/extension.proto\x1a\x1fxds/type/matcher/v3/regex.proto\x1a\x17validate/validate.proto\"\xd6\x02\n" + + " xds/type/matcher/v3/string.proto\x12\x13xds.type.matcher.v3\x1a\x17validate/validate.proto\x1a\x1bxds/core/v3/extension.proto\x1a\x1fxds/type/matcher/v3/regex.proto\"\xd6\x02\n" + "\rStringMatcher\x12\x16\n" + "\x05exact\x18\x01 \x01(\tH\x00R\x05exact\x12!\n" + "\x06prefix\x18\x02 \x01(\tB\a\xfaB\x04r\x02\x10\x01H\x00R\x06prefix\x12!\n" + diff --git a/go/xds/type/v3/cel.pb.go b/go/xds/type/v3/cel.pb.go index c87d121e..de8b1860 100644 --- a/go/xds/type/v3/cel.pb.go +++ b/go/xds/type/v3/cel.pb.go @@ -26,18 +26,31 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Either parsed or checked representation of the `Common Expression Language +// `_ (CEL) program. type CelExpression struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to ExprSpecifier: // // *CelExpression_ParsedExpr // *CelExpression_CheckedExpr - ExprSpecifier isCelExpression_ExprSpecifier `protobuf_oneof:"expr_specifier"` - CelExprParsed *expr.ParsedExpr `protobuf:"bytes,3,opt,name=cel_expr_parsed,json=celExprParsed,proto3" json:"cel_expr_parsed,omitempty"` - CelExprChecked *expr.CheckedExpr `protobuf:"bytes,4,opt,name=cel_expr_checked,json=celExprChecked,proto3" json:"cel_expr_checked,omitempty"` - CelExprString string `protobuf:"bytes,5,opt,name=cel_expr_string,json=celExprString,proto3" json:"cel_expr_string,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + ExprSpecifier isCelExpression_ExprSpecifier `protobuf_oneof:"expr_specifier"` + // Parsed expression in abstract syntax tree (AST) form. + // + // If “cel_expr_checked“ is set, this field is not used. + CelExprParsed *expr.ParsedExpr `protobuf:"bytes,3,opt,name=cel_expr_parsed,json=celExprParsed,proto3" json:"cel_expr_parsed,omitempty"` + // Parsed expression in abstract syntax tree (AST) form that has been successfully type checked. + // + // If set, takes precedence over “cel_expr_parsed“. + CelExprChecked *expr.CheckedExpr `protobuf:"bytes,4,opt,name=cel_expr_checked,json=celExprChecked,proto3" json:"cel_expr_checked,omitempty"` + // Unparsed expression in string form. For example, “request.headers['x-env'] == 'prod'“ will + // get “x-env“ header value and compare it with “prod“. + // Check the `Common Expression Language `_ for more details. + // + // If set, takes precedence over “cel_expr_parsed“ and “cel_expr_checked“. + CelExprString string `protobuf:"bytes,5,opt,name=cel_expr_string,json=celExprString,proto3" json:"cel_expr_string,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CelExpression) Reset() { @@ -123,11 +136,21 @@ type isCelExpression_ExprSpecifier interface { } type CelExpression_ParsedExpr struct { + // Parsed expression in abstract syntax tree (AST) form. + // + // Deprecated -- use “cel_expr_parsed“ field instead. + // If “cel_expr_parsed“ or “cel_expr_checked“ is set, this field is not used. + // // Deprecated: Marked as deprecated in xds/type/v3/cel.proto. ParsedExpr *v1alpha1.ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3,oneof"` } type CelExpression_CheckedExpr struct { + // Parsed expression in abstract syntax tree (AST) form that has been successfully type checked. + // + // Deprecated -- use “cel_expr_checked“ field instead. + // If “cel_expr_parsed“ or “cel_expr_checked“ is set, this field is not used. + // // Deprecated: Marked as deprecated in xds/type/v3/cel.proto. CheckedExpr *v1alpha1.CheckedExpr `protobuf:"bytes,2,opt,name=checked_expr,json=checkedExpr,proto3,oneof"` } @@ -136,9 +159,23 @@ func (*CelExpression_ParsedExpr) isCelExpression_ExprSpecifier() {} func (*CelExpression_CheckedExpr) isCelExpression_ExprSpecifier() {} +// Extracts a string by evaluating a `Common Expression Language +// `_ (CEL) expression against the standardized set of +// :ref:`HTTP attributes `. +// +// .. attention:: +// +// Besides CEL evaluation raising an error explicitly, CEL program returning a type other than +// the ``string``, or not returning anything, are considered an error as well. +// +// [#comment:TODO(sergiitk): When implemented, add the extension tag.] type CelExtractString struct { - state protoimpl.MessageState `protogen:"open.v1"` - ExprExtract *CelExpression `protobuf:"bytes,1,opt,name=expr_extract,json=exprExtract,proto3" json:"expr_extract,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // The CEL expression used to extract a string from the CEL environment. + // the "subject string") that should be replaced. + ExprExtract *CelExpression `protobuf:"bytes,1,opt,name=expr_extract,json=exprExtract,proto3" json:"expr_extract,omitempty"` + // If CEL expression evaluates to an error, this value is be returned to the caller. + // If not set, the error is propagated to the caller. DefaultValue *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -192,7 +229,7 @@ var File_xds_type_v3_cel_proto protoreflect.FileDescriptor const file_xds_type_v3_cel_proto_rawDesc = "" + "\n" + - "\x15xds/type/v3/cel.proto\x12\vxds.type.v3\x1a&google/api/expr/v1alpha1/checked.proto\x1a%google/api/expr/v1alpha1/syntax.proto\x1a\x16cel/expr/checked.proto\x1a\x15cel/expr/syntax.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\x17validate/validate.proto\"\xe5\x02\n" + + "\x15xds/type/v3/cel.proto\x12\vxds.type.v3\x1a\x16cel/expr/checked.proto\x1a\x15cel/expr/syntax.proto\x1a&google/api/expr/v1alpha1/checked.proto\x1a%google/api/expr/v1alpha1/syntax.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\"\xe5\x02\n" + "\rCelExpression\x12K\n" + "\vparsed_expr\x18\x01 \x01(\v2$.google.api.expr.v1alpha1.ParsedExprB\x02\x18\x01H\x00R\n" + "parsedExpr\x12N\n" + diff --git a/go/xds/type/v3/range.pb.go b/go/xds/type/v3/range.pb.go index 8430f0cc..ed4c6f14 100644 --- a/go/xds/type/v3/range.pb.go +++ b/go/xds/type/v3/range.pb.go @@ -21,10 +21,14 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Specifies the int64 start and end of the range using half-open interval +// semantics [start, end). type Int64Range struct { - state protoimpl.MessageState `protogen:"open.v1"` - Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` - End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // start of the range (inclusive) + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + // end of the range (exclusive) + End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -73,10 +77,14 @@ func (x *Int64Range) GetEnd() int64 { return 0 } +// Specifies the int32 start and end of the range using half-open interval +// semantics [start, end). type Int32Range struct { - state protoimpl.MessageState `protogen:"open.v1"` - Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` - End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // start of the range (inclusive) + Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + // end of the range (exclusive) + End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -125,10 +133,14 @@ func (x *Int32Range) GetEnd() int32 { return 0 } +// Specifies the double start and end of the range using half-open interval +// semantics [start, end). type DoubleRange struct { - state protoimpl.MessageState `protogen:"open.v1"` - Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"` - End float64 `protobuf:"fixed64,2,opt,name=end,proto3" json:"end,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // start of the range (inclusive) + Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"` + // end of the range (exclusive) + End float64 `protobuf:"fixed64,2,opt,name=end,proto3" json:"end,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } diff --git a/go/xds/type/v3/typed_struct.pb.go b/go/xds/type/v3/typed_struct.pb.go index 8d0d70ff..c3068467 100644 --- a/go/xds/type/v3/typed_struct.pb.go +++ b/go/xds/type/v3/typed_struct.pb.go @@ -22,10 +22,38 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// A TypedStruct contains an arbitrary JSON serialized protocol buffer message with a URL that +// describes the type of the serialized message. This is very similar to google.protobuf.Any, +// instead of having protocol buffer binary, this employs google.protobuf.Struct as value. +// +// This message is intended to be embedded inside Any, so it shouldn't be directly referred +// from other UDPA messages. +// +// When packing an opaque extension config, packing the expected type into Any is preferred +// wherever possible for its efficiency. TypedStruct should be used only if a proto descriptor +// is not available, for example if: +// +// - A control plane sends opaque message that is originally from external source in human readable +// format such as JSON or YAML. +// - The control plane doesn't have the knowledge of the protocol buffer schema hence it cannot +// serialize the message in protocol buffer binary format. +// - The DPLB doesn't have have the knowledge of the protocol buffer schema its plugin or extension +// uses. This has to be indicated in the DPLB capability negotiation. +// +// When a DPLB receives a TypedStruct in Any, it should: +// - Check if the type_url of the TypedStruct matches the type the extension expects. +// - Convert value to the type described in type_url and perform validation. +// +// TODO(lizan): Figure out how TypeStruct should be used with DPLB extensions that doesn't link +// protobuf descriptor with DPLB itself, (e.g. gRPC LB Plugin, Envoy WASM extensions). type TypedStruct struct { - state protoimpl.MessageState `protogen:"open.v1"` - TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - Value *structpb.Struct `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // A URL that uniquely identifies the type of the serialize protocol buffer message. + // This has same semantics and format described in google.protobuf.Any: + // https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto + TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + // A JSON representation of the above specified type. + Value *structpb.Struct `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } diff --git a/python/udpa/annotations/security_pb2.py b/python/udpa/annotations/security_pb2.py index 971a7f60..b4faf9ce 100644 --- a/python/udpa/annotations/security_pb2.py +++ b/python/udpa/annotations/security_pb2.py @@ -22,11 +22,11 @@ _sym_db = _symbol_database.Default() -from udpa.annotations import status_pb2 as udpa_dot_annotations_dot_status__pb2 from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 +from udpa.annotations import status_pb2 as udpa_dot_annotations_dot_status__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fudpa/annotations/security.proto\x12\x10udpa.annotations\x1a\x1dudpa/annotations/status.proto\x1a google/protobuf/descriptor.proto\"o\n\x17\x46ieldSecurityAnnotation\x12*\n\"configure_for_untrusted_downstream\x18\x01 \x01(\x08\x12(\n configure_for_untrusted_upstream\x18\x02 \x01(\x08:]\n\x08security\x12\x1d.google.protobuf.FieldOptions\x18\xb1\xf2\xa6\x05 \x01(\x0b\x32).udpa.annotations.FieldSecurityAnnotationB1Z\'github.com/cncf/xds/go/udpa/annotations\xba\x80\xc8\xd1\x06\x02\x08\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fudpa/annotations/security.proto\x12\x10udpa.annotations\x1a google/protobuf/descriptor.proto\x1a\x1dudpa/annotations/status.proto\"o\n\x17\x46ieldSecurityAnnotation\x12*\n\"configure_for_untrusted_downstream\x18\x01 \x01(\x08\x12(\n configure_for_untrusted_upstream\x18\x02 \x01(\x08:]\n\x08security\x12\x1d.google.protobuf.FieldOptions\x18\xb1\xf2\xa6\x05 \x01(\x0b\x32).udpa.annotations.FieldSecurityAnnotationB1Z\'github.com/cncf/xds/go/udpa/annotations\xba\x80\xc8\xd1\x06\x02\x08\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/udpa/service/orca/v1/orca_pb2.py b/python/udpa/service/orca/v1/orca_pb2.py index d32dd33a..b57dab0a 100644 --- a/python/udpa/service/orca/v1/orca_pb2.py +++ b/python/udpa/service/orca/v1/orca_pb2.py @@ -22,11 +22,11 @@ _sym_db = _symbol_database.Default() -from udpa.data.orca.v1 import orca_load_report_pb2 as udpa_dot_data_dot_orca_dot_v1_dot_orca__load__report__pb2 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from udpa.data.orca.v1 import orca_load_report_pb2 as udpa_dot_data_dot_orca_dot_v1_dot_orca__load__report__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fudpa/service/orca/v1/orca.proto\x12\x14udpa.service.orca.v1\x1a(udpa/data/orca/v1/orca_load_report.proto\x1a\x1egoogle/protobuf/duration.proto\"g\n\x15OrcaLoadReportRequest\x12\x32\n\x0freport_interval\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12request_cost_names\x18\x02 \x03(\t2w\n\x0eOpenRcaService\x12\x65\n\x11StreamCoreMetrics\x12+.udpa.service.orca.v1.OrcaLoadReportRequest\x1a!.udpa.data.orca.v1.OrcaLoadReport0\x01\x42`\n$com.github.udpa.udpa.service.orca.v1B\tOrcaProtoP\x01Z+github.com/cncf/xds/go/udpa/service/orca/v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fudpa/service/orca/v1/orca.proto\x12\x14udpa.service.orca.v1\x1a\x1egoogle/protobuf/duration.proto\x1a(udpa/data/orca/v1/orca_load_report.proto\"g\n\x15OrcaLoadReportRequest\x12\x32\n\x0freport_interval\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12request_cost_names\x18\x02 \x03(\t2w\n\x0eOpenRcaService\x12\x65\n\x11StreamCoreMetrics\x12+.udpa.service.orca.v1.OrcaLoadReportRequest\x1a!.udpa.data.orca.v1.OrcaLoadReport0\x01\x42`\n$com.github.udpa.udpa.service.orca.v1B\tOrcaProtoP\x01Z+github.com/cncf/xds/go/udpa/service/orca/v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/annotations/v3/security_pb2.py b/python/xds/annotations/v3/security_pb2.py index fcf97af8..54ef9c51 100644 --- a/python/xds/annotations/v3/security_pb2.py +++ b/python/xds/annotations/v3/security_pb2.py @@ -22,11 +22,11 @@ _sym_db = _symbol_database.Default() -from xds.annotations.v3 import status_pb2 as xds_dot_annotations_dot_v3_dot_status__pb2 from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 +from xds.annotations.v3 import status_pb2 as xds_dot_annotations_dot_v3_dot_status__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!xds/annotations/v3/security.proto\x12\x12xds.annotations.v3\x1a\x1fxds/annotations/v3/status.proto\x1a google/protobuf/descriptor.proto\"o\n\x17\x46ieldSecurityAnnotation\x12*\n\"configure_for_untrusted_downstream\x18\x01 \x01(\x08\x12(\n configure_for_untrusted_upstream\x18\x02 \x01(\x08:_\n\x08security\x12\x1d.google.protobuf.FieldOptions\x18\xa7\x96\x9d/ \x01(\x0b\x32+.xds.annotations.v3.FieldSecurityAnnotationB3Z)github.com/cncf/xds/go/xds/annotations/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!xds/annotations/v3/security.proto\x12\x12xds.annotations.v3\x1a google/protobuf/descriptor.proto\x1a\x1fxds/annotations/v3/status.proto\"o\n\x17\x46ieldSecurityAnnotation\x12*\n\"configure_for_untrusted_downstream\x18\x01 \x01(\x08\x12(\n configure_for_untrusted_upstream\x18\x02 \x01(\x08:_\n\x08security\x12\x1d.google.protobuf.FieldOptions\x18\xa7\x96\x9d/ \x01(\x0b\x32+.xds.annotations.v3.FieldSecurityAnnotationB3Z)github.com/cncf/xds/go/xds/annotations/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/core/v3/authority_pb2.py b/python/xds/core/v3/authority_pb2.py index 355be07d..bfaf4d99 100644 --- a/python/xds/core/v3/authority_pb2.py +++ b/python/xds/core/v3/authority_pb2.py @@ -22,11 +22,11 @@ _sym_db = _symbol_database.Default() -from xds.annotations.v3 import status_pb2 as xds_dot_annotations_dot_v3_dot_status__pb2 from validate import validate_pb2 as validate_dot_validate__pb2 +from xds.annotations.v3 import status_pb2 as xds_dot_annotations_dot_v3_dot_status__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bxds/core/v3/authority.proto\x12\x0bxds.core.v3\x1a\x1fxds/annotations/v3/status.proto\x1a\x17validate/validate.proto\"\"\n\tAuthority\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x42V\n\x16\x63om.github.xds.core.v3B\x0e\x41uthorityProtoP\x01Z\"github.com/cncf/xds/go/xds/core/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bxds/core/v3/authority.proto\x12\x0bxds.core.v3\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\"\"\n\tAuthority\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x42V\n\x16\x63om.github.xds.core.v3B\x0e\x41uthorityProtoP\x01Z\"github.com/cncf/xds/go/xds/core/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/core/v3/cidr_pb2.py b/python/xds/core/v3/cidr_pb2.py index 7abbc332..8552b915 100644 --- a/python/xds/core/v3/cidr_pb2.py +++ b/python/xds/core/v3/cidr_pb2.py @@ -22,12 +22,12 @@ _sym_db = _symbol_database.Default() -from xds.annotations.v3 import status_pb2 as xds_dot_annotations_dot_v3_dot_status__pb2 from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 from validate import validate_pb2 as validate_dot_validate__pb2 +from xds.annotations.v3 import status_pb2 as xds_dot_annotations_dot_v3_dot_status__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16xds/core/v3/cidr.proto\x12\x0bxds.core.v3\x1a\x1fxds/annotations/v3/status.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17validate/validate.proto\"h\n\tCidrRange\x12\x1f\n\x0e\x61\x64\x64ress_prefix\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x12:\n\nprefix_len\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32ValueB\x08\xfa\x42\x05*\x03\x18\x80\x01\x42V\n\x16\x63om.github.xds.core.v3B\x0e\x43idrRangeProtoP\x01Z\"github.com/cncf/xds/go/xds/core/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16xds/core/v3/cidr.proto\x12\x0bxds.core.v3\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\"h\n\tCidrRange\x12\x1f\n\x0e\x61\x64\x64ress_prefix\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x12:\n\nprefix_len\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32ValueB\x08\xfa\x42\x05*\x03\x18\x80\x01\x42V\n\x16\x63om.github.xds.core.v3B\x0e\x43idrRangeProtoP\x01Z\"github.com/cncf/xds/go/xds/core/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/core/v3/collection_entry_pb2.py b/python/xds/core/v3/collection_entry_pb2.py index 679f2fc5..74858b64 100644 --- a/python/xds/core/v3/collection_entry_pb2.py +++ b/python/xds/core/v3/collection_entry_pb2.py @@ -23,12 +23,12 @@ from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 +from validate import validate_pb2 as validate_dot_validate__pb2 from xds.annotations.v3 import status_pb2 as xds_dot_annotations_dot_v3_dot_status__pb2 from xds.core.v3 import resource_locator_pb2 as xds_dot_core_dot_v3_dot_resource__locator__pb2 -from validate import validate_pb2 as validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"xds/core/v3/collection_entry.proto\x12\x0bxds.core.v3\x1a\x19google/protobuf/any.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\"xds/core/v3/resource_locator.proto\x1a\x17validate/validate.proto\"\x93\x02\n\x0f\x43ollectionEntry\x12/\n\x07locator\x18\x01 \x01(\x0b\x32\x1c.xds.core.v3.ResourceLocatorH\x00\x12@\n\x0cinline_entry\x18\x02 \x01(\x0b\x32(.xds.core.v3.CollectionEntry.InlineEntryH\x00\x1ar\n\x0bInlineEntry\x12*\n\x04name\x18\x01 \x01(\tB\x1c\xfa\x42\x19r\x17\x32\x15^[0-9a-zA-Z_\\-\\.~:]+$\x12\x0f\n\x07version\x18\x02 \x01(\t\x12&\n\x08resource\x18\x03 \x01(\x0b\x32\x14.google.protobuf.AnyB\x19\n\x12resource_specifier\x12\x03\xf8\x42\x01\x42\\\n\x16\x63om.github.xds.core.v3B\x14\x43ollectionEntryProtoP\x01Z\"github.com/cncf/xds/go/xds/core/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"xds/core/v3/collection_entry.proto\x12\x0bxds.core.v3\x1a\x19google/protobuf/any.proto\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\"xds/core/v3/resource_locator.proto\"\x93\x02\n\x0f\x43ollectionEntry\x12/\n\x07locator\x18\x01 \x01(\x0b\x32\x1c.xds.core.v3.ResourceLocatorH\x00\x12@\n\x0cinline_entry\x18\x02 \x01(\x0b\x32(.xds.core.v3.CollectionEntry.InlineEntryH\x00\x1ar\n\x0bInlineEntry\x12*\n\x04name\x18\x01 \x01(\tB\x1c\xfa\x42\x19r\x17\x32\x15^[0-9a-zA-Z_\\-\\.~:]+$\x12\x0f\n\x07version\x18\x02 \x01(\t\x12&\n\x08resource\x18\x03 \x01(\x0b\x32\x14.google.protobuf.AnyB\x19\n\x12resource_specifier\x12\x03\xf8\x42\x01\x42\\\n\x16\x63om.github.xds.core.v3B\x14\x43ollectionEntryProtoP\x01Z\"github.com/cncf/xds/go/xds/core/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/core/v3/extension_pb2.py b/python/xds/core/v3/extension_pb2.py index a55069ce..a4948e8f 100644 --- a/python/xds/core/v3/extension_pb2.py +++ b/python/xds/core/v3/extension_pb2.py @@ -22,11 +22,11 @@ _sym_db = _symbol_database.Default() -from validate import validate_pb2 as validate_dot_validate__pb2 from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 +from validate import validate_pb2 as validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bxds/core/v3/extension.proto\x12\x0bxds.core.v3\x1a\x17validate/validate.proto\x1a\x19google/protobuf/any.proto\"c\n\x14TypedExtensionConfig\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x12\x34\n\x0ctyped_config\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyB\x08\xfa\x42\x05\xa2\x01\x02\x08\x01\x42N\n\x16\x63om.github.xds.core.v3B\x0e\x45xtensionProtoP\x01Z\"github.com/cncf/xds/go/xds/core/v3b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bxds/core/v3/extension.proto\x12\x0bxds.core.v3\x1a\x19google/protobuf/any.proto\x1a\x17validate/validate.proto\"c\n\x14TypedExtensionConfig\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x12\x34\n\x0ctyped_config\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyB\x08\xfa\x42\x05\xa2\x01\x02\x08\x01\x42N\n\x16\x63om.github.xds.core.v3B\x0e\x45xtensionProtoP\x01Z\"github.com/cncf/xds/go/xds/core/v3b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/core/v3/resource_locator_pb2.py b/python/xds/core/v3/resource_locator_pb2.py index 7445ed8a..6de690c5 100644 --- a/python/xds/core/v3/resource_locator_pb2.py +++ b/python/xds/core/v3/resource_locator_pb2.py @@ -22,12 +22,12 @@ _sym_db = _symbol_database.Default() +from validate import validate_pb2 as validate_dot_validate__pb2 from xds.annotations.v3 import status_pb2 as xds_dot_annotations_dot_v3_dot_status__pb2 from xds.core.v3 import context_params_pb2 as xds_dot_core_dot_v3_dot_context__params__pb2 -from validate import validate_pb2 as validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"xds/core/v3/resource_locator.proto\x12\x0bxds.core.v3\x1a\x1fxds/annotations/v3/status.proto\x1a xds/core/v3/context_params.proto\x1a\x17validate/validate.proto\"\xc2\x03\n\x0fResourceLocator\x12=\n\x06scheme\x18\x01 \x01(\x0e\x32#.xds.core.v3.ResourceLocator.SchemeB\x08\xfa\x42\x05\x82\x01\x02\x10\x01\x12\n\n\x02id\x18\x02 \x01(\t\x12\x11\n\tauthority\x18\x03 \x01(\t\x12\x1e\n\rresource_type\x18\x04 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x12\x33\n\rexact_context\x18\x05 \x01(\x0b\x32\x1a.xds.core.v3.ContextParamsH\x00\x12:\n\ndirectives\x18\x06 \x03(\x0b\x32&.xds.core.v3.ResourceLocator.Directive\x1a|\n\tDirective\x12+\n\x03\x61lt\x18\x01 \x01(\x0b\x32\x1c.xds.core.v3.ResourceLocatorH\x00\x12\x30\n\x05\x65ntry\x18\x02 \x01(\tB\x1f\xfa\x42\x1cr\x1a\x10\x01\x32\x16^[0-9a-zA-Z_\\-\\./~:]+$H\x00\x42\x10\n\tdirective\x12\x03\xf8\x42\x01\"\'\n\x06Scheme\x12\t\n\x05XDSTP\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\x08\n\x04\x46ILE\x10\x02\x42\x19\n\x17\x63ontext_param_specifierB\\\n\x16\x63om.github.xds.core.v3B\x14ResourceLocatorProtoP\x01Z\"github.com/cncf/xds/go/xds/core/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"xds/core/v3/resource_locator.proto\x12\x0bxds.core.v3\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\x1a xds/core/v3/context_params.proto\"\xc2\x03\n\x0fResourceLocator\x12=\n\x06scheme\x18\x01 \x01(\x0e\x32#.xds.core.v3.ResourceLocator.SchemeB\x08\xfa\x42\x05\x82\x01\x02\x10\x01\x12\n\n\x02id\x18\x02 \x01(\t\x12\x11\n\tauthority\x18\x03 \x01(\t\x12\x1e\n\rresource_type\x18\x04 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x12\x33\n\rexact_context\x18\x05 \x01(\x0b\x32\x1a.xds.core.v3.ContextParamsH\x00\x12:\n\ndirectives\x18\x06 \x03(\x0b\x32&.xds.core.v3.ResourceLocator.Directive\x1a|\n\tDirective\x12+\n\x03\x61lt\x18\x01 \x01(\x0b\x32\x1c.xds.core.v3.ResourceLocatorH\x00\x12\x30\n\x05\x65ntry\x18\x02 \x01(\tB\x1f\xfa\x42\x1cr\x1a\x10\x01\x32\x16^[0-9a-zA-Z_\\-\\./~:]+$H\x00\x42\x10\n\tdirective\x12\x03\xf8\x42\x01\"\'\n\x06Scheme\x12\t\n\x05XDSTP\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\x08\n\x04\x46ILE\x10\x02\x42\x19\n\x17\x63ontext_param_specifierB\\\n\x16\x63om.github.xds.core.v3B\x14ResourceLocatorProtoP\x01Z\"github.com/cncf/xds/go/xds/core/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/core/v3/resource_name_pb2.py b/python/xds/core/v3/resource_name_pb2.py index 5b9cf224..88b5fdad 100644 --- a/python/xds/core/v3/resource_name_pb2.py +++ b/python/xds/core/v3/resource_name_pb2.py @@ -22,12 +22,12 @@ _sym_db = _symbol_database.Default() +from validate import validate_pb2 as validate_dot_validate__pb2 from xds.annotations.v3 import status_pb2 as xds_dot_annotations_dot_v3_dot_status__pb2 from xds.core.v3 import context_params_pb2 as xds_dot_core_dot_v3_dot_context__params__pb2 -from validate import validate_pb2 as validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fxds/core/v3/resource_name.proto\x12\x0bxds.core.v3\x1a\x1fxds/annotations/v3/status.proto\x1a xds/core/v3/context_params.proto\x1a\x17validate/validate.proto\"z\n\x0cResourceName\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tauthority\x18\x02 \x01(\t\x12\x1e\n\rresource_type\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x12+\n\x07\x63ontext\x18\x04 \x01(\x0b\x32\x1a.xds.core.v3.ContextParamsBY\n\x16\x63om.github.xds.core.v3B\x11ResourceNameProtoP\x01Z\"github.com/cncf/xds/go/xds/core/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fxds/core/v3/resource_name.proto\x12\x0bxds.core.v3\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\x1a xds/core/v3/context_params.proto\"z\n\x0cResourceName\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tauthority\x18\x02 \x01(\t\x12\x1e\n\rresource_type\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x12+\n\x07\x63ontext\x18\x04 \x01(\x0b\x32\x1a.xds.core.v3.ContextParamsBY\n\x16\x63om.github.xds.core.v3B\x11ResourceNameProtoP\x01Z\"github.com/cncf/xds/go/xds/core/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/service/orca/v3/orca_pb2.py b/python/xds/service/orca/v3/orca_pb2.py index 7469fabf..c43dfcd8 100644 --- a/python/xds/service/orca/v3/orca_pb2.py +++ b/python/xds/service/orca/v3/orca_pb2.py @@ -22,11 +22,11 @@ _sym_db = _symbol_database.Default() -from xds.data.orca.v3 import orca_load_report_pb2 as xds_dot_data_dot_orca_dot_v3_dot_orca__load__report__pb2 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from xds.data.orca.v3 import orca_load_report_pb2 as xds_dot_data_dot_orca_dot_v3_dot_orca__load__report__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1exds/service/orca/v3/orca.proto\x12\x13xds.service.orca.v3\x1a\'xds/data/orca/v3/orca_load_report.proto\x1a\x1egoogle/protobuf/duration.proto\"g\n\x15OrcaLoadReportRequest\x12\x32\n\x0freport_interval\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12request_cost_names\x18\x02 \x03(\t2u\n\x0eOpenRcaService\x12\x63\n\x11StreamCoreMetrics\x12*.xds.service.orca.v3.OrcaLoadReportRequest\x1a .xds.data.orca.v3.OrcaLoadReport0\x01\x42Y\n\x1e\x63om.github.xds.service.orca.v3B\tOrcaProtoP\x01Z*github.com/cncf/xds/go/xds/service/orca/v3b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1exds/service/orca/v3/orca.proto\x12\x13xds.service.orca.v3\x1a\x1egoogle/protobuf/duration.proto\x1a\'xds/data/orca/v3/orca_load_report.proto\"g\n\x15OrcaLoadReportRequest\x12\x32\n\x0freport_interval\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12request_cost_names\x18\x02 \x03(\t2u\n\x0eOpenRcaService\x12\x63\n\x11StreamCoreMetrics\x12*.xds.service.orca.v3.OrcaLoadReportRequest\x1a .xds.data.orca.v3.OrcaLoadReport0\x01\x42Y\n\x1e\x63om.github.xds.service.orca.v3B\tOrcaProtoP\x01Z*github.com/cncf/xds/go/xds/service/orca/v3b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/type/matcher/v3/cel_pb2.py b/python/xds/type/matcher/v3/cel_pb2.py index 894d8d25..3e27cb3c 100644 --- a/python/xds/type/matcher/v3/cel_pb2.py +++ b/python/xds/type/matcher/v3/cel_pb2.py @@ -22,11 +22,11 @@ _sym_db = _symbol_database.Default() -from xds.type.v3 import cel_pb2 as xds_dot_type_dot_v3_dot_cel__pb2 from validate import validate_pb2 as validate_dot_validate__pb2 +from xds.type.v3 import cel_pb2 as xds_dot_type_dot_v3_dot_cel__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dxds/type/matcher/v3/cel.proto\x12\x13xds.type.matcher.v3\x1a\x15xds/type/v3/cel.proto\x1a\x17validate/validate.proto\"[\n\nCelMatcher\x12\x38\n\nexpr_match\x18\x01 \x01(\x0b\x32\x1a.xds.type.v3.CelExpressionB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\tBX\n\x1e\x63om.github.xds.type.matcher.v3B\x08\x43\x65lProtoP\x01Z*github.com/cncf/xds/go/xds/type/matcher/v3b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dxds/type/matcher/v3/cel.proto\x12\x13xds.type.matcher.v3\x1a\x17validate/validate.proto\x1a\x15xds/type/v3/cel.proto\"[\n\nCelMatcher\x12\x38\n\nexpr_match\x18\x01 \x01(\x0b\x32\x1a.xds.type.v3.CelExpressionB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\tBX\n\x1e\x63om.github.xds.type.matcher.v3B\x08\x43\x65lProtoP\x01Z*github.com/cncf/xds/go/xds/type/matcher/v3b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/type/matcher/v3/domain_pb2.py b/python/xds/type/matcher/v3/domain_pb2.py index 66ec8ac2..76aa67d0 100644 --- a/python/xds/type/matcher/v3/domain_pb2.py +++ b/python/xds/type/matcher/v3/domain_pb2.py @@ -22,12 +22,12 @@ _sym_db = _symbol_database.Default() +from validate import validate_pb2 as validate_dot_validate__pb2 from xds.annotations.v3 import status_pb2 as xds_dot_annotations_dot_v3_dot_status__pb2 from xds.type.matcher.v3 import matcher_pb2 as xds_dot_type_dot_matcher_dot_v3_dot_matcher__pb2 -from validate import validate_pb2 as validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n xds/type/matcher/v3/domain.proto\x12\x13xds.type.matcher.v3\x1a\x1fxds/annotations/v3/status.proto\x1a!xds/type/matcher/v3/matcher.proto\x1a\x17validate/validate.proto\"\xc6\x01\n\x11ServerNameMatcher\x12M\n\x0f\x64omain_matchers\x18\x01 \x03(\x0b\x32\x34.xds.type.matcher.v3.ServerNameMatcher.DomainMatcher\x1a\x62\n\rDomainMatcher\x12\x19\n\x07\x64omains\x18\x01 \x03(\tB\x08\xfa\x42\x05\x92\x01\x02\x08\x01\x12\x36\n\x08on_match\x18\x02 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatchBn\n\x1e\x63om.github.xds.type.matcher.v3B\x16ServerNameMatcherProtoP\x01Z*github.com/cncf/xds/go/xds/type/matcher/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n xds/type/matcher/v3/domain.proto\x12\x13xds.type.matcher.v3\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\x1a!xds/type/matcher/v3/matcher.proto\"\xc6\x01\n\x11ServerNameMatcher\x12M\n\x0f\x64omain_matchers\x18\x01 \x03(\x0b\x32\x34.xds.type.matcher.v3.ServerNameMatcher.DomainMatcher\x1a\x62\n\rDomainMatcher\x12\x19\n\x07\x64omains\x18\x01 \x03(\tB\x08\xfa\x42\x05\x92\x01\x02\x08\x01\x12\x36\n\x08on_match\x18\x02 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatchBn\n\x1e\x63om.github.xds.type.matcher.v3B\x16ServerNameMatcherProtoP\x01Z*github.com/cncf/xds/go/xds/type/matcher/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/type/matcher/v3/ip_pb2.py b/python/xds/type/matcher/v3/ip_pb2.py index d462c02d..cc9b5a34 100644 --- a/python/xds/type/matcher/v3/ip_pb2.py +++ b/python/xds/type/matcher/v3/ip_pb2.py @@ -22,13 +22,13 @@ _sym_db = _symbol_database.Default() +from validate import validate_pb2 as validate_dot_validate__pb2 from xds.annotations.v3 import status_pb2 as xds_dot_annotations_dot_v3_dot_status__pb2 from xds.core.v3 import cidr_pb2 as xds_dot_core_dot_v3_dot_cidr__pb2 from xds.type.matcher.v3 import matcher_pb2 as xds_dot_type_dot_matcher_dot_v3_dot_matcher__pb2 -from validate import validate_pb2 as validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cxds/type/matcher/v3/ip.proto\x12\x13xds.type.matcher.v3\x1a\x1fxds/annotations/v3/status.proto\x1a\x16xds/core/v3/cidr.proto\x1a!xds/type/matcher/v3/matcher.proto\x1a\x17validate/validate.proto\"\xe2\x01\n\tIPMatcher\x12\x45\n\x0erange_matchers\x18\x01 \x03(\x0b\x32-.xds.type.matcher.v3.IPMatcher.IPRangeMatcher\x1a\x8d\x01\n\x0eIPRangeMatcher\x12\x30\n\x06ranges\x18\x01 \x03(\x0b\x32\x16.xds.core.v3.CidrRangeB\x08\xfa\x42\x05\x92\x01\x02\x08\x01\x12\x36\n\x08on_match\x18\x02 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatch\x12\x11\n\texclusive\x18\x03 \x01(\x08\x42\x66\n\x1e\x63om.github.xds.type.matcher.v3B\x0eIPMatcherProtoP\x01Z*github.com/cncf/xds/go/xds/type/matcher/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cxds/type/matcher/v3/ip.proto\x12\x13xds.type.matcher.v3\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\x16xds/core/v3/cidr.proto\x1a!xds/type/matcher/v3/matcher.proto\"\xe2\x01\n\tIPMatcher\x12\x45\n\x0erange_matchers\x18\x01 \x03(\x0b\x32-.xds.type.matcher.v3.IPMatcher.IPRangeMatcher\x1a\x8d\x01\n\x0eIPRangeMatcher\x12\x30\n\x06ranges\x18\x01 \x03(\x0b\x32\x16.xds.core.v3.CidrRangeB\x08\xfa\x42\x05\x92\x01\x02\x08\x01\x12\x36\n\x08on_match\x18\x02 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatch\x12\x11\n\texclusive\x18\x03 \x01(\x08\x42\x66\n\x1e\x63om.github.xds.type.matcher.v3B\x0eIPMatcherProtoP\x01Z*github.com/cncf/xds/go/xds/type/matcher/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/type/matcher/v3/matcher_pb2.py b/python/xds/type/matcher/v3/matcher_pb2.py index d4d316e5..b2e65cdb 100644 --- a/python/xds/type/matcher/v3/matcher_pb2.py +++ b/python/xds/type/matcher/v3/matcher_pb2.py @@ -22,12 +22,12 @@ _sym_db = _symbol_database.Default() +from validate import validate_pb2 as validate_dot_validate__pb2 from xds.core.v3 import extension_pb2 as xds_dot_core_dot_v3_dot_extension__pb2 from xds.type.matcher.v3 import string_pb2 as xds_dot_type_dot_matcher_dot_v3_dot_string__pb2 -from validate import validate_pb2 as validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!xds/type/matcher/v3/matcher.proto\x12\x13xds.type.matcher.v3\x1a\x1bxds/core/v3/extension.proto\x1a xds/type/matcher/v3/string.proto\x1a\x17validate/validate.proto\"\x96\x0e\n\x07Matcher\x12@\n\x0cmatcher_list\x18\x01 \x01(\x0b\x32(.xds.type.matcher.v3.Matcher.MatcherListH\x00\x12@\n\x0cmatcher_tree\x18\x02 \x01(\x0b\x32(.xds.type.matcher.v3.Matcher.MatcherTreeH\x00\x12\x39\n\x0bon_no_match\x18\x03 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatch\x1a\x97\x01\n\x07OnMatch\x12/\n\x07matcher\x18\x01 \x01(\x0b\x32\x1c.xds.type.matcher.v3.MatcherH\x00\x12\x33\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32!.xds.core.v3.TypedExtensionConfigH\x00\x12\x15\n\rkeep_matching\x18\x03 \x01(\x08\x42\x0f\n\x08on_match\x12\x03\xf8\x42\x01\x1a\xb9\x07\n\x0bMatcherList\x12Q\n\x08matchers\x18\x01 \x03(\x0b\x32\x35.xds.type.matcher.v3.Matcher.MatcherList.FieldMatcherB\x08\xfa\x42\x05\x92\x01\x02\x08\x01\x1a\xb2\x05\n\tPredicate\x12^\n\x10single_predicate\x18\x01 \x01(\x0b\x32\x42.xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicateH\x00\x12V\n\nor_matcher\x18\x02 \x01(\x0b\x32@.xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateListH\x00\x12W\n\x0b\x61nd_matcher\x18\x03 \x01(\x0b\x32@.xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateListH\x00\x12I\n\x0bnot_matcher\x18\x04 \x01(\x0b\x32\x32.xds.type.matcher.v3.Matcher.MatcherList.PredicateH\x00\x1a\xd3\x01\n\x0fSinglePredicate\x12:\n\x05input\x18\x01 \x01(\x0b\x32!.xds.core.v3.TypedExtensionConfigB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x12\x39\n\x0bvalue_match\x18\x02 \x01(\x0b\x32\".xds.type.matcher.v3.StringMatcherH\x00\x12\x39\n\x0c\x63ustom_match\x18\x03 \x01(\x0b\x32!.xds.core.v3.TypedExtensionConfigH\x00\x42\x0e\n\x07matcher\x12\x03\xf8\x42\x01\x1a`\n\rPredicateList\x12O\n\tpredicate\x18\x01 \x03(\x0b\x32\x32.xds.type.matcher.v3.Matcher.MatcherList.PredicateB\x08\xfa\x42\x05\x92\x01\x02\x08\x02\x42\x11\n\nmatch_type\x12\x03\xf8\x42\x01\x1a\xa1\x01\n\x0c\x46ieldMatcher\x12O\n\tpredicate\x18\x01 \x01(\x0b\x32\x32.xds.type.matcher.v3.Matcher.MatcherList.PredicateB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x12@\n\x08on_match\x18\x02 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatchB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x1a\xe5\x03\n\x0bMatcherTree\x12:\n\x05input\x18\x01 \x01(\x0b\x32!.xds.core.v3.TypedExtensionConfigB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x12L\n\x0f\x65xact_match_map\x18\x02 \x01(\x0b\x32\x31.xds.type.matcher.v3.Matcher.MatcherTree.MatchMapH\x00\x12M\n\x10prefix_match_map\x18\x03 \x01(\x0b\x32\x31.xds.type.matcher.v3.Matcher.MatcherTree.MatchMapH\x00\x12\x39\n\x0c\x63ustom_match\x18\x04 \x01(\x0b\x32!.xds.core.v3.TypedExtensionConfigH\x00\x1a\xaf\x01\n\x08MatchMap\x12Q\n\x03map\x18\x01 \x03(\x0b\x32:.xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntryB\x08\xfa\x42\x05\x9a\x01\x02\x08\x01\x1aP\n\x08MapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatch:\x02\x38\x01\x42\x10\n\ttree_type\x12\x03\xf8\x42\x01\x42\x0e\n\x0cmatcher_typeB\\\n\x1e\x63om.github.xds.type.matcher.v3B\x0cMatcherProtoP\x01Z*github.com/cncf/xds/go/xds/type/matcher/v3b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!xds/type/matcher/v3/matcher.proto\x12\x13xds.type.matcher.v3\x1a\x17validate/validate.proto\x1a\x1bxds/core/v3/extension.proto\x1a xds/type/matcher/v3/string.proto\"\x96\x0e\n\x07Matcher\x12@\n\x0cmatcher_list\x18\x01 \x01(\x0b\x32(.xds.type.matcher.v3.Matcher.MatcherListH\x00\x12@\n\x0cmatcher_tree\x18\x02 \x01(\x0b\x32(.xds.type.matcher.v3.Matcher.MatcherTreeH\x00\x12\x39\n\x0bon_no_match\x18\x03 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatch\x1a\x97\x01\n\x07OnMatch\x12/\n\x07matcher\x18\x01 \x01(\x0b\x32\x1c.xds.type.matcher.v3.MatcherH\x00\x12\x33\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32!.xds.core.v3.TypedExtensionConfigH\x00\x12\x15\n\rkeep_matching\x18\x03 \x01(\x08\x42\x0f\n\x08on_match\x12\x03\xf8\x42\x01\x1a\xb9\x07\n\x0bMatcherList\x12Q\n\x08matchers\x18\x01 \x03(\x0b\x32\x35.xds.type.matcher.v3.Matcher.MatcherList.FieldMatcherB\x08\xfa\x42\x05\x92\x01\x02\x08\x01\x1a\xb2\x05\n\tPredicate\x12^\n\x10single_predicate\x18\x01 \x01(\x0b\x32\x42.xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicateH\x00\x12V\n\nor_matcher\x18\x02 \x01(\x0b\x32@.xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateListH\x00\x12W\n\x0b\x61nd_matcher\x18\x03 \x01(\x0b\x32@.xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateListH\x00\x12I\n\x0bnot_matcher\x18\x04 \x01(\x0b\x32\x32.xds.type.matcher.v3.Matcher.MatcherList.PredicateH\x00\x1a\xd3\x01\n\x0fSinglePredicate\x12:\n\x05input\x18\x01 \x01(\x0b\x32!.xds.core.v3.TypedExtensionConfigB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x12\x39\n\x0bvalue_match\x18\x02 \x01(\x0b\x32\".xds.type.matcher.v3.StringMatcherH\x00\x12\x39\n\x0c\x63ustom_match\x18\x03 \x01(\x0b\x32!.xds.core.v3.TypedExtensionConfigH\x00\x42\x0e\n\x07matcher\x12\x03\xf8\x42\x01\x1a`\n\rPredicateList\x12O\n\tpredicate\x18\x01 \x03(\x0b\x32\x32.xds.type.matcher.v3.Matcher.MatcherList.PredicateB\x08\xfa\x42\x05\x92\x01\x02\x08\x02\x42\x11\n\nmatch_type\x12\x03\xf8\x42\x01\x1a\xa1\x01\n\x0c\x46ieldMatcher\x12O\n\tpredicate\x18\x01 \x01(\x0b\x32\x32.xds.type.matcher.v3.Matcher.MatcherList.PredicateB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x12@\n\x08on_match\x18\x02 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatchB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x1a\xe5\x03\n\x0bMatcherTree\x12:\n\x05input\x18\x01 \x01(\x0b\x32!.xds.core.v3.TypedExtensionConfigB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x12L\n\x0f\x65xact_match_map\x18\x02 \x01(\x0b\x32\x31.xds.type.matcher.v3.Matcher.MatcherTree.MatchMapH\x00\x12M\n\x10prefix_match_map\x18\x03 \x01(\x0b\x32\x31.xds.type.matcher.v3.Matcher.MatcherTree.MatchMapH\x00\x12\x39\n\x0c\x63ustom_match\x18\x04 \x01(\x0b\x32!.xds.core.v3.TypedExtensionConfigH\x00\x1a\xaf\x01\n\x08MatchMap\x12Q\n\x03map\x18\x01 \x03(\x0b\x32:.xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntryB\x08\xfa\x42\x05\x9a\x01\x02\x08\x01\x1aP\n\x08MapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatch:\x02\x38\x01\x42\x10\n\ttree_type\x12\x03\xf8\x42\x01\x42\x0e\n\x0cmatcher_typeB\\\n\x1e\x63om.github.xds.type.matcher.v3B\x0cMatcherProtoP\x01Z*github.com/cncf/xds/go/xds/type/matcher/v3b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/type/matcher/v3/range_pb2.py b/python/xds/type/matcher/v3/range_pb2.py index bf71a18d..cdf5ddc2 100644 --- a/python/xds/type/matcher/v3/range_pb2.py +++ b/python/xds/type/matcher/v3/range_pb2.py @@ -22,12 +22,12 @@ _sym_db = _symbol_database.Default() -from xds.type.v3 import range_pb2 as xds_dot_type_dot_v3_dot_range__pb2 -from xds.type.matcher.v3 import matcher_pb2 as xds_dot_type_dot_matcher_dot_v3_dot_matcher__pb2 from validate import validate_pb2 as validate_dot_validate__pb2 +from xds.type.matcher.v3 import matcher_pb2 as xds_dot_type_dot_matcher_dot_v3_dot_matcher__pb2 +from xds.type.v3 import range_pb2 as xds_dot_type_dot_v3_dot_range__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fxds/type/matcher/v3/range.proto\x12\x13xds.type.matcher.v3\x1a\x17xds/type/v3/range.proto\x1a!xds/type/matcher/v3/matcher.proto\x1a\x17validate/validate.proto\"\xdb\x01\n\x11Int64RangeMatcher\x12K\n\x0erange_matchers\x18\x01 \x03(\x0b\x32\x33.xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher\x1ay\n\x0cRangeMatcher\x12\x31\n\x06ranges\x18\x01 \x03(\x0b\x32\x17.xds.type.v3.Int64RangeB\x08\xfa\x42\x05\x92\x01\x02\x08\x01\x12\x36\n\x08on_match\x18\x02 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatch\"\xdb\x01\n\x11Int32RangeMatcher\x12K\n\x0erange_matchers\x18\x01 \x03(\x0b\x32\x33.xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher\x1ay\n\x0cRangeMatcher\x12\x31\n\x06ranges\x18\x01 \x03(\x0b\x32\x17.xds.type.v3.Int32RangeB\x08\xfa\x42\x05\x92\x01\x02\x08\x01\x12\x36\n\x08on_match\x18\x02 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatch\"\xde\x01\n\x12\x44oubleRangeMatcher\x12L\n\x0erange_matchers\x18\x01 \x03(\x0b\x32\x34.xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher\x1az\n\x0cRangeMatcher\x12\x32\n\x06ranges\x18\x01 \x03(\x0b\x32\x18.xds.type.v3.DoubleRangeB\x08\xfa\x42\x05\x92\x01\x02\x08\x01\x12\x36\n\x08on_match\x18\x02 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatchBZ\n\x1e\x63om.github.xds.type.matcher.v3B\nRangeProtoP\x01Z*github.com/cncf/xds/go/xds/type/matcher/v3b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fxds/type/matcher/v3/range.proto\x12\x13xds.type.matcher.v3\x1a\x17validate/validate.proto\x1a!xds/type/matcher/v3/matcher.proto\x1a\x17xds/type/v3/range.proto\"\xdb\x01\n\x11Int64RangeMatcher\x12K\n\x0erange_matchers\x18\x01 \x03(\x0b\x32\x33.xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher\x1ay\n\x0cRangeMatcher\x12\x31\n\x06ranges\x18\x01 \x03(\x0b\x32\x17.xds.type.v3.Int64RangeB\x08\xfa\x42\x05\x92\x01\x02\x08\x01\x12\x36\n\x08on_match\x18\x02 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatch\"\xdb\x01\n\x11Int32RangeMatcher\x12K\n\x0erange_matchers\x18\x01 \x03(\x0b\x32\x33.xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher\x1ay\n\x0cRangeMatcher\x12\x31\n\x06ranges\x18\x01 \x03(\x0b\x32\x17.xds.type.v3.Int32RangeB\x08\xfa\x42\x05\x92\x01\x02\x08\x01\x12\x36\n\x08on_match\x18\x02 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatch\"\xde\x01\n\x12\x44oubleRangeMatcher\x12L\n\x0erange_matchers\x18\x01 \x03(\x0b\x32\x34.xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher\x1az\n\x0cRangeMatcher\x12\x32\n\x06ranges\x18\x01 \x03(\x0b\x32\x18.xds.type.v3.DoubleRangeB\x08\xfa\x42\x05\x92\x01\x02\x08\x01\x12\x36\n\x08on_match\x18\x02 \x01(\x0b\x32$.xds.type.matcher.v3.Matcher.OnMatchBZ\n\x1e\x63om.github.xds.type.matcher.v3B\nRangeProtoP\x01Z*github.com/cncf/xds/go/xds/type/matcher/v3b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/type/matcher/v3/string_pb2.py b/python/xds/type/matcher/v3/string_pb2.py index d7830764..a8a90239 100644 --- a/python/xds/type/matcher/v3/string_pb2.py +++ b/python/xds/type/matcher/v3/string_pb2.py @@ -22,12 +22,12 @@ _sym_db = _symbol_database.Default() +from validate import validate_pb2 as validate_dot_validate__pb2 from xds.core.v3 import extension_pb2 as xds_dot_core_dot_v3_dot_extension__pb2 from xds.type.matcher.v3 import regex_pb2 as xds_dot_type_dot_matcher_dot_v3_dot_regex__pb2 -from validate import validate_pb2 as validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n xds/type/matcher/v3/string.proto\x12\x13xds.type.matcher.v3\x1a\x1bxds/core/v3/extension.proto\x1a\x1fxds/type/matcher/v3/regex.proto\x1a\x17validate/validate.proto\"\x96\x02\n\rStringMatcher\x12\x0f\n\x05\x65xact\x18\x01 \x01(\tH\x00\x12\x19\n\x06prefix\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00\x12\x19\n\x06suffix\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00\x12\x41\n\nsafe_regex\x18\x05 \x01(\x0b\x32!.xds.type.matcher.v3.RegexMatcherB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00\x12\x1b\n\x08\x63ontains\x18\x07 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00\x12\x33\n\x06\x63ustom\x18\x08 \x01(\x0b\x32!.xds.core.v3.TypedExtensionConfigH\x00\x12\x13\n\x0bignore_case\x18\x06 \x01(\x08\x42\x14\n\rmatch_pattern\x12\x03\xf8\x42\x01\"S\n\x11ListStringMatcher\x12>\n\x08patterns\x18\x01 \x03(\x0b\x32\".xds.type.matcher.v3.StringMatcherB\x08\xfa\x42\x05\x92\x01\x02\x08\x01\x42[\n\x1e\x63om.github.xds.type.matcher.v3B\x0bStringProtoP\x01Z*github.com/cncf/xds/go/xds/type/matcher/v3b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n xds/type/matcher/v3/string.proto\x12\x13xds.type.matcher.v3\x1a\x17validate/validate.proto\x1a\x1bxds/core/v3/extension.proto\x1a\x1fxds/type/matcher/v3/regex.proto\"\x96\x02\n\rStringMatcher\x12\x0f\n\x05\x65xact\x18\x01 \x01(\tH\x00\x12\x19\n\x06prefix\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00\x12\x19\n\x06suffix\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00\x12\x41\n\nsafe_regex\x18\x05 \x01(\x0b\x32!.xds.type.matcher.v3.RegexMatcherB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00\x12\x1b\n\x08\x63ontains\x18\x07 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00\x12\x33\n\x06\x63ustom\x18\x08 \x01(\x0b\x32!.xds.core.v3.TypedExtensionConfigH\x00\x12\x13\n\x0bignore_case\x18\x06 \x01(\x08\x42\x14\n\rmatch_pattern\x12\x03\xf8\x42\x01\"S\n\x11ListStringMatcher\x12>\n\x08patterns\x18\x01 \x03(\x0b\x32\".xds.type.matcher.v3.StringMatcherB\x08\xfa\x42\x05\x92\x01\x02\x08\x01\x42[\n\x1e\x63om.github.xds.type.matcher.v3B\x0bStringProtoP\x01Z*github.com/cncf/xds/go/xds/type/matcher/v3b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/python/xds/type/v3/cel_pb2.py b/python/xds/type/v3/cel_pb2.py index 9345b679..9ceda696 100644 --- a/python/xds/type/v3/cel_pb2.py +++ b/python/xds/type/v3/cel_pb2.py @@ -22,16 +22,16 @@ _sym_db = _symbol_database.Default() -from google.api.expr.v1alpha1 import checked_pb2 as google_dot_api_dot_expr_dot_v1alpha1_dot_checked__pb2 -from google.api.expr.v1alpha1 import syntax_pb2 as google_dot_api_dot_expr_dot_v1alpha1_dot_syntax__pb2 from cel.expr import checked_pb2 as cel_dot_expr_dot_checked__pb2 from cel.expr import syntax_pb2 as cel_dot_expr_dot_syntax__pb2 +from google.api.expr.v1alpha1 import checked_pb2 as google_dot_api_dot_expr_dot_v1alpha1_dot_checked__pb2 +from google.api.expr.v1alpha1 import syntax_pb2 as google_dot_api_dot_expr_dot_v1alpha1_dot_syntax__pb2 from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 -from xds.annotations.v3 import status_pb2 as xds_dot_annotations_dot_v3_dot_status__pb2 from validate import validate_pb2 as validate_dot_validate__pb2 +from xds.annotations.v3 import status_pb2 as xds_dot_annotations_dot_v3_dot_status__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15xds/type/v3/cel.proto\x12\x0bxds.type.v3\x1a&google/api/expr/v1alpha1/checked.proto\x1a%google/api/expr/v1alpha1/syntax.proto\x1a\x16\x63\x65l/expr/checked.proto\x1a\x15\x63\x65l/expr/syntax.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\x17validate/validate.proto\"\x9e\x02\n\rCelExpression\x12?\n\x0bparsed_expr\x18\x01 \x01(\x0b\x32$.google.api.expr.v1alpha1.ParsedExprB\x02\x18\x01H\x00\x12\x41\n\x0c\x63hecked_expr\x18\x02 \x01(\x0b\x32%.google.api.expr.v1alpha1.CheckedExprB\x02\x18\x01H\x00\x12-\n\x0f\x63\x65l_expr_parsed\x18\x03 \x01(\x0b\x32\x14.cel.expr.ParsedExpr\x12/\n\x10\x63\x65l_expr_checked\x18\x04 \x01(\x0b\x32\x15.cel.expr.CheckedExpr\x12\x17\n\x0f\x63\x65l_expr_string\x18\x05 \x01(\tB\x10\n\x0e\x65xpr_specifier\"\x83\x01\n\x10\x43\x65lExtractString\x12:\n\x0c\x65xpr_extract\x18\x01 \x01(\x0b\x32\x1a.xds.type.v3.CelExpressionB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x12\x33\n\rdefault_value\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValueBP\n\x16\x63om.github.xds.type.v3B\x08\x43\x65lProtoP\x01Z\"github.com/cncf/xds/go/xds/type/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15xds/type/v3/cel.proto\x12\x0bxds.type.v3\x1a\x16\x63\x65l/expr/checked.proto\x1a\x15\x63\x65l/expr/syntax.proto\x1a&google/api/expr/v1alpha1/checked.proto\x1a%google/api/expr/v1alpha1/syntax.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17validate/validate.proto\x1a\x1fxds/annotations/v3/status.proto\"\x9e\x02\n\rCelExpression\x12?\n\x0bparsed_expr\x18\x01 \x01(\x0b\x32$.google.api.expr.v1alpha1.ParsedExprB\x02\x18\x01H\x00\x12\x41\n\x0c\x63hecked_expr\x18\x02 \x01(\x0b\x32%.google.api.expr.v1alpha1.CheckedExprB\x02\x18\x01H\x00\x12-\n\x0f\x63\x65l_expr_parsed\x18\x03 \x01(\x0b\x32\x14.cel.expr.ParsedExpr\x12/\n\x10\x63\x65l_expr_checked\x18\x04 \x01(\x0b\x32\x15.cel.expr.CheckedExpr\x12\x17\n\x0f\x63\x65l_expr_string\x18\x05 \x01(\tB\x10\n\x0e\x65xpr_specifier\"\x83\x01\n\x10\x43\x65lExtractString\x12:\n\x0c\x65xpr_extract\x18\x01 \x01(\x0b\x32\x1a.xds.type.v3.CelExpressionB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x12\x33\n\rdefault_value\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValueBP\n\x16\x63om.github.xds.type.v3B\x08\x43\x65lProtoP\x01Z\"github.com/cncf/xds/go/xds/type/v3\xd2\xc6\xa4\xe1\x06\x02\x08\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/udpa/annotations/security.proto b/udpa/annotations/security.proto index 0ef91971..53a340d3 100644 --- a/udpa/annotations/security.proto +++ b/udpa/annotations/security.proto @@ -6,12 +6,10 @@ syntax = "proto3"; package udpa.annotations; -import "udpa/annotations/status.proto"; - import "google/protobuf/descriptor.proto"; +import "udpa/annotations/status.proto"; option go_package = "github.com/cncf/xds/go/udpa/annotations"; - // All annotations in this file are experimental and subject to change. Their // only consumer today is the Envoy APIs and SecuritAnnotationValidator protoc // plugin in this repository. diff --git a/udpa/data/orca/v1/orca_load_report.proto b/udpa/data/orca/v1/orca_load_report.proto index 5d364498..e1520685 100644 --- a/udpa/data/orca/v1/orca_load_report.proto +++ b/udpa/data/orca/v1/orca_load_report.proto @@ -6,12 +6,12 @@ syntax = "proto3"; package udpa.data.orca.v1; -option java_outer_classname = "OrcaLoadReportProto"; +import "validate/validate.proto"; + +option go_package = "github.com/cncf/xds/go/udpa/data/orca/v1"; option java_multiple_files = true; +option java_outer_classname = "OrcaLoadReportProto"; option java_package = "com.github.udpa.udpa.data.orca.v1"; -option go_package = "github.com/cncf/xds/go/udpa/data/orca/v1"; - -import "validate/validate.proto"; // See section `ORCA load report format` of the design document in // :ref:`https://github.com/envoyproxy/envoy/issues/6614`. @@ -19,11 +19,17 @@ import "validate/validate.proto"; message OrcaLoadReport { // CPU utilization expressed as a fraction of available CPU resources. This // should be derived from the latest sample or measurement. - double cpu_utilization = 1 [(validate.rules).double.gte = 0, (validate.rules).double.lte = 1]; + double cpu_utilization = 1 [ + (validate.rules).double.gte = 0, + (validate.rules).double.lte = 1 + ]; // Memory utilization expressed as a fraction of available memory // resources. This should be derived from the latest sample or measurement. - double mem_utilization = 2 [(validate.rules).double.gte = 0, (validate.rules).double.lte = 1]; + double mem_utilization = 2 [ + (validate.rules).double.gte = 0, + (validate.rules).double.lte = 1 + ]; // Total RPS being served by an endpoint. This should cover all services that an endpoint is // responsible for. @@ -35,6 +41,8 @@ message OrcaLoadReport { // Resource utilization values. Each value is expressed as a fraction of total resources // available, derived from the latest sample or measurement. - map utilization = 5 - [(validate.rules).map.values.double.gte = 0, (validate.rules).map.values.double.lte = 1]; + map utilization = 5 [ + (validate.rules).map.values.double.gte = 0, + (validate.rules).map.values.double.lte = 1 + ]; } diff --git a/udpa/service/orca/v1/orca.proto b/udpa/service/orca/v1/orca.proto index 1ce67615..4fd29507 100644 --- a/udpa/service/orca/v1/orca.proto +++ b/udpa/service/orca/v1/orca.proto @@ -6,14 +6,13 @@ syntax = "proto3"; package udpa.service.orca.v1; -option java_outer_classname = "OrcaProto"; -option java_multiple_files = true; -option java_package = "com.github.udpa.udpa.service.orca.v1"; -option go_package = "github.com/cncf/xds/go/udpa/service/orca/v1"; - +import "google/protobuf/duration.proto"; import "udpa/data/orca/v1/orca_load_report.proto"; -import "google/protobuf/duration.proto"; +option go_package = "github.com/cncf/xds/go/udpa/service/orca/v1"; +option java_multiple_files = true; +option java_outer_classname = "OrcaProto"; +option java_package = "com.github.udpa.udpa.service.orca.v1"; // See section `Out-of-band (OOB) reporting` of the design document in // :ref:`https://github.com/envoyproxy/envoy/issues/6614`. diff --git a/udpa/type/v1/typed_struct.proto b/udpa/type/v1/typed_struct.proto index 10eaef1a..37dc7e0c 100644 --- a/udpa/type/v1/typed_struct.proto +++ b/udpa/type/v1/typed_struct.proto @@ -6,12 +6,12 @@ syntax = "proto3"; package udpa.type.v1; -option java_outer_classname = "TypedStructProto"; +import "google/protobuf/struct.proto"; + +option go_package = "github.com/cncf/xds/go/udpa/type/v1"; option java_multiple_files = true; +option java_outer_classname = "TypedStructProto"; option java_package = "com.github.udpa.udpa.type.v1"; -option go_package = "github.com/cncf/xds/go/udpa/type/v1"; - -import "google/protobuf/struct.proto"; // A TypedStruct contains an arbitrary JSON serialized protocol buffer message with a URL that // describes the type of the serialized message. This is very similar to google.protobuf.Any, diff --git a/xds/annotations/v3/security.proto b/xds/annotations/v3/security.proto index f1f9f40d..87f3edf6 100644 --- a/xds/annotations/v3/security.proto +++ b/xds/annotations/v3/security.proto @@ -2,12 +2,10 @@ syntax = "proto3"; package xds.annotations.v3; -import "xds/annotations/v3/status.proto"; - import "google/protobuf/descriptor.proto"; +import "xds/annotations/v3/status.proto"; option go_package = "github.com/cncf/xds/go/xds/annotations/v3"; - // All annotations in this file are experimental and subject to change. Their // only consumer today is the Envoy APIs and SecuritAnnotationValidator protoc // plugin in this repository. diff --git a/xds/core/v3/authority.proto b/xds/core/v3/authority.proto index d666c38e..4a16c981 100644 --- a/xds/core/v3/authority.proto +++ b/xds/core/v3/authority.proto @@ -2,15 +2,13 @@ syntax = "proto3"; package xds.core.v3; -import "xds/annotations/v3/status.proto"; - import "validate/validate.proto"; +import "xds/annotations/v3/status.proto"; -option java_outer_classname = "AuthorityProto"; +option go_package = "github.com/cncf/xds/go/xds/core/v3"; option java_multiple_files = true; +option java_outer_classname = "AuthorityProto"; option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - option (xds.annotations.v3.file_status).work_in_progress = true; // xDS authority information. diff --git a/xds/core/v3/cidr.proto b/xds/core/v3/cidr.proto index c40dab2f..f01faca0 100644 --- a/xds/core/v3/cidr.proto +++ b/xds/core/v3/cidr.proto @@ -2,16 +2,14 @@ syntax = "proto3"; package xds.core.v3; -import "xds/annotations/v3/status.proto"; import "google/protobuf/wrappers.proto"; - import "validate/validate.proto"; +import "xds/annotations/v3/status.proto"; -option java_outer_classname = "CidrRangeProto"; +option go_package = "github.com/cncf/xds/go/xds/core/v3"; option java_multiple_files = true; +option java_outer_classname = "CidrRangeProto"; option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - option (xds.annotations.v3.file_status).work_in_progress = true; // CidrRange specifies an IP Address and a prefix length to construct diff --git a/xds/core/v3/collection_entry.proto b/xds/core/v3/collection_entry.proto index c844d614..30a9ba8d 100644 --- a/xds/core/v3/collection_entry.proto +++ b/xds/core/v3/collection_entry.proto @@ -3,17 +3,14 @@ syntax = "proto3"; package xds.core.v3; import "google/protobuf/any.proto"; - +import "validate/validate.proto"; import "xds/annotations/v3/status.proto"; import "xds/core/v3/resource_locator.proto"; -import "validate/validate.proto"; - -option java_outer_classname = "CollectionEntryProto"; +option go_package = "github.com/cncf/xds/go/xds/core/v3"; option java_multiple_files = true; +option java_outer_classname = "CollectionEntryProto"; option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - option (xds.annotations.v3.file_status).work_in_progress = true; // xDS collection resource wrapper. This encapsulates a xDS resource when diff --git a/xds/core/v3/context_params.proto b/xds/core/v3/context_params.proto index a42c7a85..591cb522 100644 --- a/xds/core/v3/context_params.proto +++ b/xds/core/v3/context_params.proto @@ -4,11 +4,10 @@ package xds.core.v3; import "xds/annotations/v3/status.proto"; -option java_outer_classname = "ContextParamsProto"; +option go_package = "github.com/cncf/xds/go/xds/core/v3"; option java_multiple_files = true; +option java_outer_classname = "ContextParamsProto"; option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - option (xds.annotations.v3.file_status).work_in_progress = true; // Additional parameters that can be used to select resource variants. These include any @@ -19,5 +18,5 @@ option (xds.annotations.v3.file_status).work_in_progress = true; // `xds.resource.listening_address`: The value is "IP:port" (e.g. "10.1.1.3:8080") which is // the listening address of a Listener. Used in a Listener resource query. message ContextParams { - map params = 1; + map params = 1; } diff --git a/xds/core/v3/extension.proto b/xds/core/v3/extension.proto index dd489eb9..155a1c06 100644 --- a/xds/core/v3/extension.proto +++ b/xds/core/v3/extension.proto @@ -2,13 +2,13 @@ syntax = "proto3"; package xds.core.v3; -option java_outer_classname = "ExtensionProto"; +import "google/protobuf/any.proto"; +import "validate/validate.proto"; + +option go_package = "github.com/cncf/xds/go/xds/core/v3"; option java_multiple_files = true; +option java_outer_classname = "ExtensionProto"; option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - -import "validate/validate.proto"; -import "google/protobuf/any.proto"; // Message type for extension configuration. message TypedExtensionConfig { diff --git a/xds/core/v3/resource.proto b/xds/core/v3/resource.proto index dc062790..033ab85e 100644 --- a/xds/core/v3/resource.proto +++ b/xds/core/v3/resource.proto @@ -3,15 +3,13 @@ syntax = "proto3"; package xds.core.v3; import "google/protobuf/any.proto"; - import "xds/annotations/v3/status.proto"; import "xds/core/v3/resource_name.proto"; -option java_outer_classname = "ResourceProto"; +option go_package = "github.com/cncf/xds/go/xds/core/v3"; option java_multiple_files = true; +option java_outer_classname = "ResourceProto"; option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - option (xds.annotations.v3.file_status).work_in_progress = true; // xDS resource wrapper. This encapsulates a xDS resource when appearing in an diff --git a/xds/core/v3/resource_locator.proto b/xds/core/v3/resource_locator.proto index 9b40d52f..a85d0b16 100644 --- a/xds/core/v3/resource_locator.proto +++ b/xds/core/v3/resource_locator.proto @@ -2,16 +2,14 @@ syntax = "proto3"; package xds.core.v3; +import "validate/validate.proto"; import "xds/annotations/v3/status.proto"; import "xds/core/v3/context_params.proto"; -import "validate/validate.proto"; - -option java_outer_classname = "ResourceLocatorProto"; +option go_package = "github.com/cncf/xds/go/xds/core/v3"; option java_multiple_files = true; +option java_outer_classname = "ResourceLocatorProto"; option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - option (xds.annotations.v3.file_status).work_in_progress = true; // xDS resource locators identify a xDS resource name and instruct the @@ -106,7 +104,10 @@ message ResourceLocator { // field specified. When specified, the entry directive allows // ResourceLocator to directly reference these inlined resources, e.g. // xdstp://.../foo#entry=bar. - string entry = 2 [(validate.rules).string = {min_len: 1, pattern: "^[0-9a-zA-Z_\\-\\./~:]+$"}]; + string entry = 2 [(validate.rules).string = { + min_len: 1 + pattern: "^[0-9a-zA-Z_\\-\\./~:]+$" + }]; } } diff --git a/xds/core/v3/resource_name.proto b/xds/core/v3/resource_name.proto index 0f3d9974..31fc73e3 100644 --- a/xds/core/v3/resource_name.proto +++ b/xds/core/v3/resource_name.proto @@ -2,16 +2,14 @@ syntax = "proto3"; package xds.core.v3; +import "validate/validate.proto"; import "xds/annotations/v3/status.proto"; import "xds/core/v3/context_params.proto"; -import "validate/validate.proto"; - -option java_outer_classname = "ResourceNameProto"; +option go_package = "github.com/cncf/xds/go/xds/core/v3"; option java_multiple_files = true; +option java_outer_classname = "ResourceNameProto"; option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - option (xds.annotations.v3.file_status).work_in_progress = true; // xDS resource name. This has a canonical xdstp:// URI representation: diff --git a/xds/data/orca/v3/orca_load_report.proto b/xds/data/orca/v3/orca_load_report.proto index 1b084758..3eab35cd 100644 --- a/xds/data/orca/v3/orca_load_report.proto +++ b/xds/data/orca/v3/orca_load_report.proto @@ -2,12 +2,12 @@ syntax = "proto3"; package xds.data.orca.v3; -option java_outer_classname = "OrcaLoadReportProto"; +import "validate/validate.proto"; + +option go_package = "github.com/cncf/xds/go/xds/data/orca/v3"; option java_multiple_files = true; +option java_outer_classname = "OrcaLoadReportProto"; option java_package = "com.github.xds.data.orca.v3"; -option go_package = "github.com/cncf/xds/go/xds/data/orca/v3"; - -import "validate/validate.proto"; // See section `ORCA load report format` of the design document in // https://github.com/envoyproxy/envoy/issues/6614. @@ -21,7 +21,10 @@ message OrcaLoadReport { // Memory utilization expressed as a fraction of available memory // resources. This should be derived from the latest sample or measurement. - double mem_utilization = 2 [(validate.rules).double.gte = 0, (validate.rules).double.lte = 1]; + double mem_utilization = 2 [ + (validate.rules).double.gte = 0, + (validate.rules).double.lte = 1 + ]; // Total RPS being served by an endpoint. This should cover all services that an endpoint is // responsible for. @@ -34,8 +37,10 @@ message OrcaLoadReport { // Resource utilization values. Each value is expressed as a fraction of total resources // available, derived from the latest sample or measurement. - map utilization = 5 - [(validate.rules).map.values.double.gte = 0, (validate.rules).map.values.double.lte = 1]; + map utilization = 5 [ + (validate.rules).map.values.double.gte = 0, + (validate.rules).map.values.double.lte = 1 + ]; // Total RPS being served by an endpoint. This should cover all services that an endpoint is // responsible for. diff --git a/xds/service/orca/v3/orca.proto b/xds/service/orca/v3/orca.proto index 03126cdc..db391fdd 100644 --- a/xds/service/orca/v3/orca.proto +++ b/xds/service/orca/v3/orca.proto @@ -2,14 +2,13 @@ syntax = "proto3"; package xds.service.orca.v3; -option java_outer_classname = "OrcaProto"; -option java_multiple_files = true; -option java_package = "com.github.xds.service.orca.v3"; -option go_package = "github.com/cncf/xds/go/xds/service/orca/v3"; - +import "google/protobuf/duration.proto"; import "xds/data/orca/v3/orca_load_report.proto"; -import "google/protobuf/duration.proto"; +option go_package = "github.com/cncf/xds/go/xds/service/orca/v3"; +option java_multiple_files = true; +option java_outer_classname = "OrcaProto"; +option java_package = "com.github.xds.service.orca.v3"; // See section `Out-of-band (OOB) reporting` of the design document in // :ref:`https://github.com/envoyproxy/envoy/issues/6614`. diff --git a/xds/type/matcher/v3/cel.proto b/xds/type/matcher/v3/cel.proto index a45af953..3990a606 100644 --- a/xds/type/matcher/v3/cel.proto +++ b/xds/type/matcher/v3/cel.proto @@ -2,13 +2,13 @@ syntax = "proto3"; package xds.type.matcher.v3; -import "xds/type/v3/cel.proto"; import "validate/validate.proto"; +import "xds/type/v3/cel.proto"; -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "CelProto"; -option java_multiple_files = true; option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; +option java_multiple_files = true; +option java_outer_classname = "CelProto"; +option java_package = "com.github.xds.type.matcher.v3"; // [#protodoc-title: Common Expression Language (CEL) matchers] diff --git a/xds/type/matcher/v3/domain.proto b/xds/type/matcher/v3/domain.proto index 06f11d70..6ef8fa07 100644 --- a/xds/type/matcher/v3/domain.proto +++ b/xds/type/matcher/v3/domain.proto @@ -2,16 +2,14 @@ syntax = "proto3"; package xds.type.matcher.v3; +import "validate/validate.proto"; import "xds/annotations/v3/status.proto"; import "xds/type/matcher/v3/matcher.proto"; -import "validate/validate.proto"; - -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "ServerNameMatcherProto"; -option java_multiple_files = true; option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; - +option java_multiple_files = true; +option java_outer_classname = "ServerNameMatcherProto"; +option java_package = "com.github.xds.type.matcher.v3"; option (xds.annotations.v3.file_status).work_in_progress = true; // [#protodoc-title: Server name matcher] @@ -26,7 +24,7 @@ message ServerNameMatcher { message DomainMatcher { // A non-empty set of domain names with optional wildcards, e.g. // ``www.example.com``, ``*.com``, or ``*``. - repeated string domains = 1 [ (validate.rules).repeated = {min_items : 1} ]; + repeated string domains = 1 [(validate.rules).repeated = {min_items: 1}]; // Match action to apply when the server name matches any of the domain // names in the matcher. diff --git a/xds/type/matcher/v3/http_inputs.proto b/xds/type/matcher/v3/http_inputs.proto index 5709d645..275c569d 100644 --- a/xds/type/matcher/v3/http_inputs.proto +++ b/xds/type/matcher/v3/http_inputs.proto @@ -2,10 +2,10 @@ syntax = "proto3"; package xds.type.matcher.v3; -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "HttpInputsProto"; -option java_multiple_files = true; option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; +option java_multiple_files = true; +option java_outer_classname = "HttpInputsProto"; +option java_package = "com.github.xds.type.matcher.v3"; // [#protodoc-title: Common HTTP Inputs] @@ -19,5 +19,4 @@ option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; // for usage details. // // [#comment: envoy.matching.inputs.cel_data_input] -message HttpAttributesCelMatchInput { -} +message HttpAttributesCelMatchInput {} diff --git a/xds/type/matcher/v3/ip.proto b/xds/type/matcher/v3/ip.proto index ad3ab065..22943b0b 100644 --- a/xds/type/matcher/v3/ip.proto +++ b/xds/type/matcher/v3/ip.proto @@ -2,17 +2,15 @@ syntax = "proto3"; package xds.type.matcher.v3; +import "validate/validate.proto"; import "xds/annotations/v3/status.proto"; import "xds/core/v3/cidr.proto"; import "xds/type/matcher/v3/matcher.proto"; -import "validate/validate.proto"; - -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "IPMatcherProto"; -option java_multiple_files = true; option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; - +option java_multiple_files = true; +option java_outer_classname = "IPMatcherProto"; +option java_package = "com.github.xds.type.matcher.v3"; option (xds.annotations.v3.file_status).work_in_progress = true; // [#protodoc-title: IP matcher] diff --git a/xds/type/matcher/v3/matcher.proto b/xds/type/matcher/v3/matcher.proto index cc03ff6e..e7f1daa5 100644 --- a/xds/type/matcher/v3/matcher.proto +++ b/xds/type/matcher/v3/matcher.proto @@ -2,15 +2,14 @@ syntax = "proto3"; package xds.type.matcher.v3; +import "validate/validate.proto"; import "xds/core/v3/extension.proto"; import "xds/type/matcher/v3/string.proto"; -import "validate/validate.proto"; - -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "MatcherProto"; -option java_multiple_files = true; option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; +option java_multiple_files = true; +option java_outer_classname = "MatcherProto"; +option java_package = "com.github.xds.type.matcher.v3"; // [#protodoc-title: Unified Matcher API] diff --git a/xds/type/matcher/v3/range.proto b/xds/type/matcher/v3/range.proto index 58340097..0da30ba9 100644 --- a/xds/type/matcher/v3/range.proto +++ b/xds/type/matcher/v3/range.proto @@ -2,15 +2,14 @@ syntax = "proto3"; package xds.type.matcher.v3; -import "xds/type/v3/range.proto"; -import "xds/type/matcher/v3/matcher.proto"; - import "validate/validate.proto"; +import "xds/type/matcher/v3/matcher.proto"; +import "xds/type/v3/range.proto"; -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "RangeProto"; -option java_multiple_files = true; option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; +option java_multiple_files = true; +option java_outer_classname = "RangeProto"; +option java_package = "com.github.xds.type.matcher.v3"; // [#protodoc-title: Range matcher] @@ -20,8 +19,7 @@ message Int64RangeMatcher { // Specifies a list of number ranges and a match action. message RangeMatcher { // A non-empty set of int64 ranges. - repeated xds.type.v3.Int64Range ranges = 1 - [(validate.rules).repeated = { min_items: 1 }]; + repeated xds.type.v3.Int64Range ranges = 1 [(validate.rules).repeated = {min_items: 1}]; // Match action to apply when the input number is within one of the ranges. Matcher.OnMatch on_match = 2; @@ -38,8 +36,7 @@ message Int32RangeMatcher { // Specifies a list of number ranges and a match action. message RangeMatcher { // A non-empty set of int32 ranges. - repeated xds.type.v3.Int32Range ranges = 1 - [(validate.rules).repeated = { min_items: 1 }]; + repeated xds.type.v3.Int32Range ranges = 1 [(validate.rules).repeated = {min_items: 1}]; // Match action to apply when the input number is within one of the ranges. Matcher.OnMatch on_match = 2; @@ -56,8 +53,7 @@ message DoubleRangeMatcher { // Specifies a list of number ranges and a match action. message RangeMatcher { // A non-empty set of double ranges. - repeated xds.type.v3.DoubleRange ranges = 1 - [(validate.rules).repeated = { min_items: 1 }]; + repeated xds.type.v3.DoubleRange ranges = 1 [(validate.rules).repeated = {min_items: 1}]; // Match action to apply when the input number is within one of the ranges. Matcher.OnMatch on_match = 2; diff --git a/xds/type/matcher/v3/regex.proto b/xds/type/matcher/v3/regex.proto index 3ff4ca95..00e34564 100644 --- a/xds/type/matcher/v3/regex.proto +++ b/xds/type/matcher/v3/regex.proto @@ -4,10 +4,10 @@ package xds.type.matcher.v3; import "validate/validate.proto"; -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "RegexProto"; -option java_multiple_files = true; option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; +option java_multiple_files = true; +option java_outer_classname = "RegexProto"; +option java_package = "com.github.xds.type.matcher.v3"; // [#protodoc-title: Regex matcher] @@ -37,10 +37,10 @@ message RegexMatcher { option (validate.required) = true; // Google's RE2 regex engine. - GoogleRE2 google_re2 = 1 [ (validate.rules).message = {required : true} ]; + GoogleRE2 google_re2 = 1 [(validate.rules).message = {required: true}]; } // The regex match string. The string must be supported by the configured // engine. - string regex = 2 [ (validate.rules).string = {min_len : 1} ]; + string regex = 2 [(validate.rules).string = {min_len: 1}]; } diff --git a/xds/type/matcher/v3/string.proto b/xds/type/matcher/v3/string.proto index e58cb413..ed8ab09f 100644 --- a/xds/type/matcher/v3/string.proto +++ b/xds/type/matcher/v3/string.proto @@ -2,15 +2,14 @@ syntax = "proto3"; package xds.type.matcher.v3; +import "validate/validate.proto"; import "xds/core/v3/extension.proto"; import "xds/type/matcher/v3/regex.proto"; -import "validate/validate.proto"; - -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "StringProto"; -option java_multiple_files = true; option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; +option java_multiple_files = true; +option java_outer_classname = "StringProto"; +option java_package = "com.github.xds.type.matcher.v3"; // [#protodoc-title: String matcher] diff --git a/xds/type/v3/cel.proto b/xds/type/v3/cel.proto index 04399040..5418c55d 100644 --- a/xds/type/v3/cel.proto +++ b/xds/type/v3/cel.proto @@ -2,21 +2,18 @@ syntax = "proto3"; package xds.type.v3; -import "google/api/expr/v1alpha1/checked.proto"; -import "google/api/expr/v1alpha1/syntax.proto"; import "cel/expr/checked.proto"; import "cel/expr/syntax.proto"; +import "google/api/expr/v1alpha1/checked.proto"; +import "google/api/expr/v1alpha1/syntax.proto"; import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - import "validate/validate.proto"; +import "xds/annotations/v3/status.proto"; -option java_package = "com.github.xds.type.v3"; -option java_outer_classname = "CelProto"; -option java_multiple_files = true; option go_package = "github.com/cncf/xds/go/xds/type/v3"; - +option java_multiple_files = true; +option java_outer_classname = "CelProto"; +option java_package = "com.github.xds.type.v3"; option (xds.annotations.v3.file_status).work_in_progress = true; // [#protodoc-title: Common Expression Language (CEL)] @@ -29,13 +26,13 @@ message CelExpression { // // Deprecated -- use ``cel_expr_parsed`` field instead. // If ``cel_expr_parsed`` or ``cel_expr_checked`` is set, this field is not used. - google.api.expr.v1alpha1.ParsedExpr parsed_expr = 1 [deprecated = true]; + google.api.expr.v1alpha1.ParsedExpr parsed_expr = 1 [deprecated = true]; // Parsed expression in abstract syntax tree (AST) form that has been successfully type checked. // // Deprecated -- use ``cel_expr_checked`` field instead. // If ``cel_expr_parsed`` or ``cel_expr_checked`` is set, this field is not used. - google.api.expr.v1alpha1.CheckedExpr checked_expr = 2 [deprecated = true]; + google.api.expr.v1alpha1.CheckedExpr checked_expr = 2 [deprecated = true]; } // Parsed expression in abstract syntax tree (AST) form. diff --git a/xds/type/v3/range.proto b/xds/type/v3/range.proto index 8fc97ab2..5a702b71 100644 --- a/xds/type/v3/range.proto +++ b/xds/type/v3/range.proto @@ -2,10 +2,10 @@ syntax = "proto3"; package xds.type.v3; -option java_package = "com.github.xds.type.v3"; -option java_outer_classname = "RangeProto"; -option java_multiple_files = true; option go_package = "github.com/cncf/xds/go/xds/type/v3"; +option java_multiple_files = true; +option java_outer_classname = "RangeProto"; +option java_package = "com.github.xds.type.v3"; // [#protodoc-title: Number range] diff --git a/xds/type/v3/typed_struct.proto b/xds/type/v3/typed_struct.proto index 40d0a8da..47a8862d 100644 --- a/xds/type/v3/typed_struct.proto +++ b/xds/type/v3/typed_struct.proto @@ -2,12 +2,12 @@ syntax = "proto3"; package xds.type.v3; -option java_outer_classname = "TypedStructProto"; +import "google/protobuf/struct.proto"; + +option go_package = "github.com/cncf/xds/go/xds/type/v3"; option java_multiple_files = true; +option java_outer_classname = "TypedStructProto"; option java_package = "com.github.xds.type.v3"; -option go_package = "github.com/cncf/xds/go/xds/type/v3"; - -import "google/protobuf/struct.proto"; // A TypedStruct contains an arbitrary JSON serialized protocol buffer message with a URL that // describes the type of the serialized message. This is very similar to google.protobuf.Any,