diff --git a/BUILD b/BUILD index 8786b5d7..c9d53165 100644 --- a/BUILD +++ b/BUILD @@ -96,6 +96,7 @@ proto_library( "//contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha:pkg", "//contrib/envoy/extensions/private_key_providers/qat/v3alpha:pkg", "//contrib/envoy/extensions/regex_engines/hyperscan/v3alpha:pkg", + "//contrib/envoy/extensions/router/cluster_specifier/golang/v3alpha:pkg", "//contrib/envoy/extensions/vcl/v3alpha:pkg", "//envoy/admin/v3:pkg", "//envoy/config/accesslog/v3:pkg", diff --git a/contrib/envoy/extensions/router/cluster_specifier/golang/v3alpha/BUILD b/contrib/envoy/extensions/router/cluster_specifier/golang/v3alpha/BUILD new file mode 100644 index 00000000..ec1e778e --- /dev/null +++ b/contrib/envoy/extensions/router/cluster_specifier/golang/v3alpha/BUILD @@ -0,0 +1,12 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "@com_github_cncf_udpa//udpa/annotations:pkg", + "@com_github_cncf_udpa//xds/annotations/v3:pkg", + ], +) diff --git a/contrib/envoy/extensions/router/cluster_specifier/golang/v3alpha/golang.proto b/contrib/envoy/extensions/router/cluster_specifier/golang/v3alpha/golang.proto new file mode 100644 index 00000000..f22685af --- /dev/null +++ b/contrib/envoy/extensions/router/cluster_specifier/golang/v3alpha/golang.proto @@ -0,0 +1,51 @@ +syntax = "proto3"; + +package envoy.extensions.router.cluster_specifier.golang.v3alpha; + +import "google/protobuf/any.proto"; + +import "xds/annotations/v3/status.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.router.cluster_specifier.golang.v3alpha"; +option java_outer_classname = "GolangProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/router/cluster_specifier/golang/v3alpha"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; +option (xds.annotations.v3.file_status).work_in_progress = true; + +// [#protodoc-title: Golang] +// +// For an overview of the Golang cluster specifier please see the :ref:`configuration reference documentation `. +// [#extension: envoy.router.cluster_specifier_plugin.golang] + +// [#extension-category: envoy.router.cluster_specifier_plugin] +message Config { + // Globally unique ID for a dynamic library file. + string library_id = 1 [(validate.rules).string = {min_len: 1}]; + + // Path to a dynamic library implementing the + // :repo:`ClusterSpecifier API ` + // interface. + // [#comment:TODO(wangfakang): Support for downloading libraries from remote repositories.] + string library_path = 2 [(validate.rules).string = {min_len: 1}]; + + // Default cluster. + // + // It will be used when the specifier interface return empty string or panic. + // + string default_cluster = 3 [(validate.rules).string = {min_len: 1}]; + + // Configuration for the Go cluster specifier plugin. + // + // .. note:: + // This configuration is only parsed in the go cluster specifier, and is therefore not validated + // by Envoy. + // + // See the :repo:`StreamFilter API ` + // for more information about how the plugin's configuration data can be accessed. + // + google.protobuf.Any config = 4; +} diff --git a/versioning/BUILD b/versioning/BUILD index 309506ce..651b30d2 100644 --- a/versioning/BUILD +++ b/versioning/BUILD @@ -34,6 +34,7 @@ proto_library( "//contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha:pkg", "//contrib/envoy/extensions/private_key_providers/qat/v3alpha:pkg", "//contrib/envoy/extensions/regex_engines/hyperscan/v3alpha:pkg", + "//contrib/envoy/extensions/router/cluster_specifier/golang/v3alpha:pkg", "//contrib/envoy/extensions/vcl/v3alpha:pkg", "//envoy/admin/v3:pkg", "//envoy/config/accesslog/v3:pkg",