Implement rocketmq proxy Description: implement rocketmq proxy Risk Level: Low Testing: Unit Tests Docs Changes: N/A Release Notes: N/A Fixes #9431 Signed-off-by: aaron-ai <yangkun.ayk@alibaba-inc.com> Mirrored from https://github.com/envoyproxy/envoy @ 0a7dba7933af7c5e1ffd842d76d221881dd46a24master-ci-test
parent
d13be8de2d
commit
c3c065716f
6 changed files with 108 additions and 0 deletions
@ -0,0 +1,14 @@ |
||||
# DO NOT EDIT. This file is generated by tools/proto_sync.py. |
||||
|
||||
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_package( |
||||
deps = [ |
||||
"//envoy/config/core/v3:pkg", |
||||
"//envoy/config/route/v3:pkg", |
||||
"//envoy/type/matcher/v3:pkg", |
||||
"@com_github_cncf_udpa//udpa/annotations:pkg", |
||||
], |
||||
) |
@ -0,0 +1 @@ |
||||
Protocol buffer definitions for the Rocketmq proxy. |
@ -0,0 +1,36 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.extensions.filters.network.rocketmq_proxy.v3; |
||||
|
||||
import "envoy/extensions/filters/network/rocketmq_proxy/v3/route.proto"; |
||||
|
||||
import "google/protobuf/any.proto"; |
||||
import "google/protobuf/duration.proto"; |
||||
|
||||
import "udpa/annotations/status.proto"; |
||||
import "udpa/annotations/versioning.proto"; |
||||
import "validate/validate.proto"; |
||||
|
||||
option java_package = "io.envoyproxy.envoy.extensions.filters.network.rocketmq_proxy.v3"; |
||||
option java_outer_classname = "RocketmqProxyProto"; |
||||
option java_multiple_files = true; |
||||
option (udpa.annotations.file_status).package_version_status = ACTIVE; |
||||
|
||||
// [#protodoc-title: RocketMQ Proxy] |
||||
// RocketMQ Proxy :ref:`configuration overview <config_network_filters_rocketmq_proxy>`. |
||||
// [#extension: envoy.filters.network.rocketmq_proxy] |
||||
|
||||
message RocketmqProxy { |
||||
// The human readable prefix to use when emitting statistics. |
||||
string stat_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; |
||||
|
||||
// The route table for the connection manager is specified in this property. |
||||
RouteConfiguration route_config = 2; |
||||
|
||||
// The largest duration transient object expected to live, more than 10s is recommended. |
||||
google.protobuf.Duration transient_object_life_span = 3; |
||||
|
||||
// If develop_mode is enabled, this proxy plugin may work without dedicated traffic intercepting |
||||
// facility without considering backward compatibility of exiting RocketMQ client SDK. |
||||
bool develop_mode = 4; |
||||
} |
@ -0,0 +1,55 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.extensions.filters.network.rocketmq_proxy.v3; |
||||
|
||||
import "envoy/config/core/v3/base.proto"; |
||||
import "envoy/config/route/v3/route_components.proto"; |
||||
import "envoy/type/matcher/v3/string.proto"; |
||||
|
||||
import "udpa/annotations/status.proto"; |
||||
import "udpa/annotations/versioning.proto"; |
||||
import "validate/validate.proto"; |
||||
|
||||
option java_package = "io.envoyproxy.envoy.extensions.filters.network.rocketmq_proxy.v3"; |
||||
option java_outer_classname = "RouteProto"; |
||||
option java_multiple_files = true; |
||||
option (udpa.annotations.file_status).package_version_status = ACTIVE; |
||||
|
||||
// [#protodoc-title: Rocketmq Proxy Route Configuration] |
||||
// Rocketmq Proxy :ref:`configuration overview <config_network_filters_rocketmq_proxy>`. |
||||
|
||||
message RouteConfiguration { |
||||
// The name of the route configuration. |
||||
string name = 1; |
||||
|
||||
// The list of routes that will be matched, in order, against incoming requests. The first route |
||||
// that matches will be used. |
||||
repeated Route routes = 2; |
||||
} |
||||
|
||||
message Route { |
||||
// Route matching parameters. |
||||
RouteMatch match = 1 [(validate.rules).message = {required: true}]; |
||||
|
||||
// Route request to some upstream cluster. |
||||
RouteAction route = 2 [(validate.rules).message = {required: true}]; |
||||
} |
||||
|
||||
message RouteMatch { |
||||
// The name of the topic. |
||||
type.matcher.v3.StringMatcher topic = 1 [(validate.rules).message = {required: true}]; |
||||
|
||||
// Specifies a set of headers that the route should match on. The router will check the request’s |
||||
// headers against all the specified headers in the route config. A match will happen if all the |
||||
// headers in the route are present in the request with the same values (or based on presence if |
||||
// the value field is not in the config). |
||||
repeated config.route.v3.HeaderMatcher headers = 2; |
||||
} |
||||
|
||||
message RouteAction { |
||||
// Indicates the upstream cluster to which the request should be routed. |
||||
string cluster = 1 [(validate.rules).string = {min_bytes: 1}]; |
||||
|
||||
// Optional endpoint metadata match criteria used by the subset load balancer. |
||||
config.core.v3.Metadata metadata_match = 2; |
||||
} |
Loading…
Reference in new issue