redis proxy : read commands policy for prefix route (#29719)

Signed-off-by: Liang Peng <ikenchina@gmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ 0bc754a213b6cd28c7117c82de0f721bb19d6ef2
main
update-envoy[bot] 1 year ago
parent 6402d31ee2
commit 08aa80def0
  1. 10
      envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto

@ -138,7 +138,7 @@ message RedisProxy {
option (udpa.annotations.versioning).previous_message_type = option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.network.redis_proxy.v2.RedisProxy.PrefixRoutes"; "envoy.config.filter.network.redis_proxy.v2.RedisProxy.PrefixRoutes";
// [#next-free-field: 6] // [#next-free-field: 7]
message Route { message Route {
option (udpa.annotations.versioning).previous_message_type = option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.network.redis_proxy.v2.RedisProxy.PrefixRoutes.Route"; "envoy.config.filter.network.redis_proxy.v2.RedisProxy.PrefixRoutes.Route";
@ -168,6 +168,11 @@ message RedisProxy {
bool exclude_read_commands = 3; bool exclude_read_commands = 3;
} }
// ReadCommandPolicy specifies that Envoy should route read commands to another cluster.
message ReadCommandPolicy {
string cluster = 1 [(validate.rules).string = {min_len: 1}];
}
// String prefix that must match the beginning of the keys. Envoy will always favor the // String prefix that must match the beginning of the keys. Envoy will always favor the
// longest match. // longest match.
string prefix = 1 [(validate.rules).string = {max_bytes: 1000}]; string prefix = 1 [(validate.rules).string = {max_bytes: 1000}];
@ -184,6 +189,9 @@ message RedisProxy {
// Indicates how redis key should be formatted. To substitute redis key into the formatting // Indicates how redis key should be formatted. To substitute redis key into the formatting
// expression, use %KEY% as a string replacement command. // expression, use %KEY% as a string replacement command.
string key_formatter = 5; string key_formatter = 5;
// Indicates that the route has a read command policy
ReadCommandPolicy read_command_policy = 6;
} }
reserved 3; reserved 3;

Loading…
Cancel
Save