|
|
|
@ -18,8 +18,10 @@ import "gogoproto/gogo.proto"; |
|
|
|
|
|
|
|
|
|
option (gogoproto.stable_marshaler_all) = true; |
|
|
|
|
|
|
|
|
|
// [#protodoc-title: Dubbo route configuration] |
|
|
|
|
// [#protodoc-title: Dubbo Proxy Route Configuration] |
|
|
|
|
// Dubbo Proxy :ref:`configuration overview <config_network_filters_dubbo_proxy>`. |
|
|
|
|
|
|
|
|
|
// [#comment:next free field: 6] |
|
|
|
|
message RouteConfiguration { |
|
|
|
|
// The name of the route configuration. Reserved for future use in asynchronous route discovery. |
|
|
|
|
string name = 1; |
|
|
|
@ -38,6 +40,7 @@ message RouteConfiguration { |
|
|
|
|
repeated Route routes = 5 [(gogoproto.nullable) = false]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// [#comment:next free field: 3] |
|
|
|
|
message Route { |
|
|
|
|
// Route matching parameters. |
|
|
|
|
RouteMatch match = 1 [(validate.rules).message.required = true, (gogoproto.nullable) = false]; |
|
|
|
@ -46,6 +49,35 @@ message Route { |
|
|
|
|
RouteAction route = 2 [(validate.rules).message.required = true, (gogoproto.nullable) = false]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// [#comment:next free field: 3] |
|
|
|
|
message RouteMatch { |
|
|
|
|
// Method level routing matching. |
|
|
|
|
MethodMatch method = 1; |
|
|
|
|
|
|
|
|
|
// 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 envoy.api.v2.route.HeaderMatcher headers = 2; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// [#comment:next free field: 3] |
|
|
|
|
message RouteAction { |
|
|
|
|
oneof cluster_specifier { |
|
|
|
|
option (validate.required) = true; |
|
|
|
|
|
|
|
|
|
// Indicates the upstream cluster to which the request should be routed. |
|
|
|
|
string cluster = 1; |
|
|
|
|
|
|
|
|
|
// Multiple upstream clusters can be specified for a given route. The |
|
|
|
|
// request is routed to one of the upstream clusters based on weights |
|
|
|
|
// assigned to each cluster. |
|
|
|
|
// Currently ClusterWeight only supports the name and weight fields. |
|
|
|
|
envoy.api.v2.route.WeightedCluster weighted_clusters = 2; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// [#comment:next free field: 5] |
|
|
|
|
message MethodMatch { |
|
|
|
|
// The name of the method. |
|
|
|
|
envoy.type.matcher.StringMatcher name = 1; |
|
|
|
@ -66,8 +98,7 @@ message MethodMatch { |
|
|
|
|
// Examples: |
|
|
|
|
// |
|
|
|
|
// * For range [-10,0), route will match for header value -1, but not for 0, |
|
|
|
|
// "somestring", 10.9, |
|
|
|
|
// "-1somestring" |
|
|
|
|
// "somestring", 10.9, "-1somestring" |
|
|
|
|
envoy.type.Int64Range range_match = 4; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -77,32 +108,3 @@ message MethodMatch { |
|
|
|
|
// The value is the parameter matching type. |
|
|
|
|
map<uint32, ParameterMatchSpecifier> params_match = 2; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
message RouteMatch { |
|
|
|
|
// Method level routing matching. |
|
|
|
|
MethodMatch method = 1; |
|
|
|
|
|
|
|
|
|
// 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 envoy.api.v2.route.HeaderMatcher headers = 2; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// [#comment:next free field: 2] |
|
|
|
|
message RouteAction { |
|
|
|
|
oneof cluster_specifier { |
|
|
|
|
option (validate.required) = true; |
|
|
|
|
|
|
|
|
|
// Indicates the upstream cluster to which the request should be routed. |
|
|
|
|
string cluster = 1; |
|
|
|
|
|
|
|
|
|
// Multiple upstream clusters can be specified for a given route. The |
|
|
|
|
// request is routed to one of the upstream clusters based on weights |
|
|
|
|
// assigned to each cluster. |
|
|
|
|
// |
|
|
|
|
// .. note:: |
|
|
|
|
// Currently ClusterWeight only supports the name and weight fields. |
|
|
|
|
envoy.api.v2.route.WeightedCluster weighted_clusters = 2; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|