lua support cluster specifier extension (#31034)
* lua cluster specifier api Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * fix api format Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * add validate for api filed Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * fix api format Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * implement lua cluster specifier plugin Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * fix format Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * fix format Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * fix format Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * add example Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * fix format Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * fix format Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * fix example Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * fix review Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * fix dep ci Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * add changelog Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * fix review Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * fix ut Signed-off-by: wangkai19 <wangkai19@corp.netease.com> * add test Signed-off-by: wangkai19 <wangkai19@corp.netease.com> --------- Signed-off-by: wangkai19 <wangkai19@corp.netease.com> Mirrored from https://github.com/envoyproxy/envoy @ 57f23d3092956972f2c23f869280310c7a65ca33main
parent
e17c813c1b
commit
5d0dac990e
4 changed files with 41 additions and 0 deletions
@ -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 = [ |
||||
"//envoy/config/core/v3:pkg", |
||||
"@com_github_cncf_xds//udpa/annotations:pkg", |
||||
], |
||||
) |
@ -0,0 +1,27 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.extensions.router.cluster_specifiers.lua.v3; |
||||
|
||||
import "envoy/config/core/v3/base.proto"; |
||||
|
||||
import "udpa/annotations/status.proto"; |
||||
import "validate/validate.proto"; |
||||
|
||||
option java_package = "io.envoyproxy.envoy.extensions.router.cluster_specifiers.lua.v3"; |
||||
option java_outer_classname = "LuaProto"; |
||||
option java_multiple_files = true; |
||||
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/router/cluster_specifiers/lua/v3;luav3"; |
||||
option (udpa.annotations.file_status).package_version_status = ACTIVE; |
||||
|
||||
// [#protodoc-title: Lua] |
||||
// |
||||
// Lua cluster specifier :ref:`configuration reference documentation <config_http_cluster_specifier_lua>`. |
||||
// [#extension: envoy.router.cluster_specifier_plugin.lua] |
||||
|
||||
message LuaConfig { |
||||
// The lua code that Envoy will execute to select cluster. |
||||
config.core.v3.DataSource source_code = 1 [(validate.rules).message = {required: true}]; |
||||
|
||||
// Default cluster. It will be used when the lua code execute failure. |
||||
string default_cluster = 2; |
||||
} |
Loading…
Reference in new issue