From e0e1e1d73a6f873882e202a895ff19ee2e2c2371 Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Mon, 12 Aug 2024 20:00:13 +0800 Subject: [PATCH 01/15] feat: add ratelimit spec & remove temporary proto files --- api/v1/fault_tolerance/circuitbreaker.proto | 17 - api/v1/model/model.proto | 17 + api/v1/traffic_manage/ratelimit.proto | 11 + .../src/main/package-info.md | 1 + .../src/main/proto/auth.proto | 197 ---------- .../src/main/proto/circuitbreaker.proto | 356 ------------------ .../src/main/proto/client.proto | 45 --- .../src/main/proto/code.proto | 194 ---------- .../src/main/proto/config_file.proto | 213 ----------- .../src/main/proto/config_file_response.proto | 82 ---- .../src/main/proto/configrelease.proto | 24 -- .../src/main/proto/contract.proto | 75 ---- .../src/main/proto/fault_detector.proto | 90 ----- .../src/main/proto/grpc_config_api.proto | 37 -- .../src/main/proto/grpcapi.proto | 44 --- .../src/main/proto/grpcapi_ratelimiter.proto | 17 - .../src/main/proto/heartbeat.proto | 47 --- .../src/main/proto/lane.proto | 108 ------ .../src/main/proto/model.proto | 71 ---- .../src/main/proto/namespace.proto | 35 -- .../src/main/proto/ratelimit.proto | 216 ----------- .../src/main/proto/ratelimiter.proto | 211 ----------- .../src/main/proto/request.proto | 41 -- .../src/main/proto/response.proto | 126 ------- .../src/main/proto/routing.proto | 275 -------------- .../src/main/proto/service.proto | 109 ------ 26 files changed, 29 insertions(+), 2630 deletions(-) create mode 100644 source/java/polaris-specification/src/main/package-info.md delete mode 100644 source/java/polaris-specification/src/main/proto/auth.proto delete mode 100644 source/java/polaris-specification/src/main/proto/circuitbreaker.proto delete mode 100644 source/java/polaris-specification/src/main/proto/client.proto delete mode 100644 source/java/polaris-specification/src/main/proto/code.proto delete mode 100644 source/java/polaris-specification/src/main/proto/config_file.proto delete mode 100644 source/java/polaris-specification/src/main/proto/config_file_response.proto delete mode 100644 source/java/polaris-specification/src/main/proto/configrelease.proto delete mode 100644 source/java/polaris-specification/src/main/proto/contract.proto delete mode 100644 source/java/polaris-specification/src/main/proto/fault_detector.proto delete mode 100644 source/java/polaris-specification/src/main/proto/grpc_config_api.proto delete mode 100644 source/java/polaris-specification/src/main/proto/grpcapi.proto delete mode 100644 source/java/polaris-specification/src/main/proto/grpcapi_ratelimiter.proto delete mode 100644 source/java/polaris-specification/src/main/proto/heartbeat.proto delete mode 100644 source/java/polaris-specification/src/main/proto/lane.proto delete mode 100644 source/java/polaris-specification/src/main/proto/model.proto delete mode 100644 source/java/polaris-specification/src/main/proto/namespace.proto delete mode 100644 source/java/polaris-specification/src/main/proto/ratelimit.proto delete mode 100644 source/java/polaris-specification/src/main/proto/ratelimiter.proto delete mode 100644 source/java/polaris-specification/src/main/proto/request.proto delete mode 100644 source/java/polaris-specification/src/main/proto/response.proto delete mode 100644 source/java/polaris-specification/src/main/proto/routing.proto delete mode 100644 source/java/polaris-specification/src/main/proto/service.proto diff --git a/api/v1/fault_tolerance/circuitbreaker.proto b/api/v1/fault_tolerance/circuitbreaker.proto index a47f2341..c7c95b58 100644 --- a/api/v1/fault_tolerance/circuitbreaker.proto +++ b/api/v1/fault_tolerance/circuitbreaker.proto @@ -327,23 +327,6 @@ message FaultDetectConfig { bool enable = 1; } -// fallback config -message FallbackConfig { - bool enable = 1; - FallbackResponse response = 2; -} - -// fallback response -message FallbackResponse { - int32 code = 1; - message MessageHeader { - string key = 1; - string value = 2; - } - repeated MessageHeader headers = 2; - string body = 3; -} - // blocking strategy message BlockConfig { string name = 1 [ json_name = "name" ]; diff --git a/api/v1/model/model.proto b/api/v1/model/model.proto index b24d8547..d31ab786 100644 --- a/api/v1/model/model.proto +++ b/api/v1/model/model.proto @@ -68,4 +68,21 @@ message API { string method = 2 [ json_name = "method" ]; // API的路径,支持多种匹配方式 MatchString path = 3 [ json_name = "path" ]; +} + +// fallback config +message FallbackConfig { + bool enable = 1; + FallbackResponse response = 2; +} + +// fallback response +message FallbackResponse { + int32 code = 1; + message MessageHeader { + string key = 1; + string value = 2; + } + repeated MessageHeader headers = 2; + string body = 3; } \ No newline at end of file diff --git a/api/v1/traffic_manage/ratelimit.proto b/api/v1/traffic_manage/ratelimit.proto index a12d17f5..de1d049c 100644 --- a/api/v1/traffic_manage/ratelimit.proto +++ b/api/v1/traffic_manage/ratelimit.proto @@ -96,6 +96,10 @@ message Rule { google.protobuf.UInt32Value max_queue_delay = 26 [json_name = "max_queue_delay"]; // 限流规则标签数据 map metadata = 50; + // amount for concurrency rate-limit + ConcurrencyAmount concurrencyAmount = 27 [ json_name = "concurrency_amount" ]; + // fallback configuration + FallbackConfig fallbackConfig = 28 [ json_name = "fallback_config" ]; } message MatchArgument { @@ -113,6 +117,8 @@ message MatchArgument { CALLER_SERVICE = 4; // caller host ip CALLER_IP =5; + // caller instance metadata + CALLER_METADATA = 6; } Type type = 1; // header key or query key @@ -121,6 +127,11 @@ message MatchArgument { MatchString value = 3; } +// concurrency rate-limit amount config +message ConcurrencyAmount { + uint32 maxAmount = 1 [ json_name = "maxAmount" ]; +} + // 分布式限流服务集群 message RateLimitCluster { google.protobuf.StringValue service = 1; diff --git a/source/java/polaris-specification/src/main/package-info.md b/source/java/polaris-specification/src/main/package-info.md new file mode 100644 index 00000000..88d050b1 --- /dev/null +++ b/source/java/polaris-specification/src/main/package-info.md @@ -0,0 +1 @@ +main \ No newline at end of file diff --git a/source/java/polaris-specification/src/main/proto/auth.proto b/source/java/polaris-specification/src/main/proto/auth.proto deleted file mode 100644 index 163f3e09..00000000 --- a/source/java/polaris-specification/src/main/proto/auth.proto +++ /dev/null @@ -1,197 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "google/protobuf/wrappers.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/security"; -option java_package = "com.tencent.polaris.specification.api.v1.security"; -option java_outer_classname = "SecurityProto"; - -enum AuthAction { - // deprecated_filed 该字段从未使用过 - ONLY_READ = 0; - // deprecated_filed 使用 ALLOW 进行替代 - READ_WRITE = 1; - ALLOW = 10; - DENY = 11; -} - -enum ResourceType { - Namespaces = 0; - Services = 1; - ConfigGroups = 2; - RouteRules = 3; - RateLimitRules = 4; - CircuitBreakerRules = 5; - FaultDetectRules = 6; - LaneRules = 7; - Users = 20; - UserGroups = 21; - Roles = 22; - PolicyRules = 23; -} - -message LoginRequest { - google.protobuf.StringValue owner = 1; - google.protobuf.StringValue name = 2; - google.protobuf.StringValue password = 3; - map options = 4; -} - -message LoginResponse { - google.protobuf.StringValue user_id = 1 [ json_name = "user_id" ]; - google.protobuf.StringValue name = 2; - google.protobuf.StringValue role = 3; - google.protobuf.StringValue owner_id = 4 [ json_name = "owner_id" ]; - google.protobuf.StringValue token = 5; - map options = 6; -} - -message User { - google.protobuf.StringValue id = 1; - google.protobuf.StringValue name = 2; - google.protobuf.StringValue password = 3; - google.protobuf.StringValue owner = 4; - google.protobuf.StringValue source = 5; - google.protobuf.StringValue auth_token = 6 [ json_name = "auth_token" ]; - google.protobuf.BoolValue token_enable = 7 [ json_name = "token_enable" ]; - google.protobuf.StringValue comment = 8; - google.protobuf.StringValue ctime = 9; - google.protobuf.StringValue mtime = 10; - google.protobuf.StringValue user_type = 11 [ json_name = "user_type" ]; - google.protobuf.StringValue mobile = 12; - google.protobuf.StringValue email = 13; - map metadata = 14; -} - -message ModifyUserPassword { - google.protobuf.StringValue id = 1; - google.protobuf.StringValue old_password = 2 [ json_name = "old_password" ]; - google.protobuf.StringValue new_password = 3 [ json_name = "new_password" ]; -} - -message UserGroupRelation { - google.protobuf.StringValue group_id = 1 [ json_name = "group_id" ]; - repeated User users = 2; -} - -message UserGroup { - google.protobuf.StringValue id = 1; - google.protobuf.StringValue name = 2; - google.protobuf.StringValue owner = 3; - google.protobuf.StringValue auth_token = 4 [ json_name = "auth_token" ]; - google.protobuf.BoolValue token_enable = 5 [ json_name = "token_enable" ]; - google.protobuf.StringValue comment = 6; - google.protobuf.StringValue ctime = 7; - google.protobuf.StringValue mtime = 8; - UserGroupRelation relation = 9; - google.protobuf.UInt32Value user_count = 10 [ json_name = "user_count" ]; - google.protobuf.StringValue source = 11; - map metadata = 12; -} - -message ModifyUserGroup { - google.protobuf.StringValue id = 1; - google.protobuf.StringValue owner = 2; - google.protobuf.StringValue name = 3; - google.protobuf.StringValue auth_token = 4 [ json_name = "auth_token" ]; - google.protobuf.BoolValue token_enable = 5 [ json_name = "token_enable" ]; - google.protobuf.StringValue comment = 6; - UserGroupRelation add_relations = 7 [ json_name = "add_relations" ]; - UserGroupRelation remove_relations = 8 [ json_name = "remove_relations" ]; - map metadata = 9; - google.protobuf.StringValue source = 10; -} - -message Role { - string id = 1; - string name = 2; - string owner = 4; - string source = 5; - bool default_role = 6 [ json_name = "default_role" ]; - map metadata = 7; - string comment = 8; - string ctime = 9; - string mtime = 10; - repeated User users = 20; - repeated UserGroup user_groups = 21 [ json_name = "user_groups" ]; -} - -message Principal { - google.protobuf.StringValue id = 1; - google.protobuf.StringValue name = 2; -} - -message Principals { - repeated Principal users = 1; - repeated Principal groups = 2; - repeated Principal roles = 3; -} - -message StrategyResourceEntry { - google.protobuf.StringValue id = 1; - google.protobuf.StringValue namespace = 2; - google.protobuf.StringValue name = 3; -} - -message StrategyResources { - google.protobuf.StringValue strategy_id = 1 [ json_name = "strategy_id" ]; - repeated StrategyResourceEntry namespaces = 2; - repeated StrategyResourceEntry services = 3; - repeated StrategyResourceEntry config_groups = 4 - [ json_name = "config_groups" ]; - repeated StrategyResourceEntry route_rules = 5 [ json_name = "route_rules" ]; - repeated StrategyResourceEntry ratelimit_rules = 6 [ json_name = "ratelimit_rules" ]; - repeated StrategyResourceEntry circuitbreaker_rules = 7 [ json_name = "circuitbreaker_rules" ]; - repeated StrategyResourceEntry faultdetect_rules = 8 [ json_name = "faultdetect_rules" ]; - repeated StrategyResourceEntry lane_rules = 9 [ json_name = "lane_rules" ]; - - repeated StrategyResourceEntry users = 21 [ json_name = "users" ]; - repeated StrategyResourceEntry user_groups = 22 [ json_name = "user_groups" ]; - repeated StrategyResourceEntry roles = 23 [ json_name = "roles" ]; - repeated StrategyResourceEntry auth_policies = 24 [ json_name = "auth_policies" ]; -} - -message StrategyResourceLabel { - string key = 1; - string value = 2; - string compare_type = 3 [ json_name = "compare_type" ]; -} - -message AuthStrategy { - google.protobuf.StringValue id = 1; - google.protobuf.StringValue name = 2; - Principals principals = 3; - StrategyResources resources = 4; - AuthAction action = 5; - google.protobuf.StringValue comment = 6; - google.protobuf.StringValue owner = 7; - google.protobuf.StringValue ctime = 8; - google.protobuf.StringValue mtime = 9; - google.protobuf.StringValue auth_token = 10 [ json_name = "auth_token" ]; - google.protobuf.BoolValue default_strategy = 11 - [ json_name = "default_strategy" ]; - map metadata = 12; - google.protobuf.StringValue source = 13; - repeated string functions = 14; - repeated StrategyResourceLabel resource_labels = 15 - [ json_name = "resource_labels" ]; -} - -message ModifyAuthStrategy { - google.protobuf.StringValue id = 1; - google.protobuf.StringValue name = 2; - Principals add_principals = 3 [ json_name = "add_principals" ]; - Principals remove_principals = 4 [ json_name = "remove_principals" ]; - StrategyResources add_resources = 5 [ json_name = "add_resources" ]; - StrategyResources remove_resources = 6 [ json_name = "remove_resources" ]; - AuthAction action = 7; - google.protobuf.StringValue comment = 8; - google.protobuf.StringValue owner = 9; - map metadata = 12; - google.protobuf.StringValue source = 13; - repeated string functions = 14; - repeated StrategyResourceLabel resource_labels = 15 - [ json_name = "resource_labels" ]; -} diff --git a/source/java/polaris-specification/src/main/proto/circuitbreaker.proto b/source/java/polaris-specification/src/main/proto/circuitbreaker.proto deleted file mode 100644 index a47f2341..00000000 --- a/source/java/polaris-specification/src/main/proto/circuitbreaker.proto +++ /dev/null @@ -1,356 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "google/protobuf/wrappers.proto"; -import "google/protobuf/duration.proto"; -import "model.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/fault_tolerance"; -option java_package = "com.tencent.polaris.specification.api.v1.fault.tolerance"; -option java_outer_classname = "CircuitBreakerProto"; - -//单个熔断规则定义 -message CircuitBreaker { - // deprecated - google.protobuf.StringValue id = 1; - - // 规则版本 - // deprecated - google.protobuf.StringValue version = 2; - - // 规则名 - // deprecated - google.protobuf.StringValue name = 3; - - // 规则命名空间 - // deprecated - google.protobuf.StringValue namespace = 4; - - // 规则所属服务 - google.protobuf.StringValue service = 5; - google.protobuf.StringValue service_namespace = 6; - - //熔断规则可以分为被调规则和主调规则 - //被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效 - //主调规则为当前主调方的规则,假如不指定则针对所有被调生效 - // deprecated - repeated CbRule inbounds = 7; - // deprecated - repeated CbRule outbounds = 8; - - // deprecated - google.protobuf.StringValue token = 9; - // deprecated - google.protobuf.StringValue owners = 10; - - // 业务 - // deprecated - google.protobuf.StringValue business = 11; - // 部门 - // deprecated - google.protobuf.StringValue department = 12; - - // 规则描述 - // deprecated - google.protobuf.StringValue comment = 13; - // deprecated - google.protobuf.StringValue ctime = 14; - // deprecated - google.protobuf.StringValue mtime = 15; - - google.protobuf.StringValue revision = 16; - - reserved 17 to 20; - // circuitbreaker rules for current service - repeated CircuitBreakerRule rules = 21; -} - -// 主调匹配规则 -message SourceMatcher { - // 主调命名空间以及服务名,可以为*,代表全匹配 - google.protobuf.StringValue service = 1; - google.protobuf.StringValue namespace = 2; - // 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等 - map labels = 3; -} - -// 熔断恢复配置 -message RecoverConfig { - // 触发熔断后到半开状态之间的等待间隔 - google.protobuf.Duration sleepWindow = 1; - // 半开后,最多重试多少次恢复 - google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2; - // 半开后放量的最大百分比 - repeated google.protobuf.UInt32Value requestRateAfterHalfOpen = 3; - // 熔断器半开到关闭所必须的最少成功率,默认100% - google.protobuf.UInt32Value successRateToClose = 4; - // 半开后最大放量数(用户不配置最大百分比时默认使用该配置) - google.protobuf.UInt32Value requestCountAfterHalfOpen = 5; - //主动探测配置 - enum OutlierDetectWhen { - //不开启监控探测 - NEVER = 0; - //只有在熔断恢复时才开启健康探测 - ON_RECOVER = 1; - //一直开启健康探测 - ALWAYS = 2; - } - OutlierDetectWhen outlierDetectWhen = 6; -} - -// 熔断策略 -message CbPolicy { - // 错误率熔断配置 - message ErrRateConfig { - //是否启用错误率配置 - google.protobuf.BoolValue enable = 1; - // 触发错误率熔断的最低请求阈值 - google.protobuf.UInt32Value requestVolumeThreshold = 2; - // 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态 - google.protobuf.UInt32Value errorRateToPreserved = 3; - // 触发熔断的错误率阈值 - google.protobuf.UInt32Value errorRateToOpen = 4; - //错误码相关特定配置 - message SpecialConfig { - // 熔断关心的错误类型,用户可以自己定义 - google.protobuf.StringValue type = 1; - repeated google.protobuf.Int64Value errorCodes = 2; - google.protobuf.UInt32Value errorRateToPreserved = 3; - google.protobuf.UInt32Value errorRateToOpen = 4; - } - repeated SpecialConfig specials = 5; - } - ErrRateConfig errorRate = 1; - // 慢调用率熔断策略配置 - message SlowRateConfig { - // 是否启用慢调用率配置 - google.protobuf.BoolValue enable = 1; - // 最大响应时间,超过该时间属于慢调用请求 - google.protobuf.Duration maxRt = 2; - // 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态 - google.protobuf.UInt32Value slowRateToPreserved = 3; - // 触发熔断的超时率阈值 - google.protobuf.UInt32Value slowRateToOpen = 4; - } - SlowRateConfig slowRate = 2; - // 熔断的决策周期,多久触发一次熔断决策 - google.protobuf.Duration judgeDuration = 3; - //最大熔断比例,超过多少比例后不会继续熔断 - google.protobuf.UInt32Value maxEjectionPercent = 4; - //连续错误数熔断配置 - message ConsecutiveErrConfig { - // 是否启用连续错误数配置 - google.protobuf.BoolValue enable = 1; - // 连续错误数阈值,进入Preserved状态 - google.protobuf.UInt32Value consecutiveErrorToPreserved = 2; - // 连续错误数阈值,进入Open状态 - google.protobuf.UInt32Value consecutiveErrorToOpen = 3; - } - ConsecutiveErrConfig consecutive = 5; -} - -// 目标set的规则 -message DestinationSet { - // 被调命名空间以及服务名,可以为*,代表全匹配 - google.protobuf.StringValue service = 1; - google.protobuf.StringValue namespace = 2; - // 可选,SUBSET标识 - map metadata = 3; - // 需要进行熔断的资源 - // 支持SUBSET(子集群),以及INSTANCE(单个实例),默认为SUBSET - enum Resource { - // 针对实例分组进行熔断 - SUBSET = 0; - // 针对实例进行熔断 - INSTANCE = 1; - } - Resource resource = 4; - // 熔断决策类型,支持GLOBAL(分布式决策)以及LOCAL(本地决策),默认GLOBAL - // 当指定为GLOBAL时,则会定期上报统计数据并根据汇总数据进行熔断决策 - enum Type { - GLOBAL = 0; - LOCAL = 1; - } - Type type = 5; - - //熔断范围,是否扩散针对相同服务下所有接口进行熔断 - enum Scope { - //触发熔断条件,扩散熔断所有接口 - ALL = 0; - //触发熔断条件,只熔断当前接口 - CURRENT = 1; - } - Scope scope = 6; - - // 熔断数据度量周期 - // 所有的阈值指标按此周期进行统计 - google.protobuf.Duration metricWindow = 7; - - // 熔断数据统计精度,决定数据度量的最小周期 - // 度量滑窗的步长=window/precision - google.protobuf.UInt32Value metricPrecision = 8; - - // 熔断数据上报周期,对分布式熔断有效 - google.protobuf.Duration updateInterval = 9; - - // 触发熔断后恢复配置 - RecoverConfig recover = 10; - - // 熔断策略 - CbPolicy policy = 11; - - // 被调的接口信息,指定哪些接口会使用该规则 - MatchString method = 12; - - // 返回码,指定哪些返回码会使用该规则 - repeated google.protobuf.Int64Value errorCodes = 13; -} - -// 具体熔断规则 -message CbRule { - // 如果匹配Source规则,按照Destination进行熔断 - // 多个Source之间的关系为或 - repeated SourceMatcher sources = 1; - repeated DestinationSet destinations = 2; -} - -message RuleMatcher { - message SourceService { - string service = 1; - string namespace = 2; - } - - message DestinationService { - string service = 1; - string namespace = 2; - // deprecated_filed using api.path in blockConfig instead - MatchString method = 3 [deprecated = true]; - } - SourceService source = 1; - DestinationService destination = 2; -} - -// circuitbreaking level -enum Level { - UNKNOWN = 0; - // service level circuitbreaking - SERVICE = 1; - // method level circuitbreaking - METHOD = 2; - // group level circuitbreaking - GROUP = 3; - // instance level circuitbreaking - INSTANCE = 4; -} - -// new specific rule for circuitbreaker config -message CircuitBreakerRule { - string id = 1; - // rule name - string name = 2; - // namespace of rule - string namespace = 3; - // enable this router - bool enable = 4; - // revision routing version - string revision = 5; - // ctime create time of the rules - string ctime = 6; - // mtime modify time of the rules - string mtime = 7; - // etime enable time of the rules - string etime = 8; - // description simple description rules - string description = 9; - // reserve for metadata - reserved 10 to 20; - // the circuitbreaking level - Level level = 21; - // match condition for this rule - RuleMatcher rule_matcher = 22; - // deprecated_filed error conditions to judge an invocation as an error - repeated ErrorCondition error_conditions = 23 [deprecated = true]; - // deprecated_filed trigger condition to trigger circuitbreaking - repeated TriggerCondition trigger_condition = 24 [deprecated = true]; - // the maximum % of an upstream cluster that can be ejected - uint32 max_ejection_percent = 25; - // recover condition to make resource open to close - RecoverCondition recoverCondition = 26; - // fault detection enable config - FaultDetectConfig faultDetectConfig = 27; - // fall back configuration - FallbackConfig fallbackConfig = 28; - // list for block configuration - repeated BlockConfig block_configs = 29 [ json_name = "block_configs" ]; - // priority rules priority - uint32 priority = 30 [ json_name = "priority" ]; - // 熔断规则标签数据 - map metadata = 50; -} - -// the condition to judge an input invocation as an error -message ErrorCondition { - enum InputType { - UNKNOWN = 0; - RET_CODE = 1; - DELAY = 2; - } - InputType input_type = 1; - MatchString condition = 2; -} - -// the error condition to trigger circuitbreaking -message TriggerCondition { - enum TriggerType { - UNKNOWN = 0; - ERROR_RATE = 1; - CONSECUTIVE_ERROR = 2; - } - TriggerType trigger_type = 1; - uint32 error_count = 2; - uint32 error_percent = 3; - uint32 interval = 4; - uint32 minimum_request = 5; -} - -// circuitbreaking OPEN status recover -message RecoverCondition { - // seconds from open to half-open - uint32 sleep_window = 1; - // consecutive success request to recover - uint32 consecutiveSuccess = 2; -} - -// fault detect config within circuitbreaking -message FaultDetectConfig { - bool enable = 1; -} - -// fallback config -message FallbackConfig { - bool enable = 1; - FallbackResponse response = 2; -} - -// fallback response -message FallbackResponse { - int32 code = 1; - message MessageHeader { - string key = 1; - string value = 2; - } - repeated MessageHeader headers = 2; - string body = 3; -} - -// blocking strategy -message BlockConfig { - string name = 1 [ json_name = "name" ]; - // blocking target api - API api = 2 [ json_name = "api" ]; - // conditions to judge an invocation as an error - repeated ErrorCondition error_conditions = 3 [ json_name = "error_conditions" ]; - // trigger condition to trigger circuitbreaking - repeated TriggerCondition trigger_conditions = 4 [ json_name = "trigger_conditions" ]; -} \ No newline at end of file diff --git a/source/java/polaris-specification/src/main/proto/client.proto b/source/java/polaris-specification/src/main/proto/client.proto deleted file mode 100644 index e52dfcf7..00000000 --- a/source/java/polaris-specification/src/main/proto/client.proto +++ /dev/null @@ -1,45 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "google/protobuf/wrappers.proto"; -import "model.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/service_manage"; -option java_package = "com.tencent.polaris.specification.api.v1.service.manage"; -option java_outer_classname = "ClientProto"; - -message Client { - google.protobuf.StringValue host = 1; - - enum ClientType { - UNKNOWN = 0; - SDK = 1; - AGENT = 2; - } - - ClientType type = 2; - - google.protobuf.StringValue version = 3; - - Location location = 4; - - google.protobuf.StringValue id = 5; - - repeated StatInfo stat = 6; - - google.protobuf.StringValue ctime = 7; - google.protobuf.StringValue mtime = 8; -} - -message StatInfo { - - google.protobuf.StringValue target = 1; - - google.protobuf.UInt32Value port = 2; - - google.protobuf.StringValue path = 3; - - google.protobuf.StringValue protocol = 4; - -} \ No newline at end of file diff --git a/source/java/polaris-specification/src/main/proto/code.proto b/source/java/polaris-specification/src/main/proto/code.proto deleted file mode 100644 index baad235d..00000000 --- a/source/java/polaris-specification/src/main/proto/code.proto +++ /dev/null @@ -1,194 +0,0 @@ -syntax = "proto3"; - -package v1; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/model"; - -option java_package = "com.tencent.polaris.specification.api.v1.model"; -option java_outer_classname = "CodeProto"; - -enum Code { - // base module status codes - Unknown = 0; - ExecuteSuccess = 200000; - DataNoChange = 200001; - NoNeedUpdate = 200002; - BadRequest = 400000; - ParseException = 400001; - EmptyRequest = 400002; - BatchSizeOverLimit = 400003; - InvalidDiscoverResource = 400004; - InvalidRequestID = 400100; - InvalidUserName = 400101; - InvalidUserToken = 400102; - InvalidParameter = 400103; - EmptyQueryParameter = 400104; - InvalidQueryInsParameter = 400105; - InvalidNamespaceName = 400110; - InvalidNamespaceOwners = 400111; - InvalidNamespaceToken = 400112; - InvalidServiceName = 400120; - InvalidServiceOwners = 400121; - InvalidServiceToken = 400122; - InvalidServiceMetadata = 400123; - InvalidServicePorts = 400124; - InvalidServiceBusiness = 400125; - InvalidServiceDepartment = 400126; - InvalidServiceCMDB = 400127; - InvalidServiceComment = 400128; - InvalidServiceAliasComment = 400129; - InvalidInstanceID = 400130; - InvalidInstanceHost = 400131; - InvalidInstancePort = 400132; - InvalidServiceAlias = 400133; - InvalidNamespaceWithAlias = 400134; - InvalidServiceAliasOwners = 400135; - InvalidInstanceProtocol = 400136; - InvalidInstanceVersion = 400137; - InvalidInstanceLogicSet = 400138; - InvalidInstanceIsolate = 400139; - HealthCheckNotOpen = 400140; - HeartbeatOnDisabledIns = 400141; - HeartbeatExceedLimit = 400142; - HeartbeatTypeNotFound = 400143; - InvalidMetadata = 400150; - InvalidRateLimitID = 400151; - InvalidRateLimitLabels = 400152; - InvalidRateLimitAmounts = 400153; - InvalidRateLimitName = 400154; - InvalidCircuitBreakerID = 400160; - InvalidCircuitBreakerVersion = 400161; - InvalidCircuitBreakerName = 400162; - InvalidCircuitBreakerNamespace = 400163; - InvalidCircuitBreakerOwners = 400164; - InvalidCircuitBreakerToken = 400165; - InvalidCircuitBreakerBusiness = 400166; - InvalidCircuitBreakerDepartment = 400167; - InvalidCircuitBreakerComment = 400168; - CircuitBreakerRuleExisted = 400169; - InvalidRoutingID = 400700; - InvalidRoutingPolicy = 400701; - InvalidRoutingName = 400702; - InvalidRoutingPriority = 400703; - InvalidFaultDetectID = 400900; - InvalidFaultDetectName = 400901; - InvalidFaultDetectNamespace = 400902; - FaultDetectRuleExisted = 400903; - InvalidMatchRule = 400904; - - // network relative codes - ServicesExistedMesh = 400170; - ResourcesExistedMesh = 400171; - InvalidMeshParameter = 400172; - - // platform relative codes - InvalidPlatformID = 400180; - InvalidPlatformName = 400181; - InvalidPlatformDomain = 400182; - InvalidPlatformQPS = 400183; - InvalidPlatformToken = 400184; - InvalidPlatformOwner = 400185; - InvalidPlatformDepartment = 400186; - InvalidPlatformComment = 400187; - NotFoundPlatform = 400188; - - // flux relative codes - InvalidFluxRateLimitId = 400190; - InvalidFluxRateLimitQps = 400191; - InvalidFluxRateLimitSetKey = 400192; - - ExistedResource = 400201; - NotFoundResource = 400202; - NamespaceExistedServices = 400203; - ServiceExistedInstances = 400204; - ServiceExistedRoutings = 400205; - ServiceExistedRateLimits = 400206; - ExistReleasedConfig = 400207; - SameInstanceRequest = 400208; - ServiceExistedCircuitBreakers = 400209; - ServiceExistedAlias = 400210; - NamespaceExistedMeshResources = 400211; - NamespaceExistedCircuitBreakers = 400212; - ServiceSubscribedByMeshes = 400213; - ServiceExistedFluxRateLimits = 400214; - NamespaceExistedConfigGroups = 400219; - - NotFoundService = 400301; - NotFoundRouting = 400302; - NotFoundInstance = 400303; - NotFoundServiceAlias = 400304; - NotFoundNamespace = 400305; - NotFoundSourceService = 400306; - NotFoundRateLimit = 400307; - NotFoundCircuitBreaker = 400308; - NotFoundMasterConfig = 400309; - NotFoundTagConfig = 400310; - NotFoundTagConfigOrService = 400311; - ClientAPINotOpen = 400401; - NotAllowBusinessService = 400402; - NotAllowAliasUpdate = 400501; - NotAllowAliasCreateInstance = 400502; - NotAllowAliasCreateRouting = 400503; - NotAllowCreateAliasForAlias = 400504; - NotAllowAliasCreateRateLimit = 400505; - NotAllowAliasBindRule = 400506; - NotAllowDifferentNamespaceBindRule = 400507; - Unauthorized = 401000; - NotAllowedAccess = 401001; - CMDBNotFindHost = 404001; - DataConflict = 409000; - InstanceTooManyRequests = 429001; - IPRateLimit = 429002; - APIRateLimit = 403003; - ExecuteException = 500000; - StoreLayerException = 500001; - CMDBPluginException = 500002; - ParseRoutingException = 500004; - ParseRateLimitException = 500005; - ParseCircuitBreakerException = 500006; - HeartbeatException = 500007; - InstanceRegisTimeout = 500008; - - // config center status codes - InvalidConfigFileGroupName = 400801; - InvalidConfigFileName = 400802; - InvalidConfigFileContentLength = 400803; - InvalidConfigFileFormat = 400804; - InvalidConfigFileTags = 400805; - InvalidWatchConfigFileFormat = 400806; - NotFoundResourceConfigFile = 400807; - InvalidConfigFileTemplateName = 400808; - EncryptConfigFileException = 400809; - DecryptConfigFileException = 400810; - - // auth codes - InvalidUserOwners = 400410; - InvalidUserID = 400411; - InvalidUserPassword = 400412; - InvalidUserMobile = 400413; - InvalidUserEmail = 400414; - InvalidUserGroupOwners = 400420; - InvalidUserGroupID = 400421; - InvalidAuthStrategyOwners = 400430; - InvalidAuthStrategyName = 400431; - InvalidAuthStrategyID = 400432; - InvalidPrincipalType = 400440; - - UserExisted = 400215; - UserGroupExisted = 400216; - AuthStrategyRuleExisted = 400217; - SubAccountExisted = 400218; - NotFoundUser = 400312; - NotFoundOwnerUser = 400313; - NotFoundUserGroup = 400314; - NotFoundAuthStrategyRule = 400315; - NotAllowModifyDefaultStrategyPrincipal = 400508; - NotAllowModifyOwnerDefaultStrategy = 400509;; - - EmptyAutToken = 401002; - TokenDisabled = 401003; - TokenNotExisted = 401004; - - AuthTokenForbidden = 403001; - OperationRoleForbidden = 403002; -} diff --git a/source/java/polaris-specification/src/main/proto/config_file.proto b/source/java/polaris-specification/src/main/proto/config_file.proto deleted file mode 100644 index 80e2b8aa..00000000 --- a/source/java/polaris-specification/src/main/proto/config_file.proto +++ /dev/null @@ -1,213 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "google/protobuf/wrappers.proto"; -import "model.proto"; -option go_package = "github.com/polarismesh/specification/source/go/api/v1/config_manage"; -option java_package = "com.tencent.polaris.specification.api.v1.config.manage"; -option java_outer_classname = "ConfigFileProto"; - -message ConfigFileGroup { - google.protobuf.UInt64Value id = 1; - google.protobuf.StringValue name = 2; - google.protobuf.StringValue namespace = 3; - google.protobuf.StringValue comment = 4; - google.protobuf.StringValue create_time = 5; - google.protobuf.StringValue create_by = 6; - google.protobuf.StringValue modify_time = 7; - google.protobuf.StringValue modify_by = 8; - google.protobuf.UInt64Value fileCount = 9; - - repeated google.protobuf.StringValue user_ids = 10 [ json_name = "user_ids" ]; - repeated google.protobuf.StringValue group_ids = 11 - [ json_name = "group_ids" ]; - - repeated google.protobuf.StringValue remove_user_ids = 13 - [ json_name = "remove_user_ids" ]; - repeated google.protobuf.StringValue remove_group_ids = 14 - [ json_name = "remove_group_ids" ]; - - google.protobuf.BoolValue editable = 15; - google.protobuf.StringValue owner = 16; - - google.protobuf.StringValue business = 17; - google.protobuf.StringValue department = 18; - map metadata = 19; -} - -message ConfigFile { - google.protobuf.UInt64Value id = 1; - google.protobuf.StringValue name = 2; - google.protobuf.StringValue namespace = 3; - google.protobuf.StringValue group = 4; - google.protobuf.StringValue content = 5; - google.protobuf.StringValue format = 6; - google.protobuf.StringValue comment = 7; - google.protobuf.StringValue status = 8; - repeated ConfigFileTag tags = 9; - google.protobuf.StringValue create_time = 10; - google.protobuf.StringValue create_by = 11; - google.protobuf.StringValue modify_time = 12; - google.protobuf.StringValue modify_by = 13; - google.protobuf.StringValue release_time = 14; - google.protobuf.StringValue release_by = 15; - // 是否为加密配置文件 - google.protobuf.BoolValue encrypted = 16; - // 加密算法 - google.protobuf.StringValue encrypt_algo = 17; -} - -message ConfigFileTag { - google.protobuf.StringValue key = 1; - google.protobuf.StringValue value = 2; -} - -message ConfigFileRelease { - google.protobuf.UInt64Value id = 1; - google.protobuf.StringValue name = 2; - google.protobuf.StringValue namespace = 3; - google.protobuf.StringValue group = 4; - google.protobuf.StringValue file_name = 5; - google.protobuf.StringValue content = 6; - google.protobuf.StringValue comment = 7; - google.protobuf.StringValue md5 = 8; - google.protobuf.UInt64Value version = 9; - google.protobuf.StringValue create_time = 10; - google.protobuf.StringValue create_by = 11; - google.protobuf.StringValue modify_time = 12; - google.protobuf.StringValue modify_by = 13; - repeated ConfigFileTag tags = 14; - // 当前生效配置 - google.protobuf.BoolValue active = 15; - google.protobuf.StringValue format = 16; - google.protobuf.StringValue release_description = 17; - google.protobuf.StringValue release_type = 18; - // 配置灰度发布时需要匹配的客户端标签信息 - repeated ClientLabel beta_labels = 19; -} - -message ConfigFileReleaseHistory { - google.protobuf.UInt64Value id = 1; - google.protobuf.StringValue name = 2; - google.protobuf.StringValue namespace = 3; - google.protobuf.StringValue group = 4; - google.protobuf.StringValue file_name = 5; - google.protobuf.StringValue content = 6; - google.protobuf.StringValue format = 7; - google.protobuf.StringValue comment = 8; - google.protobuf.StringValue md5 = 9; - google.protobuf.StringValue type = 10; - google.protobuf.StringValue status = 11; - repeated ConfigFileTag tags = 12; - google.protobuf.StringValue create_time = 13; - google.protobuf.StringValue create_by = 14; - google.protobuf.StringValue modify_time = 15; - google.protobuf.StringValue modify_by = 16; - // 配置发布失败的原因 - google.protobuf.StringValue reason = 17; - google.protobuf.StringValue release_description = 18; -} - -message ConfigFileTemplate { - google.protobuf.UInt64Value id = 1; - google.protobuf.StringValue name = 2; - google.protobuf.StringValue content = 3; - google.protobuf.StringValue format = 4; - google.protobuf.StringValue comment = 5; - google.protobuf.StringValue create_time = 6; - google.protobuf.StringValue create_by = 7; - google.protobuf.StringValue modify_time = 8; - google.protobuf.StringValue modify_by = 9; -} - -message ClientConfigFileInfo { - google.protobuf.StringValue namespace = 1; - google.protobuf.StringValue group = 2; - google.protobuf.StringValue file_name = 3; - google.protobuf.StringValue content = 4; - google.protobuf.UInt64Value version = 5; - google.protobuf.StringValue md5 = 6; - repeated ConfigFileTag tags = 7; - // 是否为加密配置文件 - google.protobuf.BoolValue encrypted = 8; - // 公钥,用于加密数据密钥 - google.protobuf.StringValue public_key = 9; - // 配置文件版本名称 - google.protobuf.StringValue name = 10; - // 配置文件的发布时间 - google.protobuf.StringValue release_time = 11 [ json_name = "release_time" ]; -} - -message ClientWatchConfigFileRequest { - google.protobuf.StringValue client_ip = 1; - google.protobuf.StringValue service_name = 2; - repeated ClientConfigFileInfo watch_files = 3; -} - -message ConfigFileExportRequest { - google.protobuf.StringValue namespace = 1; - repeated google.protobuf.StringValue groups = 2; - repeated google.protobuf.StringValue names = 3; -} - -message ConfigFilePublishInfo { - google.protobuf.StringValue release_name = 1 [ json_name = "release_name" ]; - google.protobuf.StringValue namespace = 2; - google.protobuf.StringValue group = 3; - google.protobuf.StringValue file_name = 4 [ json_name = "file_name" ]; - google.protobuf.StringValue content = 5; - google.protobuf.StringValue comment = 6; - google.protobuf.StringValue format = 7; - google.protobuf.StringValue release_description = 8 - [ json_name = "release_description" ]; - google.protobuf.StringValue create_by = 11 [ json_name = "create_by" ]; - google.protobuf.StringValue modify_by = 13 [ json_name = "modify_by" ]; - repeated ConfigFileTag tags = 14; - google.protobuf.StringValue md5 = 15; - // 是否为加密配置文件 - google.protobuf.BoolValue encrypted = 16; - // 加密算法 - google.protobuf.StringValue encrypt_algo = 17; -} - -message ConfigFileGroupRequest { - google.protobuf.StringValue revision = 1; - ConfigFileGroup config_file_group = 2 [ json_name = "config_file_group" ]; - // 配置标签 - map client_labels = 12 [ json_name = "client_labels" ]; -} - -message ConfigDiscoverRequest { - enum ConfigDiscoverRequestType { - UNKNOWN = 0; - CONFIG_FILE = 1; - CONFIG_FILE_Names = 2; - CONFIG_FILE_GROUPS = 3; - } - ConfigDiscoverRequestType type = 1; - ClientConfigFileInfo config_file = 2 [ json_name = "config_file" ]; - string revision = 3; -} - -message ConfigDiscoverResponse { - enum ConfigDiscoverResponseType { - UNKNOWN = 0; - CONFIG_FILE = 1; - CONFIG_FILE_Names = 2; - CONFIG_FILE_GROUPS = 3; - } - - uint32 code = 1; - string info = 2; - string revision = 3; - - ConfigDiscoverResponseType type = 4; - - ClientConfigFileInfo config_file = 5 [ json_name = "config_file" ]; - - repeated ClientConfigFileInfo config_file_names = 6 - [ json_name = "config_file_names" ]; - repeated ConfigFileGroup config_file_groups = 7 - [ json_name = "config_file_groups" ]; -} diff --git a/source/java/polaris-specification/src/main/proto/config_file_response.proto b/source/java/polaris-specification/src/main/proto/config_file_response.proto deleted file mode 100644 index 29108bdd..00000000 --- a/source/java/polaris-specification/src/main/proto/config_file_response.proto +++ /dev/null @@ -1,82 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "google/protobuf/wrappers.proto"; -import "config_file.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/config_manage"; -option java_package = "com.tencent.polaris.specification.api.v1.config.manage"; -option java_outer_classname = "ConfigFileResponseProto"; - -message ConfigSimpleResponse { - google.protobuf.UInt32Value code = 1; - google.protobuf.StringValue info = 2; -} - -message ConfigResponse { - google.protobuf.UInt32Value code = 1; - google.protobuf.StringValue info = 2; - - ConfigFileGroup configFileGroup = 3; - ConfigFile configFile = 4; - ConfigFileRelease configFileRelease = 5; - ConfigFileReleaseHistory configFileReleaseHistory = 6; - ConfigFileTemplate configFileTemplate = 7; -} - -message ConfigBatchWriteResponse { - google.protobuf.UInt32Value code = 1; - google.protobuf.StringValue info = 2; - google.protobuf.UInt32Value total = 3; - - repeated ConfigResponse responses = 4; -} - -message ConfigBatchQueryResponse { - google.protobuf.UInt32Value code = 1; - google.protobuf.StringValue info = 2; - google.protobuf.UInt32Value total = 3; - repeated ConfigFileGroup configFileGroups = 4; - repeated ConfigFile configFiles = 5; - repeated ConfigFileRelease configFileReleases = 6; - repeated ConfigFileReleaseHistory configFileReleaseHistories = 7; - repeated ConfigFileTemplate configFileTemplates = 8; -} - -message ConfigClientResponse { - google.protobuf.UInt32Value code = 1; - google.protobuf.StringValue info = 2; - - ClientConfigFileInfo configFile = 3; -} - -message ConfigImportResponse { - google.protobuf.UInt32Value code = 1; - google.protobuf.StringValue info = 2; - repeated ConfigFile createConfigFiles = 3; - repeated ConfigFile skipConfigFiles = 4; - repeated ConfigFile overwriteConfigFiles = 5; -} - -message ConfigExportResponse { - google.protobuf.UInt32Value code = 1; - google.protobuf.StringValue info = 2; - google.protobuf.BytesValue data = 3; -} - -message ConfigEncryptAlgorithmResponse { - google.protobuf.UInt32Value code = 1; - google.protobuf.StringValue info = 2; - repeated google.protobuf.StringValue algorithms = 3; -} - -message ConfigClientListResponse { - google.protobuf.UInt32Value code = 1; - google.protobuf.StringValue info = 2; - google.protobuf.StringValue revision = 3; - - string namespace = 4; - string group = 5; - repeated ClientConfigFileInfo config_file_infos = 6 [json_name = "config_file_infos"]; -} \ No newline at end of file diff --git a/source/java/polaris-specification/src/main/proto/configrelease.proto b/source/java/polaris-specification/src/main/proto/configrelease.proto deleted file mode 100644 index f0676255..00000000 --- a/source/java/polaris-specification/src/main/proto/configrelease.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "google/protobuf/wrappers.proto"; -import "service.proto"; -import "circuitbreaker.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/service_manage"; -option java_package = "com.tencent.polaris.specification.api.v1.service.manage"; -option java_outer_classname = "ConfigReleaseProto"; - -message ConfigRelease { - Service service = 1; - google.protobuf.StringValue ctime = 2; - google.protobuf.StringValue mtime = 3; - - CircuitBreaker circuitBreaker = 4; -} - -message ConfigWithService { - repeated Service services = 1; - CircuitBreaker circuitBreaker = 2; -} \ No newline at end of file diff --git a/source/java/polaris-specification/src/main/proto/contract.proto b/source/java/polaris-specification/src/main/proto/contract.proto deleted file mode 100644 index c69f6ada..00000000 --- a/source/java/polaris-specification/src/main/proto/contract.proto +++ /dev/null @@ -1,75 +0,0 @@ -syntax = "proto3"; - -package v1; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/service_manage"; -option java_package = "com.tencent.polaris.specification.api.v1.service.manage"; -option java_outer_classname = "ServiceContractProto"; - -message ServiceContract { - // 契约ID - string id = 1; - // 契约名称 - // deprecated, use type field - string name = 2; - // 所属命名空间 - string namespace = 3; - // 所属服务名称 - string service = 4; - // 协议,http/grpc/dubbo/thrift - string protocol = 5; - // 契约版本 - string version = 6; - // 信息摘要 - string revision = 7; - // 额外描述 - string content = 8; - // 接口描述信息 - repeated InterfaceDescriptor interfaces = 9; - // 创建时间 - string ctime = 10; - // 更新时间 - string mtime = 11; - // 接口状态,Offline/Online - string status = 12; - // 类型 - string type = 14; -} - -message InterfaceDescriptor { - enum Source { - UNKNOWN = 0; - Manual = 1; - Client = 2; - } - - // 接口ID - string id = 1; - // 方法名称,对应 http method/ dubbo interface func/grpc service func - string method = 2; - // 接口名称,http path/dubbo interface/grpc service - string path = 3; - // 接口描述信息 - string content = 4; - // 创建来源 - Source source = 5; - // 接口信息摘要 - string revision = 6; - // 创建时间 - string ctime = 7; - // 更新时间 - string mtime = 8; - // 接口名称描述信息 - // deprecated, use type field - string name = 9; - // 所属命名空间 - string namespace = 10; - // 所属服务名称 - string service = 11; - // 协议,http/grpc/dubbo/thrift - string protocol = 12; - // 契约版本 - string version = 13; - // 类型 - string type = 14; -} diff --git a/source/java/polaris-specification/src/main/proto/fault_detector.proto b/source/java/polaris-specification/src/main/proto/fault_detector.proto deleted file mode 100644 index 217669be..00000000 --- a/source/java/polaris-specification/src/main/proto/fault_detector.proto +++ /dev/null @@ -1,90 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "model.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/fault_tolerance"; -option java_package = "com.tencent.polaris.specification.api.v1.fault.tolerance"; -option java_outer_classname = "FaultDetectorProto"; - -message FaultDetector { - // fault detect rules for current service - repeated FaultDetectRule rules = 1; - // total revision for the fault detect rules - string revision = 2; -} - -message FaultDetectRule { - string id = 1; - // rule name - string name = 2; - // namespace of rule - string namespace = 3; - // revision routing version - string revision = 4; - // ctime create time of the rules - string ctime = 5; - // mtime modify time of the rules - string mtime = 6; - // description simple description rules - string description = 7; - - // reserve for metadata - reserved 8 to 20; - - message DestinationService { - string service = 1; - string namespace = 2; - // deprecated_filed use api.path instead - MatchString method = 3 [deprecated = true]; - API api = 4; - } - // detect target - DestinationService target_service = 21; - // detect interval - uint32 interval = 22; - // detect timeout - uint32 timeout = 23; - // detect port - uint32 port = 24; - // detect protocol - enum Protocol { - UNKNOWN = 0; - HTTP = 1; - TCP = 2; - UDP = 3; - } - Protocol protocol = 25; - // http detect config - HttpProtocolConfig http_config = 26; - // tcp detect config - TcpProtocolConfig tcp_config = 27; - // udp detect config - UdpProtocolConfig udp_config = 28; - // priority rules priority - uint32 priority = 29 [ json_name = "priority" ]; - // 探测规则标签数据 - map metadata = 50; -} - -message HttpProtocolConfig { - string method = 1; - string url = 2; - message MessageHeader { - string key = 1; - string value = 2; - } - repeated MessageHeader headers = 3; - string body = 4; -} - -message TcpProtocolConfig { - string send = 1; - repeated string receive = 2; -} - -message UdpProtocolConfig { - string send = 1; - repeated string receive = 2; -} diff --git a/source/java/polaris-specification/src/main/proto/grpc_config_api.proto b/source/java/polaris-specification/src/main/proto/grpc_config_api.proto deleted file mode 100644 index c6103609..00000000 --- a/source/java/polaris-specification/src/main/proto/grpc_config_api.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "config_file.proto"; -import "config_file_response.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/config_manage"; -option java_package = "com.tencent.polaris.specification.api.v1.config.manage"; -option java_outer_classname = "PolarisConfigGRPCService"; - -service PolarisConfigGRPC { - - // 拉取配置 - rpc GetConfigFile(ClientConfigFileInfo) returns (ConfigClientResponse) {} - - // 创建配置 - rpc CreateConfigFile(ConfigFile) returns (ConfigClientResponse) {} - - // 更新配置 - rpc UpdateConfigFile(ConfigFile) returns (ConfigClientResponse) {} - - // 发布配置 - rpc PublishConfigFile(ConfigFileRelease) returns (ConfigClientResponse) {} - - // 发布配置 - rpc UpsertAndPublishConfigFile(ConfigFilePublishInfo) returns (ConfigClientResponse) {} - - // 订阅配置变更 - rpc WatchConfigFiles(ClientWatchConfigFileRequest) returns (ConfigClientResponse) {} - - // 拉取指定配置分组下的配置文件列表 - rpc GetConfigFileMetadataList(ConfigFileGroupRequest) returns (ConfigClientListResponse) {} - - // 统一发现接口 - rpc Discover(stream ConfigDiscoverRequest) returns (stream ConfigDiscoverResponse) {} -} diff --git a/source/java/polaris-specification/src/main/proto/grpcapi.proto b/source/java/polaris-specification/src/main/proto/grpcapi.proto deleted file mode 100644 index 4a1e2cbf..00000000 --- a/source/java/polaris-specification/src/main/proto/grpcapi.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "client.proto"; -import "service.proto"; -import "request.proto"; -import "response.proto"; -import "heartbeat.proto"; -import "contract.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/service_manage"; -option java_package = "com.tencent.polaris.specification.api.v1.service.manage"; -option java_outer_classname = "PolarisGRPCService"; - -service PolarisGRPC { - // 客户端上报 - rpc ReportClient(Client) returns (Response) {} - // 被调方注册服务实例 - rpc RegisterInstance(Instance) returns (Response) {} - // 被调方反注册服务实例 - rpc DeregisterInstance(Instance) returns (Response) {} - // 统一发现接口 - rpc Discover(stream DiscoverRequest) returns (stream DiscoverResponse) {} - // 被调方上报心跳 - rpc Heartbeat(Instance) returns (Response) {} -} - -service PolarisHeartbeatGRPC { - // 被调方批量上报心跳 - rpc BatchHeartbeat(stream HeartbeatsRequest) - returns (stream HeartbeatsResponse) {} - // 批量获取心跳记录 - rpc BatchGetHeartbeat(GetHeartbeatsRequest) returns (GetHeartbeatsResponse) {} - // 批量删除心跳记录 - rpc BatchDelHeartbeat(DelHeartbeatsRequest) returns (DelHeartbeatsResponse) {} -} - -service PolarisServiceContractGRPC { - // 上报服务契约 - rpc ReportServiceContract(ServiceContract) returns (Response) {} - // 查询服务契约 - rpc GetServiceContract(ServiceContract) returns (Response) {} -} diff --git a/source/java/polaris-specification/src/main/proto/grpcapi_ratelimiter.proto b/source/java/polaris-specification/src/main/proto/grpcapi_ratelimiter.proto deleted file mode 100644 index b1194ea2..00000000 --- a/source/java/polaris-specification/src/main/proto/grpcapi_ratelimiter.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package polaris.metric.v2; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/traffic_manage/ratelimiter"; -option java_package = "com.tencent.polaris.specification.api.v1.traffic.manage.ratelimiter"; -option java_outer_classname = "RateLimiterService"; - -import "ratelimiter.proto"; - -service RateLimitGRPCV2 { - // 限流接口 - rpc Service(stream RateLimitRequest) returns(stream RateLimitResponse) {} - - //时间对齐接口 - rpc TimeAdjust(TimeAdjustRequest) returns(TimeAdjustResponse) {} -} \ No newline at end of file diff --git a/source/java/polaris-specification/src/main/proto/heartbeat.proto b/source/java/polaris-specification/src/main/proto/heartbeat.proto deleted file mode 100644 index 2751d6b9..00000000 --- a/source/java/polaris-specification/src/main/proto/heartbeat.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "service.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/service_manage"; -option java_package = "com.tencent.polaris.specification.api.v1.service.manage"; - -message HeartbeatRecord { - string instanceId = 1 [ json_name = "instance_id" ]; - reserved 2 to 5; - int64 lastHeartbeatSec = 6 [ json_name = "last_heartbeat_sec" ]; - bool exist = 7 [ json_name = "exist" ]; -} - -message InstanceHeartbeat { - string instanceId = 1 [ json_name = "instance_id" ]; - string service = 2 [ json_name = "service" ]; - string namespace = 3 [ json_name = "namespace" ]; - string host = 4 [ json_name = "host" ]; - uint32 port = 5 [ json_name = "port" ]; -} - -message HeartbeatsRequest { - repeated InstanceHeartbeat heartbeats = 1 [ json_name = "heartbeats" ]; -} - -message HeartbeatsResponse { -} - -message GetHeartbeatsRequest { - repeated string instanceIds = 1 [ json_name = "instance_ids" ]; -} - -message GetHeartbeatsResponse { - repeated HeartbeatRecord records = 1 [ json_name = "records" ]; -} - -message DelHeartbeatsRequest { - repeated string instanceIds = 1 [ json_name = "instance_ids" ]; -} - -message DelHeartbeatsResponse { - uint32 code = 1; - string info = 2; -} diff --git a/source/java/polaris-specification/src/main/proto/lane.proto b/source/java/polaris-specification/src/main/proto/lane.proto deleted file mode 100644 index 9eb00f25..00000000 --- a/source/java/polaris-specification/src/main/proto/lane.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "google/protobuf/any.proto"; -import "model.proto"; -import "routing.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/traffic_manage"; -option java_package = "com.tencent.polaris.specification.api.v1.traffic.manage"; -option java_outer_classname = "LaneProto"; - -// 流量入口 -message TrafficEntry { - // 标记流量入口类型 - // type == "polarismesh.cn/gateway/spring-cloud-gateway", 则 selector 为 - // ServiceGatewaySelector type == "polarismesh.cn/service, 则 selector 为 - // ServiceSelector - string type = 1; - google.protobuf.Any selector = 2; -} - -// 微服务网关入口定义 -message ServiceGatewaySelector { - string namespace = 1; - string service = 2; - // 决定要不要部份 - map labels = 3; -} - -// 普通服务入口定义 -message ServiceSelector { - string namespace = 1; - string service = 2; - // 决定要不要部份 - map labels = 3; -} - -// 泳道组实体定义 -message LaneGroup { - // 泳道组 ID - string id = 1; - // 泳道组名称 - string name = 2; - // 泳道组内的流量入口信息 - repeated TrafficEntry entries = 3; - // 在泳道组内的服务列表信息 - repeated DestinationGroup destinations = 4; - // 泳道组描述信息 - string revision = 7; - // 泳道组描述信息 - string description = 8; - // 泳道组的创建时间 - string ctime = 9; - // 泳道组的更新时间 - string mtime = 10; - // 泳道组内的流量入口信息 - repeated LaneRule rules = 11; - // 泳道组标签信息 - map metadata = 20; -} - -// TrafficMatchRule 流量匹配规则 -message TrafficMatchRule { - // 流量匹配规则,判断哪些流量需要进入泳道 - repeated SourceMatch arguments = 4; - // 多个 SourceMatch 之间的判断关系 - enum TrafficMatchMode { - // 与模式 - AND = 0; - // 或模式 - OR = 1; - } - TrafficMatchMode matchMode = 14; -} - -// 泳道规则 -message LaneRule { - string id = 1; - string name = 2; - // 所属泳道组的名称 - string group_name = 3; - // 流量匹配规则 - TrafficMatchRule traffic_match_rule = 4; - // 保存这个泳道的默认实例标签 - string default_label_value = 5; - // 泳道规则是否启用 - bool enable = 6; - enum LaneMatchMode { - // 严格匹配模式 - STRICT = 0; - // 宽松匹配模式 - PERMISSIVE = 1; - } - LaneMatchMode match_mode = 7; - // revision routing version - string revision = 8; - // ctime create time of the rules - string ctime = 9; - // mtime modify time of the rules - string mtime = 10; - // etime enable time of the rules - string etime = 11; - // priority rules priority - uint32 priority = 12; - // description simple description rules - string description = 13; -} \ No newline at end of file diff --git a/source/java/polaris-specification/src/main/proto/model.proto b/source/java/polaris-specification/src/main/proto/model.proto deleted file mode 100644 index b24d8547..00000000 --- a/source/java/polaris-specification/src/main/proto/model.proto +++ /dev/null @@ -1,71 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "google/protobuf/wrappers.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/model"; - -option java_package = "com.tencent.polaris.specification.api.v1.model"; -option java_outer_classname = "ModelProto"; - -message Location { - google.protobuf.StringValue region = 1; - google.protobuf.StringValue zone = 2; - google.protobuf.StringValue campus = 3; -} - -message MatchString { - enum MatchStringType { - // Equivalent match - EXACT = 0; - // Regular match - REGEX = 1; - // Not equals match - NOT_EQUALS = 2; - // Include match - IN = 3; - // Not include match - NOT_IN = 4; - // Range match - RANGE = 5; - } - - enum ValueType { - TEXT = 0; - PARAMETER = 1; - VARIABLE = 2; - } - - MatchStringType type = 1; - google.protobuf.StringValue value = 2; - ValueType value_type = 3 [ json_name = "value_type" ]; -} - -message StringList { repeated string values = 1; } - -// 汇总查询数据 -message Summary { - // 服务总数 - uint32 total_service_count = 1 [ json_name = "total_service_count" ]; - // 健康实例总数 - uint32 total_health_instance_count = 2 - [ json_name = "total_health_instance_count" ]; - // 实例总数 - uint32 total_instance_count = 3 [ json_name = "total_instance_count" ]; -} - -message ClientLabel { - string key = 1; - MatchString value = 2; -} - -// API统一数据结构 -message API { - // API的协议,*或者为空代表全部 - string protocol = 1 [ json_name = "protocol" ]; - // API的方法,*或者为空代表全部 - string method = 2 [ json_name = "method" ]; - // API的路径,支持多种匹配方式 - MatchString path = 3 [ json_name = "path" ]; -} \ No newline at end of file diff --git a/source/java/polaris-specification/src/main/proto/namespace.proto b/source/java/polaris-specification/src/main/proto/namespace.proto deleted file mode 100644 index a23850d8..00000000 --- a/source/java/polaris-specification/src/main/proto/namespace.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "google/protobuf/wrappers.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/model"; - -option java_package = "com.tencent.polaris.specification.api.v1.model"; -option java_outer_classname = "NamespaceProto"; - -message Namespace { - google.protobuf.StringValue name = 1; - google.protobuf.StringValue comment = 2; - google.protobuf.StringValue owners = 3; - google.protobuf.StringValue token = 4; - google.protobuf.StringValue ctime = 5; - google.protobuf.StringValue mtime = 6; - - google.protobuf.UInt32Value total_service_count = 7 [json_name = "total_service_count"]; - google.protobuf.UInt32Value total_health_instance_count = 8 [json_name = "total_health_instance_count"]; - google.protobuf.UInt32Value total_instance_count = 9 [json_name = "total_instance_count"]; - - repeated google.protobuf.StringValue user_ids = 10 [json_name = "user_ids"]; - repeated google.protobuf.StringValue group_ids = 11 [json_name = "group_ids"]; - - repeated google.protobuf.StringValue remove_user_ids = 13 [json_name = "remove_user_ids"]; - repeated google.protobuf.StringValue remove_group_ids = 14 [json_name = "remove_group_ids"]; - - google.protobuf.StringValue id = 12; - - google.protobuf.BoolValue editable = 15; - - repeated google.protobuf.StringValue service_export_to = 16 [ json_name = "service_export_to" ]; -} \ No newline at end of file diff --git a/source/java/polaris-specification/src/main/proto/ratelimit.proto b/source/java/polaris-specification/src/main/proto/ratelimit.proto deleted file mode 100644 index a12d17f5..00000000 --- a/source/java/polaris-specification/src/main/proto/ratelimit.proto +++ /dev/null @@ -1,216 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "google/protobuf/wrappers.proto"; -import "google/protobuf/duration.proto"; -import "model.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/traffic_manage"; -option java_package = "com.tencent.polaris.specification.api.v1.traffic.manage"; -option java_outer_classname = "RateLimitProto"; - -// 同一服务下限流规则集合 -message RateLimit { - // 限流规则集合 - repeated Rule rules = 1; - // 限流规则汇总的revision信息 - google.protobuf.StringValue revision = 2; -} - -// 单个限流规则信息 -message Rule { - // 限流规则唯一标识 - google.protobuf.StringValue id = 1; - // 限流规则所属服务名 - google.protobuf.StringValue service = 2; - // 限流规则所属命名空间 - google.protobuf.StringValue namespace = 3; - // 可选,SUBSET标识 - map subset = 4; - // 限流规则优先级,0值最高 - google.protobuf.UInt32Value priority = 5; - // 限流资源 - enum Resource { - // 针对QPS进行限流 - QPS = 0; - // 针对并发数进行限流 - CONCURRENCY = 1; - } - Resource resource = 6; - // 限流类型 - // global全局限流(默认)或者local单机限流 - enum Type { - GLOBAL = 0; - LOCAL = 1; - } - Type type = 7; - // 业务标签集合,通过KV进行匹配,全部匹配才使用该规则 - map labels = 8; - // 限流阈值 - // 可以有多个粒度的配置(比如同时针对秒级,分钟级,天级),匹配一个则进行限流 - // 全局限流模式下,该值为服务配额总量;单机限流模式下,该值为单个节点能处理的配额量 - repeated Amount amounts = 9; - // 限流动作,对应着客户端的插件名字 - google.protobuf.StringValue action = 10; - // 是否停用该限流规则,默认启用 - google.protobuf.BoolValue disable = 11; - // 限流上报方式,同时支持按固定周期上报,以及达到配额百分比后上报 - Report report = 12; - // 限流规则创建时间 - google.protobuf.StringValue ctime = 13; - // 限流规则修改时间 - google.protobuf.StringValue mtime = 14; - // 限流规则revision信息 - google.protobuf.StringValue revision = 15; - // 服务的TOKEN信息,仅用于控制台,discover接口不下发 - google.protobuf.StringValue service_token = 16 [json_name = "service_token"]; - // 配额调整算法 - AmountAdjuster adjuster = 17; - // 通配符是否合并计算,默认分开计数 - google.protobuf.BoolValue regex_combine = 18 [json_name = "regex_combine"]; - - // 限流阈值模 - enum AmountMode { - GLOBAL_TOTAL = 0; // 总体阈值 - SHARE_EQUALLY = 1; // 单机均摊阈值 - } - AmountMode amount_mode = 19; - // 与限流集群连接失败时降级模式 - enum FailoverType { - FAILOVER_LOCAL = 0; // 降级成本地阈值 - FAILOVER_PASS = 1; // 降级成直接通过 - } - FailoverType failover = 20; - // 分布式限流服务集群 - RateLimitCluster cluster = 21; - // 被调接口名 - MatchString method = 22; - // 被调的参数过滤条件,满足过滤条件才进入限流规则 - repeated MatchArgument arguments = 23; - // 限流规则名 - google.protobuf.StringValue name = 24; - // 限流规则启用时间 - google.protobuf.StringValue etime = 25; - // 最大排队时长,单位秒 - google.protobuf.UInt32Value max_queue_delay = 26 [json_name = "max_queue_delay"]; - // 限流规则标签数据 - map metadata = 50; -} - -message MatchArgument { - // label type for gateway request - enum Type { - // custom arguments - CUSTOM = 0; - // method, match the http post/get/put/delete or grpc method - METHOD = 1; - // header, match the http header, dubbo attachment, grpc header - HEADER = 2; - // query, match the http query, dubbo argument - QUERY = 3; - // caller service - CALLER_SERVICE = 4; - // caller host ip - CALLER_IP =5; - } - Type type = 1; - // header key or query key - string key = 2; - // header value or query value - MatchString value = 3; -} - -// 分布式限流服务集群 -message RateLimitCluster { - google.protobuf.StringValue service = 1; - // 限流规则所属命名空间 - google.protobuf.StringValue namespace = 2; -} - -// 限流配额 -message Amount { - // 时间周期内的最大配额数 - google.protobuf.UInt32Value maxAmount = 1; - // 配额生效的时间周期,必须大于等于1s - google.protobuf.Duration validDuration = 2; - // 请求统计精度 - google.protobuf.UInt32Value precision = 3; - // 可选,起始限流阈值,爬坡起始值 - google.protobuf.UInt32Value startAmount = 4; - // 可选,最小限流阈值,降低时最小值 - google.protobuf.UInt32Value minAmount = 5; -} - -// 限流上报方式 -message Report { - // 配额固定上报周期,单位毫秒 - google.protobuf.Duration interval = 1; - // 使用了百分之多少配额后启动一次实时上报,值范围(0,100] - google.protobuf.UInt32Value amountPercent = 2; -} - -// 配额调整算法 -message AmountAdjuster { - ClimbConfig climb = 1; -} - -// 限流调整算法Climb相关配置 -message ClimbConfig { - google.protobuf.BoolValue enable = 1; // 是否开启 - - // 限流数据统计配置 - message MetricConfig { - // 限流数据度量周期,默认60s - google.protobuf.Duration window = 1; - // 数据统计精度,决定数据度量的最小周期,度量滑窗的步长=window/precision - google.protobuf.UInt32Value precision = 2; - // 上报周期,默认20s - google.protobuf.Duration reportInterval = 3; - } - MetricConfig metric = 2; // 限流数据统计配置 - - // 触发调整的策略 - message TriggerPolicy { - // 错误率触发调整配置 - message ErrorRate { - google.protobuf.BoolValue enable = 1; // 是否开启 - google.protobuf.UInt32Value requestVolumeThreshold = 2; // 触发限流调整的最小的请求数 - google.protobuf.Int32Value errorRate = 3; // 触发限流的错误率配置 - - // 特殊错误码触发调整配置 - message SpecialConfig { - google.protobuf.StringValue type = 1; // 自定义错误类型 - repeated google.protobuf.Int64Value errorCodes = 2; // 特定规则针对的错误码 - google.protobuf.Int32Value errorRate = 3; //特定规则错误率 - } - repeated SpecialConfig specials = 4; // 针对部分错误码,使用额外的错误率统计,可设置多组特殊规则 - } - - // 慢调用触发调整配置 - message SlowRate { - google.protobuf.BoolValue enable = 1; // 是否开启 - google.protobuf.Duration maxRt = 2; // 最大响应时间,超过该响应时间属于慢调用 - google.protobuf.Int32Value slowRate = 3; // 慢请求率阈值,达到该阈值进行限流 - } - - ErrorRate errorRate = 1; // 按错误率阈值调整 - SlowRate slowRate = 2; // 慢调用进行触发调整 - } - - TriggerPolicy policy = 3; // 触发调整策略 - - // 爬坡调整相关参数 - message ClimbThrottling { - google.protobuf.Int32Value coldBelowTuneDownRate = 1; // 冷水位以下区间的下调百分比 - google.protobuf.Int32Value coldBelowTuneUpRate = 2; // 冷水位以下区间的上调百分比 - google.protobuf.Int32Value coldAboveTuneDownRate = 3; // 冷水位以上区间的下调百分比 - google.protobuf.Int32Value coldAboveTuneUpRate = 4; // 冷水位以上区间的上调百分比 - google.protobuf.Int32Value limitThresholdToTuneUp = 5; // 冷水位以上,超过该百分的请求被限流后进行阈值上调 - google.protobuf.Duration judgeDuration = 6; // 阈值调整规则的决策间隔 - google.protobuf.Int32Value tuneUpPeriod = 7; // 阈值上调周期数,连续N个决策间隔都为上调,才执行上调 - google.protobuf.Int32Value tuneDownPeriod = 8; // 阈值下调周期数,连续N个决策间隔都为下调,才执行下调 - } - - ClimbThrottling throttling = 4; // 限流调整相关参数 -} \ No newline at end of file diff --git a/source/java/polaris-specification/src/main/proto/ratelimiter.proto b/source/java/polaris-specification/src/main/proto/ratelimiter.proto deleted file mode 100644 index e43c66c7..00000000 --- a/source/java/polaris-specification/src/main/proto/ratelimiter.proto +++ /dev/null @@ -1,211 +0,0 @@ -syntax = "proto3"; - -package polaris.metric.v2; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/traffic_manage/ratelimiter"; -option java_package = "com.tencent.polaris.specification.api.v1.traffic.manage.ratelimiter"; -option java_outer_classname = "RateLimiterProto"; - -//命令字 -enum RateLimitCmd { - INIT = 0; - ACQUIRE = 1; - BATCH_INIT = 2; - BATCH_ACQUIRE = 3; -} - -//限流请求 -message RateLimitRequest { - //命令字 - RateLimitCmd cmd = 1; - //初始化请求 - RateLimitInitRequest rateLimitInitRequest = 2; - //上报请求 - RateLimitReportRequest rateLimitReportRequest = 3; - //批量初始化请求 - RateLimitBatchInitRequest rateLimitBatchInitRequest = 4; -} - -//限流应答 -message RateLimitResponse { - //命令字 - RateLimitCmd cmd = 1; - //初始化应答 - RateLimitInitResponse rateLimitInitResponse = 2; - //上报应答 - RateLimitReportResponse rateLimitReportResponse = 3; - //批量初始化应答 - RateLimitBatchInitResponse rateLimitBatchInitResponse = 4; -} - -//限频模式 -enum Mode { - //自适应模式,根据历史流量自动调整 - ADAPTIVE = 0; - //批量抢占模式,客户端进行拉取,Server返回全量剩余配额 - BATCH_OCCUPY = 1; - //批量分摊模式,客户端进行拉取,Server按比例进行分摊 - BATCH_SHARE = 2; -} - -//初始化请求 -message RateLimitInitRequest { - //限流目标对象数据 - LimitTarget target = 1; - //客户端唯一标识 - string clientId = 2; - //限流规则信息 - repeated QuotaTotal totals = 3; - //客户端可指定滑窗数,不指定用默认值 - uint32 slideCount = 4; - //限流模式 - Mode mode = 5; -} - -//初始化应答 -message RateLimitInitResponse { - //应答错误码 - uint32 code = 1; - //限流目标对象,回传给客户端 - LimitTarget target = 2; - //客户端的标识,与clientId对应,一个server全局唯一,上报时候带入 - uint32 clientKey = 3; - //计数器的标识 - repeated QuotaCounter counters = 5; - //实际滑窗个数 - uint32 slideCount = 6; - //限流server绝对时间,单位ms - int64 timestamp = 7; -} - -//批量初始化请求 -message RateLimitBatchInitRequest { - //每条规则汇总成一个Init请求 - repeated RateLimitInitRequest request = 1; - //客户端唯一标识 - string clientId = 2; -} - -message LabeledQuotaCounter { - //自定义标签 - string labels = 1; - //计数器的标识 - repeated QuotaCounter counters = 2; -} - -message BatchInitResult { - //应答错误码 - uint32 code = 1; - //限流目标对象,回传给客户端,labels为规则 - LimitTarget target = 2; - //计数器的标识 - repeated LabeledQuotaCounter counters = 3; - //实际滑窗个数 - uint32 slideCount = 4; -} - -//批量初始化应答 -message RateLimitBatchInitResponse { - //应答错误码 - uint32 code = 1; - //客户端的标识,与clientId对应,一个server全局唯一,上报时候带入 - uint32 clientKey = 2; - //限流server绝对时间,单位ms - int64 timestamp = 3; - //批量初始化结果 - repeated BatchInitResult result = 4; -} - -//限流上报请求 -message RateLimitReportRequest { - //客户端标识 - uint32 clientKey = 1; - //已使用的配额数 - repeated QuotaSum quotaUses = 2; - //配额发生的时间,单位ms - int64 timestamp = 3; -} - -//限流上报应答 -message RateLimitReportResponse { - uint32 code = 1; - //剩余配额数 - repeated QuotaLeft quotaLefts = 2; - //限流server绝对时间,单位ms - int64 timestamp = 3; -} - -//限流目标,针对哪部分数据进行限流 -message LimitTarget { - //命名空间 - string namespace = 1; - //服务名 - string service = 2; - //自定义标签 - string labels = 3; - //批量自定义标签 - repeated string labels_list = 4; -} - -//阈值模式 -enum QuotaMode { - //整体阈值 - WHOLE = 0; - //单机均分阈值 - DIVIDE = 1; -} - -//阈值配置的值 -message QuotaTotal { - //阈值模式 - QuotaMode mode = 1; - //单位秒 - uint32 duration = 2; - //限流阈值 - uint32 maxAmount = 3; -} - -//限流计数器 -message QuotaCounter { - //单位秒 - uint32 duration = 1; - // bucket的标识,上报时候带入 - uint32 counterKey = 2; - //剩余配额数,应答返回,允许为负数 - int64 left = 3; - //实际限流模式 - Mode mode = 4; - //接入的客户端数量 - uint32 clientCount = 5; -} - -//客户端阈值使用统计 -message QuotaSum { - //计数器的标识,一个server全局唯一,上报时候带入 - uint32 counterKey = 1; - //已使用的配额数,上报时候带入 - uint32 used = 2; - //被限流数,上报时候带入 - uint32 limited = 3; -} - -//客户端阈值使用统计,由服务端返回 -message QuotaLeft { - //计数器的标识,一个server全局唯一,上报时候带入 - uint32 counterKey = 1; - //剩余配额数,应答返回,允许为负数 - int64 left = 2; - //当前限流模式 - Mode mode = 3; - //接入的客户端数量 - uint32 clientCount = 4; -} - -//时间点对齐的请求 -message TimeAdjustRequest {} - -//时间点对齐的应答 -message TimeAdjustResponse { - //服务器时间点,毫秒 - int64 serverTimestamp = 1; -} diff --git a/source/java/polaris-specification/src/main/proto/request.proto b/source/java/polaris-specification/src/main/proto/request.proto deleted file mode 100644 index 49f98b43..00000000 --- a/source/java/polaris-specification/src/main/proto/request.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "service.proto"; -import "contract.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/service_manage"; -option java_package = "com.tencent.polaris.specification.api.v1.service.manage"; -option java_outer_classname = "RequestProto"; - -message DiscoverFilter { - bool OnlyHealthyInstance = 1; -} - -message DiscoverRequest { - enum DiscoverRequestType { - UNKNOWN = 0; - INSTANCE = 1; - CLUSTER = 2; - ROUTING = 3; - RATE_LIMIT = 4; - CIRCUIT_BREAKER = 5; - SERVICES = 6; - reserved 7 to 11; - NAMESPACES = 12; - FAULT_DETECTOR = 13; - reserved 14 to 99; - LANE = 100; - // 自定义路由规则 - CUSTOM_ROUTE_RULE = 101; - // 就近路由规则 - NEARBY_ROUTE_RULE = 102; - } - - DiscoverRequestType type = 1; - Service service = 2; - reserved 3 to 4; - DiscoverFilter Filter = 30; -} - diff --git a/source/java/polaris-specification/src/main/proto/response.proto b/source/java/polaris-specification/src/main/proto/response.proto deleted file mode 100644 index d04f56e6..00000000 --- a/source/java/polaris-specification/src/main/proto/response.proto +++ /dev/null @@ -1,126 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "google/protobuf/wrappers.proto"; -import "google/protobuf/any.proto"; -import "namespace.proto"; -import "service.proto"; -import "routing.proto"; -import "ratelimit.proto"; -import "circuitbreaker.proto"; -import "model.proto"; -import "client.proto"; -import "configrelease.proto"; -import "fault_detector.proto"; -import "auth.proto"; -import "contract.proto"; -import "lane.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/service_manage"; -option java_package = "com.tencent.polaris.specification.api.v1.service.manage"; -option java_outer_classname = "ResponseProto"; - -message Response { - google.protobuf.UInt32Value code = 1; - google.protobuf.StringValue info = 2; - Client client = 3; - Namespace namespace = 4; - Service service = 5; - Instance instance = 6; - Routing routing = 7; - ServiceAlias alias = 8; - Rule rateLimit = 9; - CircuitBreaker circuitBreaker = 10; - ConfigRelease configRelease = 11; - reserved 12 to 18; - User user = 19; - UserGroup userGroup = 20; - AuthStrategy authStrategy = 21; - UserGroupRelation relation = 22; - LoginResponse loginResponse = 23; - ModifyAuthStrategy modifyAuthStrategy = 24; - ModifyUserGroup modifyUserGroup = 25; - StrategyResources resources = 26; - OptionSwitch optionSwitch = 27; - InstanceLabels instanceLabels = 28; - - google.protobuf.Any data = 29; - - ServiceContract serviceContract = 30; -} - -message BatchWriteResponse { - google.protobuf.UInt32Value code = 1; - google.protobuf.StringValue info = 2; - google.protobuf.UInt32Value size = 3; - repeated Response responses = 4; -} - -message BatchQueryResponse { - google.protobuf.UInt32Value code = 1; - google.protobuf.StringValue info = 2; - google.protobuf.UInt32Value amount = 3; - google.protobuf.UInt32Value size = 4; - repeated Namespace namespaces = 5; - repeated Service services = 6; - repeated Instance instances = 7; - repeated Routing routings = 8; - repeated ServiceAlias aliases = 9; - repeated Rule rateLimits = 10; - repeated ConfigWithService configWithServices = 11; - reserved 12 to 17; - repeated User users = 18; - repeated UserGroup userGroups = 19; - repeated AuthStrategy authStrategies = 20; - repeated Client clients = 21; - - repeated google.protobuf.Any data = 22; - Summary summary = 23; -} - -message DiscoverResponse { - google.protobuf.UInt32Value code = 1; - google.protobuf.StringValue info = 2; - - enum DiscoverResponseType { - UNKNOWN = 0; - INSTANCE = 1; - CLUSTER = 2; - ROUTING = 3; - RATE_LIMIT = 4; - CIRCUIT_BREAKER = 5; - SERVICES = 6; - reserved 7 to 11; - reserved "MESH", "MESH_CONFIG", "FLUX_DBREFRESH", "FLUX_SDK", "FLUX_SERVER"; - NAMESPACES = 12; - FAULT_DETECTOR = 13; - reserved 14 to 99; - LANE = 100; - // 自定义路由规则 - CUSTOM_ROUTE_RULE = 101; - // 就近路由规则 - NEARBY_ROUTE_RULE = 102; - } - - DiscoverResponseType type = 3; - Service service = 4; - repeated Instance instances = 5; - Routing routing = 6; - RateLimit rateLimit = 7; - CircuitBreaker circuitBreaker = 8; - repeated Service services = 9; - repeated Namespace namespaces = 10; - FaultDetector faultDetector = 11; - reserved 12 to 20; - Service aliasFor = 21; - repeated LaneGroup lanes = 22; - // 自定义路由规则内容 - repeated RouteRule customRouteRules = 23; - // 就近路由规则内容 - repeated RouteRule nearbyRouteRules = 24; -} - -message OptionSwitch { map options = 1; } - -message InstanceLabels { map labels = 1; } diff --git a/source/java/polaris-specification/src/main/proto/routing.proto b/source/java/polaris-specification/src/main/proto/routing.proto deleted file mode 100644 index 0754f134..00000000 --- a/source/java/polaris-specification/src/main/proto/routing.proto +++ /dev/null @@ -1,275 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "google/protobuf/wrappers.proto"; -import "google/protobuf/any.proto"; -import "model.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/traffic_manage"; -option java_package = "com.tencent.polaris.specification.api.v1.traffic.manage"; -option java_outer_classname = "RoutingProto"; - -message Routing { - // 规则所属服务以及命名空间 - - google.protobuf.StringValue service = 1; - google.protobuf.StringValue namespace = 2; - - // 每个服务可以配置多条入站或者出站规则 - // 对于每个请求,从上到下依次匹配,若命中则终止 - repeated Route inbounds = 3; - repeated Route outbounds = 4; - - google.protobuf.StringValue ctime = 5; - google.protobuf.StringValue mtime = 6; - google.protobuf.StringValue revision = 7; - - google.protobuf.StringValue service_token = 8 [ json_name = "service_token" ]; - - reserved 9 to 20; - // route rules for current service - repeated RouteRule rules = 21; -} - -// deprecated: only for compatible to the old version server -message Route { - // 如果匹配Source规则,按照Destination路由 - // 多个Source之间的关系为或 - repeated Source sources = 1; - repeated Destination destinations = 2; - - // extendInfo 用于承载一些额外信息 - // case 1: 升级到 v2 版本时,记录对应到 v2 版本的 id 信息 - map extendInfo = 3; -} - -// deprecated: only for compatible to the old version server -message Source { - // 主调方服务以及命名空间 - google.protobuf.StringValue service = 1; - google.protobuf.StringValue namespace = 2; - - // 主调方服务实例标签或者请求标签 - // value支持正则匹配 - map metadata = 3; -} - -// deprecated: only for compatible to the old version server -message Destination { - // 被调方服务以及命名空间 - google.protobuf.StringValue service = 1; - google.protobuf.StringValue namespace = 2; - - // 被调方服务实例标签 - // value支持正则匹配 - map metadata = 3; - - // 根据服务名和服务实例metadata筛选符合条件的服务实例子集 - // 服务实例子集可以设置优先级和权重 - // 优先级:整型,范围[0, 9],最高优先级为0 - // 权重:整型 - // 先按优先级路由,如果存在高优先级,不会使用低优先级 - // 如果存在优先级相同的子集,再按权重分配 - // 优先级和权重可以都不设置/设置一个/设置两个 - // 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低 - // 如果部分设置权重,部分没有设置,认为没有设置的权重为0 - // 如果全部没有设置权重,认为权重相同 - google.protobuf.UInt32Value priority = 4; - google.protobuf.UInt32Value weight = 5; - - // 将请求转发到代理服务 - google.protobuf.StringValue transfer = 6; - - //是否对该set执行隔离,隔离后,不会再分配流量 - google.protobuf.BoolValue isolate = 7; - - // 实例分组名 - google.protobuf.StringValue name = 8; -} - -enum RoutingPolicy { - // Route by rule rule => RuleRoutingConfig - RulePolicy = 0; - // Route by destination metadata ==> MetadataRoutingConfig - MetadataPolicy = 1; -} - -// configuration root for route -message RouteRule { - string id = 1; - // route rule name - string name = 2; - // namespace namingspace of routing rules - string namespace = 3; - // Enable this router - bool enable = 4; - // Router type - RoutingPolicy routing_policy = 5 [ json_name = "routing_policy" ]; - // Routing configuration for router - google.protobuf.Any routing_config = 6 [ json_name = "routing_config" ]; - // revision routing version - string revision = 7; - // ctime create time of the rules - string ctime = 8; - // mtime modify time of the rules - string mtime = 9; - // etime enable time of the rules - string etime = 10; - // priority rules priority - uint32 priority = 11; - // description simple description rules - string description = 12; - // extendInfo 用于承载一些额外信息 - // case 1: 升级到 v2 版本时,记录对应到 v1 版本的 id 信息 - // deprecated_filed only for compatible to the old version server - map extendInfo = 20; - // 路由规则标签数据 - map metadata = 50; -} - -message MetadataFailover { - enum FailoverRange { - // ALL return all instances - ALL = 0; - // OTHERS retuen without thie labels instances - OTHERS = 1; - // OTHER_KEYS return other instances which match keys - OTHER_KEYS = 2; - } - // failover_range metadata route bottom type - FailoverRange failover_range = 1; - // only use to failover_range == OTHER_KEYS - map labels = 2; -} - -// MetadataRoutingConfig metadata routing configuration -message MetadataRoutingConfig { - // service - string service = 1; - // namespace - string namespace = 2; - map labels = 3; - // When metadata not found, it will fall back to the - MetadataFailover failover = 4; -} - -// NearbyRoutingConfig routing configuration -message NearbyRoutingConfig { - enum LocationLevel { - // 未知就近级别,等同于未定义级别 - UNKNOWN = 0; - // 机房就近级别 - CAMPUS = 1; - // 可用区就近级别 - ZONE = 2; - // 地域就近级别 - REGION = 3; - // 全局就近级别 - ALL = 4; - } - // 被调服务名,支持*,代表全部服务 - string service = 1 [ json_name = "service" ]; - // 被调命名空间 - string namespace = 2 [ json_name = "namespace" ]; - // 默认就近级别 - LocationLevel match_level = 3 [ json_name = "match_level" ]; - // 最大就近级别 - LocationLevel max_match_level = 4 [ json_name = "max_match_level" ]; - // 是否强制就近 - bool strict_nearby = 5 [ json_name = "strict_nearby" ]; -} - -// RuleRoutingConfig routing configuration -message RuleRoutingConfig { - // source source info - // deprecated_filed only for compatible to the old version server - repeated SourceService sources = 1 [deprecated = true]; - // destination destinations info - // deprecated_filed only for compatible to the old version server - repeated DestinationGroup destinations = 2 [deprecated = true]; - // rule route chain - repeated SubRuleRouting rules = 3; -} - -// SubRuleRouting sub routing configuration -message SubRuleRouting { - // sub routing rule name - string name = 1; - // source source info - repeated SourceService sources = 2; - // destination destinations info - repeated DestinationGroup destinations = 3; -} - -message SourceService { - // Main tuning service and namespace - string service = 1; - string namespace = 2; - - // Master Control Service Example Tag or Request Label - // Value supports regular matching - repeated SourceMatch arguments = 3; -} - -message DestinationGroup { - // Templated service and namespace - string service = 1; - string namespace = 2; - - // Templated service example label - // Value supports regular matching - map labels = 3; - - // According to the service name and service instance Metadata Filter the - // qualified service instance subset Service instance subset can set priority - // and weight Priority: integer, range [0, 9], the highest priority is 0 - // Weight: Integer - // Press priority routing, if there is high priority, low priority will not - // use If there is a subset of the same priority, then assign by weight - // Priority and weight can be not set / set up one / set two - // If the section is set priority, some are not set, it is considered that the - // priority is not set. If the part is set, some is not set, it is considered - // that the weight is not set to 0 If you have no weight, you think the weight - // is the same - uint32 priority = 4; - uint32 weight = 5; - - // Forward requests to proxy service - string transfer = 6; - - // Whether to isolate the SET, after isolation, no traffic will be allocated - bool isolate = 7; - - // name desition name - string name = 8; -} - -// SourceMatch -message SourceMatch { - // label type for gateway request - enum Type { - // custom arguments - CUSTOM = 0; - // method, match the http post/get/put/delete or grpc method - METHOD = 1; - // header, match the http header, dubbo attachment, grpc header - HEADER = 2; - // query, match the http query, dubbo argument - QUERY = 3; - // caller host ip - CALLER_IP = 4; - // path, math the http url - PATH = 5; - // cookie match http cookie - COOKIE = 6; - // indicate the caller instance metadata - CALLER_METADATA = 7; - } - Type type = 1; - // header key or query key - string key = 2; - // header value or query value - MatchString value = 3; -} - diff --git a/source/java/polaris-specification/src/main/proto/service.proto b/source/java/polaris-specification/src/main/proto/service.proto deleted file mode 100644 index 98338052..00000000 --- a/source/java/polaris-specification/src/main/proto/service.proto +++ /dev/null @@ -1,109 +0,0 @@ -syntax = "proto3"; - -package v1; - -import "google/protobuf/wrappers.proto"; -import "model.proto"; - -option go_package = "github.com/polarismesh/specification/source/go/api/v1/service_manage"; -option java_package = "com.tencent.polaris.specification.api.v1.service.manage"; -option java_outer_classname = "ServiceProto"; - -message Service { - google.protobuf.StringValue name = 1; - google.protobuf.StringValue namespace = 2; - - map metadata = 3; - - google.protobuf.StringValue ports = 4; - google.protobuf.StringValue business = 5; - google.protobuf.StringValue department = 6; - google.protobuf.StringValue cmdb_mod1 = 7 [json_name = "cmdb_mod1"]; - google.protobuf.StringValue cmdb_mod2 = 8 [json_name = "cmdb_mod2"]; - google.protobuf.StringValue cmdb_mod3 = 9 [json_name = "cmdb_mod3"]; - google.protobuf.StringValue comment = 10; - google.protobuf.StringValue owners = 11; - google.protobuf.StringValue token = 12; - - google.protobuf.StringValue ctime = 13; - google.protobuf.StringValue mtime = 14; - google.protobuf.StringValue revision = 15; - google.protobuf.StringValue platform_id = 16 [json_name = "platform_id"]; - - google.protobuf.UInt32Value total_instance_count = 17 [json_name = "total_instance_count"]; - google.protobuf.UInt32Value healthy_instance_count = 18 [json_name = "healthy_instance_count"]; - - repeated google.protobuf.StringValue user_ids = 19 [json_name = "user_ids"]; - repeated google.protobuf.StringValue group_ids = 20 [json_name = "group_ids"]; - - repeated google.protobuf.StringValue remove_user_ids = 22 [json_name = "remove_user_ids"]; - repeated google.protobuf.StringValue remove_group_ids = 23 [json_name = "remove_group_ids"]; - - google.protobuf.StringValue id = 21; - google.protobuf.BoolValue editable = 24; - repeated google.protobuf.StringValue export_to = 25 [ json_name = "export_to" ]; -} - -enum AliasType { - DEFAULT = 0; - CL5SID = 1; -} - -message ServiceAlias { - google.protobuf.StringValue service = 1; - google.protobuf.StringValue namespace = 2; - google.protobuf.StringValue alias = 3; - google.protobuf.StringValue alias_namespace = 4 [json_name = "alias_namespace"]; - AliasType type = 5; - google.protobuf.StringValue owners = 6; - google.protobuf.StringValue comment = 7; - google.protobuf.StringValue service_token = 8 [json_name = "service_token"]; - - google.protobuf.StringValue ctime = 9; - google.protobuf.StringValue mtime = 10; - - google.protobuf.StringValue id = 11; - google.protobuf.BoolValue editable = 12; -} - -message Instance { - google.protobuf.StringValue id = 1; - google.protobuf.StringValue service = 2; - google.protobuf.StringValue namespace = 3; - google.protobuf.StringValue vpc_id = 21 [json_name = "vpc_id"]; - google.protobuf.StringValue host = 4; - google.protobuf.UInt32Value port = 5; - google.protobuf.StringValue protocol = 6; - google.protobuf.StringValue version = 7; - google.protobuf.UInt32Value priority = 8; - google.protobuf.UInt32Value weight = 9; - google.protobuf.BoolValue enable_health_check = 20; - HealthCheck health_check = 10; - google.protobuf.BoolValue healthy = 11; - google.protobuf.BoolValue isolate = 12; - Location location = 13; - - map metadata = 14; - google.protobuf.StringValue logic_set = 15 [json_name = "logic_set"]; - - google.protobuf.StringValue ctime = 16; - google.protobuf.StringValue mtime = 17; - google.protobuf.StringValue revision = 18; - - google.protobuf.StringValue service_token = 19 [json_name = "service_token"]; -} - -message HealthCheck { - enum HealthCheckType { - UNKNOWN = 0; - HEARTBEAT = 1; - } - - HealthCheckType type = 1; - - HeartbeatHealthCheck heartbeat = 2; -} - -message HeartbeatHealthCheck { - google.protobuf.UInt32Value ttl = 1; -} From 02ae852555cfd698f282ea6a24ff5bb55e24c5c9 Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Mon, 12 Aug 2024 20:18:14 +0800 Subject: [PATCH 02/15] Update version to 1.5.3-SNAPSHOT --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 4cda8f19..946b77a8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.2 +1.5.3-SNAPSHOT From b4028c86fd8de5077d2df704a99b5fbda7dede74 Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Mon, 12 Aug 2024 20:22:04 +0800 Subject: [PATCH 03/15] fix: change maxAmount to max_amount --- api/v1/traffic_manage/ratelimit.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1/traffic_manage/ratelimit.proto b/api/v1/traffic_manage/ratelimit.proto index de1d049c..92c29e4c 100644 --- a/api/v1/traffic_manage/ratelimit.proto +++ b/api/v1/traffic_manage/ratelimit.proto @@ -129,7 +129,7 @@ message MatchArgument { // concurrency rate-limit amount config message ConcurrencyAmount { - uint32 maxAmount = 1 [ json_name = "maxAmount" ]; + uint32 maxAmount = 1 [ json_name = "max_amount" ]; } // 分布式限流服务集群 From 0cc9d2900dee1873f3eb76a1ba3d143b1a9b312c Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Tue, 13 Aug 2024 11:10:04 +0800 Subject: [PATCH 04/15] feat: add lossless rule specification --- api/v1/service_manage/request.proto | 2 + api/v1/service_manage/response.proto | 5 ++ api/v1/traffic_manage/lossless.proto | 86 ++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 api/v1/traffic_manage/lossless.proto diff --git a/api/v1/service_manage/request.proto b/api/v1/service_manage/request.proto index 49f98b43..bc4bb3ef 100644 --- a/api/v1/service_manage/request.proto +++ b/api/v1/service_manage/request.proto @@ -31,6 +31,8 @@ message DiscoverRequest { CUSTOM_ROUTE_RULE = 101; // 就近路由规则 NEARBY_ROUTE_RULE = 102; + // 无损上下线规则 + LOSSLESS = 103; } DiscoverRequestType type = 1; diff --git a/api/v1/service_manage/response.proto b/api/v1/service_manage/response.proto index d04f56e6..eb0ffdba 100644 --- a/api/v1/service_manage/response.proto +++ b/api/v1/service_manage/response.proto @@ -16,6 +16,7 @@ import "fault_detector.proto"; import "auth.proto"; import "contract.proto"; import "lane.proto"; +import "lossless.proto"; option go_package = "github.com/polarismesh/specification/source/go/api/v1/service_manage"; option java_package = "com.tencent.polaris.specification.api.v1.service.manage"; @@ -101,6 +102,8 @@ message DiscoverResponse { CUSTOM_ROUTE_RULE = 101; // 就近路由规则 NEARBY_ROUTE_RULE = 102; + // 无损上下线规则 + LOSSLESS = 103; } DiscoverResponseType type = 3; @@ -119,6 +122,8 @@ message DiscoverResponse { repeated RouteRule customRouteRules = 23; // 就近路由规则内容 repeated RouteRule nearbyRouteRules = 24; + // 无损上下线规则内容 + LosslessRule losslessRule = 25; } message OptionSwitch { map options = 1; } diff --git a/api/v1/traffic_manage/lossless.proto b/api/v1/traffic_manage/lossless.proto new file mode 100644 index 00000000..862e0599 --- /dev/null +++ b/api/v1/traffic_manage/lossless.proto @@ -0,0 +1,86 @@ +syntax = "proto3"; + +package v1; + +import "google/protobuf/wrappers.proto"; +import "google/protobuf/duration.proto"; +import "model.proto"; + +option go_package = "github.com/polarismesh/specification/source/go/api/v1/traffic_manage"; +option java_package = "com.tencent.polaris.specification.api.v1.traffic.manage"; +option java_outer_classname = "LosslessProto"; + +// 优雅上下线规则的模型 +message LosslessRule { + // rule id + string id = 1 [ json_name = "id" ]; + // service for rule belongs to + string service = 2 [ json_name = "service" ]; + // namespace for rule belongs to + string namespace = 3 [ json_name = "namespace" ]; + // revision routing version + string revision = 4 [ json_name = "revision" ]; + // ctime create time of the rules + string ctime = 5 [ json_name = "ctime" ]; + // mtime modify time of the rules + string mtime = 6 [ json_name = "mtime" ]; + // configuration for lossless online + LosslessOnline losslessOnline = 7 [ json_name = "lossless_online" ]; + // configuration for lossless offline + LosslessOffline losslessOffline = 8 [ json_name = "lossless_offline" ]; +} + +message LosslessOnline { + // configuration for delayRegister + DelayRegister delayRegister = 1 [ json_name = "delay_register" ]; + // configuration for warmup + Warmup warmup = 2 [ json_name = "warmup" ]; + // configuration for readiness probe + Readiness readiness = 3 [ json_name = "readiness" ]; +} + +message DelayRegister { + // enable delay registry + bool enable = 1 [ json_name = "enable" ]; + enum DelayStrategy { + // register instance after delay specific time + DELAY_BY_TIME = 0; + // register instance until health check successfully + DELAY_BY_HEALTH_CHECK = 1; + } + // delay register strategy + DelayStrategy strategy = 2 [ json_name = "strategy" ]; + // delay register time by second, active when strategy == DELAY_BY_TIME + int32 intervalSecond = 3 [ json_name = "interval_second" ]; + // protocol to do health check, default http, active when strategy == DELAY_BY_HEALTH_CHECK + string healthCheckProtocol = 4 [ json_name = "health_check_protocol" ]; + // method to do health check, default GET, active when strategy == DELAY_BY_HEALTH_CHECK + string healthCheckMethod = 5 [ json_name = "health_check_method" ]; + // path to do health check, no default value, active when strategy == DELAY_BY_HEALTH_CHECK + string healthCheckPath = 6 [ json_name = "health_check_path" ]; + // health check interval second, default is 30, active when strategy == DELAY_BY_HEALTH_CHECK + string healthCheckIntervalSecond = 7 [ json_name = "health_check_interval_second" ]; +} + +message Warmup { + // enable warmup + bool enable = 1 [ json_name = "enable" ]; + // total warmup interval by second + int32 intervalSecond = 2 [ json_name = "interval_second" ]; + // warmup stop when most of the instances in service are in warmup status + bool enableOverloadProtection = 3 [ json_name = "enable_overload_protection" ]; + // the threshold to active overload protection, default is 50, threshld = sum(WarmupInstances)/sum(AllInstances)*100 + int32 overloadProtectionThreshold = 4 [ json_name = "overload_protection_threshold" ]; + // curvature for warmup register, default is 1 + int32 curvature = 5 [ json_name = "curvature" ]; +} + +message Readiness { + // enable /readiness expose + bool enable = 1 [ json_name = "enable" ]; +} + +message LosslessOffline { + // enable /offline expose + bool enable = 1 [ json_name = "enable" ]; +} From cbe45989b34c6fdbb9b146a282393e55aa27e6af Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Tue, 13 Aug 2024 20:48:32 +0800 Subject: [PATCH 05/15] =?UTF-8?q?feat=EF=BC=9A=20lossless=E6=94=AF?= =?UTF-8?q?=E6=8C=81lables=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/v1/service_manage/response.proto | 2 +- api/v1/traffic_manage/lossless.proto | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/api/v1/service_manage/response.proto b/api/v1/service_manage/response.proto index eb0ffdba..990c79a2 100644 --- a/api/v1/service_manage/response.proto +++ b/api/v1/service_manage/response.proto @@ -123,7 +123,7 @@ message DiscoverResponse { // 就近路由规则内容 repeated RouteRule nearbyRouteRules = 24; // 无损上下线规则内容 - LosslessRule losslessRule = 25; + repeated LosslessRule losslessRules = 25; } message OptionSwitch { map options = 1; } diff --git a/api/v1/traffic_manage/lossless.proto b/api/v1/traffic_manage/lossless.proto index 862e0599..0e25f6a3 100644 --- a/api/v1/traffic_manage/lossless.proto +++ b/api/v1/traffic_manage/lossless.proto @@ -18,16 +18,18 @@ message LosslessRule { string service = 2 [ json_name = "service" ]; // namespace for rule belongs to string namespace = 3 [ json_name = "namespace" ]; + // match rules by labels + map labels = 4 [ json_name = "labels" ]; // revision routing version - string revision = 4 [ json_name = "revision" ]; + string revision = 5 [ json_name = "revision" ]; // ctime create time of the rules - string ctime = 5 [ json_name = "ctime" ]; + string ctime = 6 [ json_name = "ctime" ]; // mtime modify time of the rules - string mtime = 6 [ json_name = "mtime" ]; + string mtime = 7 [ json_name = "mtime" ]; // configuration for lossless online - LosslessOnline losslessOnline = 7 [ json_name = "lossless_online" ]; + LosslessOnline losslessOnline = 8 [ json_name = "lossless_online" ]; // configuration for lossless offline - LosslessOffline losslessOffline = 8 [ json_name = "lossless_offline" ]; + LosslessOffline losslessOffline = 9 [ json_name = "lossless_offline" ]; } message LosslessOnline { From 8c58ad52ac022eb5ef2e57c353d5cb2aa87cec5f Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:51:25 +0800 Subject: [PATCH 06/15] feat: restore circuitbreaker fallback & ratelimit add custom response --- .gitignore | 4 +++- api/v1/fault_tolerance/circuitbreaker.proto | 19 ++++++++++++++++++- api/v1/model/model.proto | 17 ----------------- api/v1/traffic_manage/lossless.proto | 14 ++++++-------- api/v1/traffic_manage/ratelimit.proto | 9 +++++++-- source/java/build-mac.sh | 12 ++++++++++-- .../java/polaris-specification-test/pom.xml | 2 +- 7 files changed, 45 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index 741d6ed0..3983cd57 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ source/python/dist source/rust/polaris-specification/target venv debug/ -target/ \ No newline at end of file +target/ +# Maven ignore +.flattened-pom.xml \ No newline at end of file diff --git a/api/v1/fault_tolerance/circuitbreaker.proto b/api/v1/fault_tolerance/circuitbreaker.proto index b1d23bdc..4852142e 100644 --- a/api/v1/fault_tolerance/circuitbreaker.proto +++ b/api/v1/fault_tolerance/circuitbreaker.proto @@ -286,7 +286,7 @@ message CircuitBreakerRule { // priority rules priority uint32 priority = 30 [ json_name = "priority" ]; // 熔断规则标签数据 - map metadata = 31; + map metadata = 31 [ json_name = "metadata" ]; } // the condition to judge an input invocation as an error @@ -336,4 +336,21 @@ message BlockConfig { repeated ErrorCondition error_conditions = 3 [ json_name = "error_conditions" ]; // trigger condition to trigger circuitbreaking repeated TriggerCondition trigger_conditions = 4 [ json_name = "trigger_conditions" ]; +} + +// fallback config +message FallbackConfig { + bool enable = 1; + FallbackResponse response = 2; +} + +// fallback response +message FallbackResponse { + int32 code = 1; + message MessageHeader { + string key = 1; + string value = 2; + } + repeated MessageHeader headers = 2; + string body = 3; } \ No newline at end of file diff --git a/api/v1/model/model.proto b/api/v1/model/model.proto index d31ab786..b24d8547 100644 --- a/api/v1/model/model.proto +++ b/api/v1/model/model.proto @@ -68,21 +68,4 @@ message API { string method = 2 [ json_name = "method" ]; // API的路径,支持多种匹配方式 MatchString path = 3 [ json_name = "path" ]; -} - -// fallback config -message FallbackConfig { - bool enable = 1; - FallbackResponse response = 2; -} - -// fallback response -message FallbackResponse { - int32 code = 1; - message MessageHeader { - string key = 1; - string value = 2; - } - repeated MessageHeader headers = 2; - string body = 3; } \ No newline at end of file diff --git a/api/v1/traffic_manage/lossless.proto b/api/v1/traffic_manage/lossless.proto index 92d793e0..624c10b7 100644 --- a/api/v1/traffic_manage/lossless.proto +++ b/api/v1/traffic_manage/lossless.proto @@ -18,20 +18,18 @@ message LosslessRule { string service = 2 [ json_name = "service" ]; // namespace for rule belongs to string namespace = 3 [ json_name = "namespace" ]; - // match rules by labels - map labels = 4 [ json_name = "labels" ]; // revision routing version - string revision = 5 [ json_name = "revision" ]; + string revision = 4 [ json_name = "revision" ]; // ctime create time of the rules - string ctime = 6 [ json_name = "ctime" ]; + string ctime = 5 [ json_name = "ctime" ]; // mtime modify time of the rules - string mtime = 7 [ json_name = "mtime" ]; + string mtime = 6 [ json_name = "mtime" ]; // configuration for lossless online - LosslessOnline losslessOnline = 8 [ json_name = "lossless_online" ]; + LosslessOnline losslessOnline = 7 [ json_name = "lossless_online" ]; // configuration for lossless offline - LosslessOffline losslessOffline = 9 [ json_name = "lossless_offline" ]; + LosslessOffline losslessOffline = 8 [ json_name = "lossless_offline" ]; // rule labels - map metadata = 10; + map metadata = 9 [ json_name = "metadata" ]; } message LosslessOnline { diff --git a/api/v1/traffic_manage/ratelimit.proto b/api/v1/traffic_manage/ratelimit.proto index bc83cadc..c582ccce 100644 --- a/api/v1/traffic_manage/ratelimit.proto +++ b/api/v1/traffic_manage/ratelimit.proto @@ -97,9 +97,9 @@ message Rule { // amount for concurrency rate-limit ConcurrencyAmount concurrencyAmount = 27 [ json_name = "concurrency_amount" ]; // fallback configuration - FallbackConfig fallbackConfig = 28 [ json_name = "fallback_config" ]; + CustomResponse customResponse = 28 [ json_name = "customResponse" ]; // 限流规则标签数据 - map metadata = 29; + map metadata = 29 [ json_name = "metadata" ]; } message MatchArgument { @@ -132,6 +132,11 @@ message ConcurrencyAmount { uint32 maxAmount = 1 [ json_name = "max_amount" ]; } +// custom response text when limited +message CustomResponse { + string body = 3; +} + // 分布式限流服务集群 message RateLimitCluster { google.protobuf.StringValue service = 1; diff --git a/source/java/build-mac.sh b/source/java/build-mac.sh index b5495c96..e883d739 100644 --- a/source/java/build-mac.sh +++ b/source/java/build-mac.sh @@ -26,7 +26,6 @@ traffic_manage_dir=${workdir}/api/v1/traffic_manage fault_tolerance_dir=${workdir}/api/v1/fault_tolerance config_manage_dir=${workdir}/api/v1/config_manage security_dir=${workdir}/api/v1/security - java_root_dir=${workdir}/source/java/polaris-specification java_test_root_dir=${workdir}/source/java/polaris-specification-test java_source_dir=${java_root_dir}/src/main @@ -45,8 +44,17 @@ cp ${traffic_manage_dir}/ratelimiter/*.proto ${java_source_dir}/proto/ version=`cat ${workdir}/VERSION` echo $version pushd ${java_root_dir} +cp pom.xml pom.xml.bak sed -i "" "s/##VERSION##/${version}/g" pom.xml +mvn clean install +mv pom.xml.bak pom.xml popd pushd ${java_test_root_dir} +cp pom.xml pom.xml.bak sed -i "" "s/##VERSION##/${version}/g" pom.xml -popd \ No newline at end of file +mvn clean install +mv pom.xml.bak pom.xml +popd + +rm -rf ${java_source_dir}/proto + diff --git a/source/java/polaris-specification-test/pom.xml b/source/java/polaris-specification-test/pom.xml index 37e5159e..4642814e 100644 --- a/source/java/polaris-specification-test/pom.xml +++ b/source/java/polaris-specification-test/pom.xml @@ -14,7 +14,7 @@ - 2.0.0.0-SNAPSHOT + ##VERSION## 8 8 UTF-8 From 08f17d35fc2ba9bbf0a1693f6de1d9425020e87e Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:59:41 +0800 Subject: [PATCH 07/15] fix: add json_name --- api/v1/traffic_manage/ratelimit.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1/traffic_manage/ratelimit.proto b/api/v1/traffic_manage/ratelimit.proto index c582ccce..c8177869 100644 --- a/api/v1/traffic_manage/ratelimit.proto +++ b/api/v1/traffic_manage/ratelimit.proto @@ -134,7 +134,7 @@ message ConcurrencyAmount { // custom response text when limited message CustomResponse { - string body = 3; + string body = 3 [ json_name = "body" ]; } // 分布式限流服务集群 From c1d1fa945e6758aae37bb1b0f63f0521d5f53e53 Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Thu, 15 Aug 2024 15:02:04 +0800 Subject: [PATCH 08/15] fix: customResponse to custom_response --- api/v1/traffic_manage/ratelimit.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1/traffic_manage/ratelimit.proto b/api/v1/traffic_manage/ratelimit.proto index c8177869..8ac3bd9e 100644 --- a/api/v1/traffic_manage/ratelimit.proto +++ b/api/v1/traffic_manage/ratelimit.proto @@ -97,7 +97,7 @@ message Rule { // amount for concurrency rate-limit ConcurrencyAmount concurrencyAmount = 27 [ json_name = "concurrency_amount" ]; // fallback configuration - CustomResponse customResponse = 28 [ json_name = "customResponse" ]; + CustomResponse customResponse = 28 [ json_name = "custom_response" ]; // 限流规则标签数据 map metadata = 29 [ json_name = "metadata" ]; } From 6601b20154418266bf31e745fc7fd18af5d33102 Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Thu, 15 Aug 2024 15:05:09 +0800 Subject: [PATCH 09/15] feat: add go compile sources --- .../v1/fault_tolerance/circuitbreaker.pb.go | 440 ++++++++++--- source/go/api/v1/model/model.pb.go | 283 +------- .../go/api/v1/traffic_manage/lossless.pb.go | 237 +++---- .../go/api/v1/traffic_manage/ratelimit.pb.go | 618 ++++++++++-------- 4 files changed, 809 insertions(+), 769 deletions(-) diff --git a/source/go/api/v1/fault_tolerance/circuitbreaker.pb.go b/source/go/api/v1/fault_tolerance/circuitbreaker.pb.go index dcd23dcc..9317146e 100644 --- a/source/go/api/v1/fault_tolerance/circuitbreaker.pb.go +++ b/source/go/api/v1/fault_tolerance/circuitbreaker.pb.go @@ -1132,7 +1132,7 @@ type CircuitBreakerRule struct { // fault detection enable config FaultDetectConfig *FaultDetectConfig `protobuf:"bytes,27,opt,name=faultDetectConfig,proto3" json:"faultDetectConfig,omitempty"` // fall back configuration - FallbackConfig *model.FallbackConfig `protobuf:"bytes,28,opt,name=fallbackConfig,proto3" json:"fallbackConfig,omitempty"` + FallbackConfig *FallbackConfig `protobuf:"bytes,28,opt,name=fallbackConfig,proto3" json:"fallbackConfig,omitempty"` // list for block configuration BlockConfigs []*BlockConfig `protobuf:"bytes,29,rep,name=block_configs,proto3" json:"block_configs,omitempty"` // priority rules priority @@ -1287,7 +1287,7 @@ func (x *CircuitBreakerRule) GetFaultDetectConfig() *FaultDetectConfig { return nil } -func (x *CircuitBreakerRule) GetFallbackConfig() *model.FallbackConfig { +func (x *CircuitBreakerRule) GetFallbackConfig() *FallbackConfig { if x != nil { return x.FallbackConfig } @@ -1632,6 +1632,126 @@ func (x *BlockConfig) GetTriggerConditions() []*TriggerCondition { return nil } +// fallback config +type FallbackConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` + Response *FallbackResponse `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *FallbackConfig) Reset() { + *x = FallbackConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_circuitbreaker_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FallbackConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FallbackConfig) ProtoMessage() {} + +func (x *FallbackConfig) ProtoReflect() protoreflect.Message { + mi := &file_circuitbreaker_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FallbackConfig.ProtoReflect.Descriptor instead. +func (*FallbackConfig) Descriptor() ([]byte, []int) { + return file_circuitbreaker_proto_rawDescGZIP(), []int{13} +} + +func (x *FallbackConfig) GetEnable() bool { + if x != nil { + return x.Enable + } + return false +} + +func (x *FallbackConfig) GetResponse() *FallbackResponse { + if x != nil { + return x.Response + } + return nil +} + +// fallback response +type FallbackResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Headers []*FallbackResponse_MessageHeader `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` + Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *FallbackResponse) Reset() { + *x = FallbackResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_circuitbreaker_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FallbackResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FallbackResponse) ProtoMessage() {} + +func (x *FallbackResponse) ProtoReflect() protoreflect.Message { + mi := &file_circuitbreaker_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FallbackResponse.ProtoReflect.Descriptor instead. +func (*FallbackResponse) Descriptor() ([]byte, []int) { + return file_circuitbreaker_proto_rawDescGZIP(), []int{14} +} + +func (x *FallbackResponse) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *FallbackResponse) GetHeaders() []*FallbackResponse_MessageHeader { + if x != nil { + return x.Headers + } + return nil +} + +func (x *FallbackResponse) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + // 错误率熔断配置 type CbPolicy_ErrRateConfig struct { state protoimpl.MessageState @@ -1652,7 +1772,7 @@ type CbPolicy_ErrRateConfig struct { func (x *CbPolicy_ErrRateConfig) Reset() { *x = CbPolicy_ErrRateConfig{} if protoimpl.UnsafeEnabled { - mi := &file_circuitbreaker_proto_msgTypes[14] + mi := &file_circuitbreaker_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1665,7 +1785,7 @@ func (x *CbPolicy_ErrRateConfig) String() string { func (*CbPolicy_ErrRateConfig) ProtoMessage() {} func (x *CbPolicy_ErrRateConfig) ProtoReflect() protoreflect.Message { - mi := &file_circuitbreaker_proto_msgTypes[14] + mi := &file_circuitbreaker_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1735,7 +1855,7 @@ type CbPolicy_SlowRateConfig struct { func (x *CbPolicy_SlowRateConfig) Reset() { *x = CbPolicy_SlowRateConfig{} if protoimpl.UnsafeEnabled { - mi := &file_circuitbreaker_proto_msgTypes[15] + mi := &file_circuitbreaker_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1748,7 +1868,7 @@ func (x *CbPolicy_SlowRateConfig) String() string { func (*CbPolicy_SlowRateConfig) ProtoMessage() {} func (x *CbPolicy_SlowRateConfig) ProtoReflect() protoreflect.Message { - mi := &file_circuitbreaker_proto_msgTypes[15] + mi := &file_circuitbreaker_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1809,7 +1929,7 @@ type CbPolicy_ConsecutiveErrConfig struct { func (x *CbPolicy_ConsecutiveErrConfig) Reset() { *x = CbPolicy_ConsecutiveErrConfig{} if protoimpl.UnsafeEnabled { - mi := &file_circuitbreaker_proto_msgTypes[16] + mi := &file_circuitbreaker_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1822,7 +1942,7 @@ func (x *CbPolicy_ConsecutiveErrConfig) String() string { func (*CbPolicy_ConsecutiveErrConfig) ProtoMessage() {} func (x *CbPolicy_ConsecutiveErrConfig) ProtoReflect() protoreflect.Message { - mi := &file_circuitbreaker_proto_msgTypes[16] + mi := &file_circuitbreaker_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1875,7 +1995,7 @@ type CbPolicy_ErrRateConfig_SpecialConfig struct { func (x *CbPolicy_ErrRateConfig_SpecialConfig) Reset() { *x = CbPolicy_ErrRateConfig_SpecialConfig{} if protoimpl.UnsafeEnabled { - mi := &file_circuitbreaker_proto_msgTypes[17] + mi := &file_circuitbreaker_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1888,7 +2008,7 @@ func (x *CbPolicy_ErrRateConfig_SpecialConfig) String() string { func (*CbPolicy_ErrRateConfig_SpecialConfig) ProtoMessage() {} func (x *CbPolicy_ErrRateConfig_SpecialConfig) ProtoReflect() protoreflect.Message { - mi := &file_circuitbreaker_proto_msgTypes[17] + mi := &file_circuitbreaker_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1944,7 +2064,7 @@ type RuleMatcher_SourceService struct { func (x *RuleMatcher_SourceService) Reset() { *x = RuleMatcher_SourceService{} if protoimpl.UnsafeEnabled { - mi := &file_circuitbreaker_proto_msgTypes[19] + mi := &file_circuitbreaker_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1957,7 +2077,7 @@ func (x *RuleMatcher_SourceService) String() string { func (*RuleMatcher_SourceService) ProtoMessage() {} func (x *RuleMatcher_SourceService) ProtoReflect() protoreflect.Message { - mi := &file_circuitbreaker_proto_msgTypes[19] + mi := &file_circuitbreaker_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2003,7 +2123,7 @@ type RuleMatcher_DestinationService struct { func (x *RuleMatcher_DestinationService) Reset() { *x = RuleMatcher_DestinationService{} if protoimpl.UnsafeEnabled { - mi := &file_circuitbreaker_proto_msgTypes[20] + mi := &file_circuitbreaker_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2016,7 +2136,7 @@ func (x *RuleMatcher_DestinationService) String() string { func (*RuleMatcher_DestinationService) ProtoMessage() {} func (x *RuleMatcher_DestinationService) ProtoReflect() protoreflect.Message { - mi := &file_circuitbreaker_proto_msgTypes[20] + mi := &file_circuitbreaker_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2054,6 +2174,61 @@ func (x *RuleMatcher_DestinationService) GetMethod() *model.MatchString { return nil } +type FallbackResponse_MessageHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *FallbackResponse_MessageHeader) Reset() { + *x = FallbackResponse_MessageHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_circuitbreaker_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FallbackResponse_MessageHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FallbackResponse_MessageHeader) ProtoMessage() {} + +func (x *FallbackResponse_MessageHeader) ProtoReflect() protoreflect.Message { + mi := &file_circuitbreaker_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FallbackResponse_MessageHeader.ProtoReflect.Descriptor instead. +func (*FallbackResponse_MessageHeader) Descriptor() ([]byte, []int) { + return file_circuitbreaker_proto_rawDescGZIP(), []int{14, 0} +} + +func (x *FallbackResponse_MessageHeader) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *FallbackResponse_MessageHeader) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + var File_circuitbreaker_proto protoreflect.FileDescriptor var file_circuitbreaker_proto_rawDesc = []byte{ @@ -2463,7 +2638,24 @@ var file_circuitbreaker_proto_rawDesc = []byte{ 0x67, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x74, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x46, + 0x67, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5a, + 0x0a, 0x0e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x10, 0x46, + 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x62, 0x6f, 0x64, 0x79, 0x1a, 0x37, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x46, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x09, 0x0a, @@ -2494,7 +2686,7 @@ func file_circuitbreaker_proto_rawDescGZIP() []byte { } var file_circuitbreaker_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_circuitbreaker_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_circuitbreaker_proto_msgTypes = make([]protoimpl.MessageInfo, 25) var file_circuitbreaker_proto_goTypes = []interface{}{ (Level)(0), // 0: v1.Level (RecoverConfig_OutlierDetectWhen)(0), // 1: v1.RecoverConfig.OutlierDetectWhen @@ -2516,112 +2708,116 @@ var file_circuitbreaker_proto_goTypes = []interface{}{ (*RecoverCondition)(nil), // 17: v1.RecoverCondition (*FaultDetectConfig)(nil), // 18: v1.FaultDetectConfig (*BlockConfig)(nil), // 19: v1.BlockConfig - nil, // 20: v1.SourceMatcher.LabelsEntry - (*CbPolicy_ErrRateConfig)(nil), // 21: v1.CbPolicy.ErrRateConfig - (*CbPolicy_SlowRateConfig)(nil), // 22: v1.CbPolicy.SlowRateConfig - (*CbPolicy_ConsecutiveErrConfig)(nil), // 23: v1.CbPolicy.ConsecutiveErrConfig - (*CbPolicy_ErrRateConfig_SpecialConfig)(nil), // 24: v1.CbPolicy.ErrRateConfig.SpecialConfig - nil, // 25: v1.DestinationSet.MetadataEntry - (*RuleMatcher_SourceService)(nil), // 26: v1.RuleMatcher.SourceService - (*RuleMatcher_DestinationService)(nil), // 27: v1.RuleMatcher.DestinationService - nil, // 28: v1.CircuitBreakerRule.MetadataEntry - (*wrapperspb.StringValue)(nil), // 29: google.protobuf.StringValue - (*durationpb.Duration)(nil), // 30: google.protobuf.Duration - (*wrapperspb.UInt32Value)(nil), // 31: google.protobuf.UInt32Value - (*model.MatchString)(nil), // 32: v1.MatchString - (*wrapperspb.Int64Value)(nil), // 33: google.protobuf.Int64Value - (*model.FallbackConfig)(nil), // 34: v1.FallbackConfig - (*model.API)(nil), // 35: v1.API - (*wrapperspb.BoolValue)(nil), // 36: google.protobuf.BoolValue + (*FallbackConfig)(nil), // 20: v1.FallbackConfig + (*FallbackResponse)(nil), // 21: v1.FallbackResponse + nil, // 22: v1.SourceMatcher.LabelsEntry + (*CbPolicy_ErrRateConfig)(nil), // 23: v1.CbPolicy.ErrRateConfig + (*CbPolicy_SlowRateConfig)(nil), // 24: v1.CbPolicy.SlowRateConfig + (*CbPolicy_ConsecutiveErrConfig)(nil), // 25: v1.CbPolicy.ConsecutiveErrConfig + (*CbPolicy_ErrRateConfig_SpecialConfig)(nil), // 26: v1.CbPolicy.ErrRateConfig.SpecialConfig + nil, // 27: v1.DestinationSet.MetadataEntry + (*RuleMatcher_SourceService)(nil), // 28: v1.RuleMatcher.SourceService + (*RuleMatcher_DestinationService)(nil), // 29: v1.RuleMatcher.DestinationService + nil, // 30: v1.CircuitBreakerRule.MetadataEntry + (*FallbackResponse_MessageHeader)(nil), // 31: v1.FallbackResponse.MessageHeader + (*wrapperspb.StringValue)(nil), // 32: google.protobuf.StringValue + (*durationpb.Duration)(nil), // 33: google.protobuf.Duration + (*wrapperspb.UInt32Value)(nil), // 34: google.protobuf.UInt32Value + (*model.MatchString)(nil), // 35: v1.MatchString + (*wrapperspb.Int64Value)(nil), // 36: google.protobuf.Int64Value + (*model.API)(nil), // 37: v1.API + (*wrapperspb.BoolValue)(nil), // 38: google.protobuf.BoolValue } var file_circuitbreaker_proto_depIdxs = []int32{ - 29, // 0: v1.CircuitBreaker.id:type_name -> google.protobuf.StringValue - 29, // 1: v1.CircuitBreaker.version:type_name -> google.protobuf.StringValue - 29, // 2: v1.CircuitBreaker.name:type_name -> google.protobuf.StringValue - 29, // 3: v1.CircuitBreaker.namespace:type_name -> google.protobuf.StringValue - 29, // 4: v1.CircuitBreaker.service:type_name -> google.protobuf.StringValue - 29, // 5: v1.CircuitBreaker.service_namespace:type_name -> google.protobuf.StringValue + 32, // 0: v1.CircuitBreaker.id:type_name -> google.protobuf.StringValue + 32, // 1: v1.CircuitBreaker.version:type_name -> google.protobuf.StringValue + 32, // 2: v1.CircuitBreaker.name:type_name -> google.protobuf.StringValue + 32, // 3: v1.CircuitBreaker.namespace:type_name -> google.protobuf.StringValue + 32, // 4: v1.CircuitBreaker.service:type_name -> google.protobuf.StringValue + 32, // 5: v1.CircuitBreaker.service_namespace:type_name -> google.protobuf.StringValue 12, // 6: v1.CircuitBreaker.inbounds:type_name -> v1.CbRule 12, // 7: v1.CircuitBreaker.outbounds:type_name -> v1.CbRule - 29, // 8: v1.CircuitBreaker.token:type_name -> google.protobuf.StringValue - 29, // 9: v1.CircuitBreaker.owners:type_name -> google.protobuf.StringValue - 29, // 10: v1.CircuitBreaker.business:type_name -> google.protobuf.StringValue - 29, // 11: v1.CircuitBreaker.department:type_name -> google.protobuf.StringValue - 29, // 12: v1.CircuitBreaker.comment:type_name -> google.protobuf.StringValue - 29, // 13: v1.CircuitBreaker.ctime:type_name -> google.protobuf.StringValue - 29, // 14: v1.CircuitBreaker.mtime:type_name -> google.protobuf.StringValue - 29, // 15: v1.CircuitBreaker.revision:type_name -> google.protobuf.StringValue + 32, // 8: v1.CircuitBreaker.token:type_name -> google.protobuf.StringValue + 32, // 9: v1.CircuitBreaker.owners:type_name -> google.protobuf.StringValue + 32, // 10: v1.CircuitBreaker.business:type_name -> google.protobuf.StringValue + 32, // 11: v1.CircuitBreaker.department:type_name -> google.protobuf.StringValue + 32, // 12: v1.CircuitBreaker.comment:type_name -> google.protobuf.StringValue + 32, // 13: v1.CircuitBreaker.ctime:type_name -> google.protobuf.StringValue + 32, // 14: v1.CircuitBreaker.mtime:type_name -> google.protobuf.StringValue + 32, // 15: v1.CircuitBreaker.revision:type_name -> google.protobuf.StringValue 14, // 16: v1.CircuitBreaker.rules:type_name -> v1.CircuitBreakerRule - 29, // 17: v1.SourceMatcher.service:type_name -> google.protobuf.StringValue - 29, // 18: v1.SourceMatcher.namespace:type_name -> google.protobuf.StringValue - 20, // 19: v1.SourceMatcher.labels:type_name -> v1.SourceMatcher.LabelsEntry - 30, // 20: v1.RecoverConfig.sleepWindow:type_name -> google.protobuf.Duration - 31, // 21: v1.RecoverConfig.maxRetryAfterHalfOpen:type_name -> google.protobuf.UInt32Value - 31, // 22: v1.RecoverConfig.requestRateAfterHalfOpen:type_name -> google.protobuf.UInt32Value - 31, // 23: v1.RecoverConfig.successRateToClose:type_name -> google.protobuf.UInt32Value - 31, // 24: v1.RecoverConfig.requestCountAfterHalfOpen:type_name -> google.protobuf.UInt32Value + 32, // 17: v1.SourceMatcher.service:type_name -> google.protobuf.StringValue + 32, // 18: v1.SourceMatcher.namespace:type_name -> google.protobuf.StringValue + 22, // 19: v1.SourceMatcher.labels:type_name -> v1.SourceMatcher.LabelsEntry + 33, // 20: v1.RecoverConfig.sleepWindow:type_name -> google.protobuf.Duration + 34, // 21: v1.RecoverConfig.maxRetryAfterHalfOpen:type_name -> google.protobuf.UInt32Value + 34, // 22: v1.RecoverConfig.requestRateAfterHalfOpen:type_name -> google.protobuf.UInt32Value + 34, // 23: v1.RecoverConfig.successRateToClose:type_name -> google.protobuf.UInt32Value + 34, // 24: v1.RecoverConfig.requestCountAfterHalfOpen:type_name -> google.protobuf.UInt32Value 1, // 25: v1.RecoverConfig.outlierDetectWhen:type_name -> v1.RecoverConfig.OutlierDetectWhen - 21, // 26: v1.CbPolicy.errorRate:type_name -> v1.CbPolicy.ErrRateConfig - 22, // 27: v1.CbPolicy.slowRate:type_name -> v1.CbPolicy.SlowRateConfig - 30, // 28: v1.CbPolicy.judgeDuration:type_name -> google.protobuf.Duration - 31, // 29: v1.CbPolicy.maxEjectionPercent:type_name -> google.protobuf.UInt32Value - 23, // 30: v1.CbPolicy.consecutive:type_name -> v1.CbPolicy.ConsecutiveErrConfig - 29, // 31: v1.DestinationSet.service:type_name -> google.protobuf.StringValue - 29, // 32: v1.DestinationSet.namespace:type_name -> google.protobuf.StringValue - 25, // 33: v1.DestinationSet.metadata:type_name -> v1.DestinationSet.MetadataEntry + 23, // 26: v1.CbPolicy.errorRate:type_name -> v1.CbPolicy.ErrRateConfig + 24, // 27: v1.CbPolicy.slowRate:type_name -> v1.CbPolicy.SlowRateConfig + 33, // 28: v1.CbPolicy.judgeDuration:type_name -> google.protobuf.Duration + 34, // 29: v1.CbPolicy.maxEjectionPercent:type_name -> google.protobuf.UInt32Value + 25, // 30: v1.CbPolicy.consecutive:type_name -> v1.CbPolicy.ConsecutiveErrConfig + 32, // 31: v1.DestinationSet.service:type_name -> google.protobuf.StringValue + 32, // 32: v1.DestinationSet.namespace:type_name -> google.protobuf.StringValue + 27, // 33: v1.DestinationSet.metadata:type_name -> v1.DestinationSet.MetadataEntry 2, // 34: v1.DestinationSet.resource:type_name -> v1.DestinationSet.Resource 3, // 35: v1.DestinationSet.type:type_name -> v1.DestinationSet.Type 4, // 36: v1.DestinationSet.scope:type_name -> v1.DestinationSet.Scope - 30, // 37: v1.DestinationSet.metricWindow:type_name -> google.protobuf.Duration - 31, // 38: v1.DestinationSet.metricPrecision:type_name -> google.protobuf.UInt32Value - 30, // 39: v1.DestinationSet.updateInterval:type_name -> google.protobuf.Duration + 33, // 37: v1.DestinationSet.metricWindow:type_name -> google.protobuf.Duration + 34, // 38: v1.DestinationSet.metricPrecision:type_name -> google.protobuf.UInt32Value + 33, // 39: v1.DestinationSet.updateInterval:type_name -> google.protobuf.Duration 9, // 40: v1.DestinationSet.recover:type_name -> v1.RecoverConfig 10, // 41: v1.DestinationSet.policy:type_name -> v1.CbPolicy - 32, // 42: v1.DestinationSet.method:type_name -> v1.MatchString - 33, // 43: v1.DestinationSet.errorCodes:type_name -> google.protobuf.Int64Value + 35, // 42: v1.DestinationSet.method:type_name -> v1.MatchString + 36, // 43: v1.DestinationSet.errorCodes:type_name -> google.protobuf.Int64Value 8, // 44: v1.CbRule.sources:type_name -> v1.SourceMatcher 11, // 45: v1.CbRule.destinations:type_name -> v1.DestinationSet - 26, // 46: v1.RuleMatcher.source:type_name -> v1.RuleMatcher.SourceService - 27, // 47: v1.RuleMatcher.destination:type_name -> v1.RuleMatcher.DestinationService + 28, // 46: v1.RuleMatcher.source:type_name -> v1.RuleMatcher.SourceService + 29, // 47: v1.RuleMatcher.destination:type_name -> v1.RuleMatcher.DestinationService 0, // 48: v1.CircuitBreakerRule.level:type_name -> v1.Level 13, // 49: v1.CircuitBreakerRule.rule_matcher:type_name -> v1.RuleMatcher 15, // 50: v1.CircuitBreakerRule.error_conditions:type_name -> v1.ErrorCondition 16, // 51: v1.CircuitBreakerRule.trigger_condition:type_name -> v1.TriggerCondition 17, // 52: v1.CircuitBreakerRule.recoverCondition:type_name -> v1.RecoverCondition 18, // 53: v1.CircuitBreakerRule.faultDetectConfig:type_name -> v1.FaultDetectConfig - 34, // 54: v1.CircuitBreakerRule.fallbackConfig:type_name -> v1.FallbackConfig + 20, // 54: v1.CircuitBreakerRule.fallbackConfig:type_name -> v1.FallbackConfig 19, // 55: v1.CircuitBreakerRule.block_configs:type_name -> v1.BlockConfig - 28, // 56: v1.CircuitBreakerRule.metadata:type_name -> v1.CircuitBreakerRule.MetadataEntry + 30, // 56: v1.CircuitBreakerRule.metadata:type_name -> v1.CircuitBreakerRule.MetadataEntry 5, // 57: v1.ErrorCondition.input_type:type_name -> v1.ErrorCondition.InputType - 32, // 58: v1.ErrorCondition.condition:type_name -> v1.MatchString + 35, // 58: v1.ErrorCondition.condition:type_name -> v1.MatchString 6, // 59: v1.TriggerCondition.trigger_type:type_name -> v1.TriggerCondition.TriggerType - 35, // 60: v1.BlockConfig.api:type_name -> v1.API + 37, // 60: v1.BlockConfig.api:type_name -> v1.API 15, // 61: v1.BlockConfig.error_conditions:type_name -> v1.ErrorCondition 16, // 62: v1.BlockConfig.trigger_conditions:type_name -> v1.TriggerCondition - 32, // 63: v1.SourceMatcher.LabelsEntry.value:type_name -> v1.MatchString - 36, // 64: v1.CbPolicy.ErrRateConfig.enable:type_name -> google.protobuf.BoolValue - 31, // 65: v1.CbPolicy.ErrRateConfig.requestVolumeThreshold:type_name -> google.protobuf.UInt32Value - 31, // 66: v1.CbPolicy.ErrRateConfig.errorRateToPreserved:type_name -> google.protobuf.UInt32Value - 31, // 67: v1.CbPolicy.ErrRateConfig.errorRateToOpen:type_name -> google.protobuf.UInt32Value - 24, // 68: v1.CbPolicy.ErrRateConfig.specials:type_name -> v1.CbPolicy.ErrRateConfig.SpecialConfig - 36, // 69: v1.CbPolicy.SlowRateConfig.enable:type_name -> google.protobuf.BoolValue - 30, // 70: v1.CbPolicy.SlowRateConfig.maxRt:type_name -> google.protobuf.Duration - 31, // 71: v1.CbPolicy.SlowRateConfig.slowRateToPreserved:type_name -> google.protobuf.UInt32Value - 31, // 72: v1.CbPolicy.SlowRateConfig.slowRateToOpen:type_name -> google.protobuf.UInt32Value - 36, // 73: v1.CbPolicy.ConsecutiveErrConfig.enable:type_name -> google.protobuf.BoolValue - 31, // 74: v1.CbPolicy.ConsecutiveErrConfig.consecutiveErrorToPreserved:type_name -> google.protobuf.UInt32Value - 31, // 75: v1.CbPolicy.ConsecutiveErrConfig.consecutiveErrorToOpen:type_name -> google.protobuf.UInt32Value - 29, // 76: v1.CbPolicy.ErrRateConfig.SpecialConfig.type:type_name -> google.protobuf.StringValue - 33, // 77: v1.CbPolicy.ErrRateConfig.SpecialConfig.errorCodes:type_name -> google.protobuf.Int64Value - 31, // 78: v1.CbPolicy.ErrRateConfig.SpecialConfig.errorRateToPreserved:type_name -> google.protobuf.UInt32Value - 31, // 79: v1.CbPolicy.ErrRateConfig.SpecialConfig.errorRateToOpen:type_name -> google.protobuf.UInt32Value - 32, // 80: v1.DestinationSet.MetadataEntry.value:type_name -> v1.MatchString - 32, // 81: v1.RuleMatcher.DestinationService.method:type_name -> v1.MatchString - 82, // [82:82] is the sub-list for method output_type - 82, // [82:82] is the sub-list for method input_type - 82, // [82:82] is the sub-list for extension type_name - 82, // [82:82] is the sub-list for extension extendee - 0, // [0:82] is the sub-list for field type_name + 21, // 63: v1.FallbackConfig.response:type_name -> v1.FallbackResponse + 31, // 64: v1.FallbackResponse.headers:type_name -> v1.FallbackResponse.MessageHeader + 35, // 65: v1.SourceMatcher.LabelsEntry.value:type_name -> v1.MatchString + 38, // 66: v1.CbPolicy.ErrRateConfig.enable:type_name -> google.protobuf.BoolValue + 34, // 67: v1.CbPolicy.ErrRateConfig.requestVolumeThreshold:type_name -> google.protobuf.UInt32Value + 34, // 68: v1.CbPolicy.ErrRateConfig.errorRateToPreserved:type_name -> google.protobuf.UInt32Value + 34, // 69: v1.CbPolicy.ErrRateConfig.errorRateToOpen:type_name -> google.protobuf.UInt32Value + 26, // 70: v1.CbPolicy.ErrRateConfig.specials:type_name -> v1.CbPolicy.ErrRateConfig.SpecialConfig + 38, // 71: v1.CbPolicy.SlowRateConfig.enable:type_name -> google.protobuf.BoolValue + 33, // 72: v1.CbPolicy.SlowRateConfig.maxRt:type_name -> google.protobuf.Duration + 34, // 73: v1.CbPolicy.SlowRateConfig.slowRateToPreserved:type_name -> google.protobuf.UInt32Value + 34, // 74: v1.CbPolicy.SlowRateConfig.slowRateToOpen:type_name -> google.protobuf.UInt32Value + 38, // 75: v1.CbPolicy.ConsecutiveErrConfig.enable:type_name -> google.protobuf.BoolValue + 34, // 76: v1.CbPolicy.ConsecutiveErrConfig.consecutiveErrorToPreserved:type_name -> google.protobuf.UInt32Value + 34, // 77: v1.CbPolicy.ConsecutiveErrConfig.consecutiveErrorToOpen:type_name -> google.protobuf.UInt32Value + 32, // 78: v1.CbPolicy.ErrRateConfig.SpecialConfig.type:type_name -> google.protobuf.StringValue + 36, // 79: v1.CbPolicy.ErrRateConfig.SpecialConfig.errorCodes:type_name -> google.protobuf.Int64Value + 34, // 80: v1.CbPolicy.ErrRateConfig.SpecialConfig.errorRateToPreserved:type_name -> google.protobuf.UInt32Value + 34, // 81: v1.CbPolicy.ErrRateConfig.SpecialConfig.errorRateToOpen:type_name -> google.protobuf.UInt32Value + 35, // 82: v1.DestinationSet.MetadataEntry.value:type_name -> v1.MatchString + 35, // 83: v1.RuleMatcher.DestinationService.method:type_name -> v1.MatchString + 84, // [84:84] is the sub-list for method output_type + 84, // [84:84] is the sub-list for method input_type + 84, // [84:84] is the sub-list for extension type_name + 84, // [84:84] is the sub-list for extension extendee + 0, // [0:84] is the sub-list for field type_name } func init() { file_circuitbreaker_proto_init() } @@ -2786,7 +2982,31 @@ func file_circuitbreaker_proto_init() { return nil } } + file_circuitbreaker_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FallbackConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } file_circuitbreaker_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FallbackResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_circuitbreaker_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CbPolicy_ErrRateConfig); i { case 0: return &v.state @@ -2798,7 +3018,7 @@ func file_circuitbreaker_proto_init() { return nil } } - file_circuitbreaker_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_circuitbreaker_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CbPolicy_SlowRateConfig); i { case 0: return &v.state @@ -2810,7 +3030,7 @@ func file_circuitbreaker_proto_init() { return nil } } - file_circuitbreaker_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_circuitbreaker_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CbPolicy_ConsecutiveErrConfig); i { case 0: return &v.state @@ -2822,7 +3042,7 @@ func file_circuitbreaker_proto_init() { return nil } } - file_circuitbreaker_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_circuitbreaker_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CbPolicy_ErrRateConfig_SpecialConfig); i { case 0: return &v.state @@ -2834,7 +3054,7 @@ func file_circuitbreaker_proto_init() { return nil } } - file_circuitbreaker_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_circuitbreaker_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RuleMatcher_SourceService); i { case 0: return &v.state @@ -2846,7 +3066,7 @@ func file_circuitbreaker_proto_init() { return nil } } - file_circuitbreaker_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_circuitbreaker_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RuleMatcher_DestinationService); i { case 0: return &v.state @@ -2858,6 +3078,18 @@ func file_circuitbreaker_proto_init() { return nil } } + file_circuitbreaker_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FallbackResponse_MessageHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2865,7 +3097,7 @@ func file_circuitbreaker_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_circuitbreaker_proto_rawDesc, NumEnums: 7, - NumMessages: 22, + NumMessages: 25, NumExtensions: 0, NumServices: 0, }, diff --git a/source/go/api/v1/model/model.pb.go b/source/go/api/v1/model/model.pb.go index 80ba654d..e82b8672 100644 --- a/source/go/api/v1/model/model.pb.go +++ b/source/go/api/v1/model/model.pb.go @@ -496,181 +496,6 @@ func (x *API) GetPath() *MatchString { return nil } -// fallback config -type FallbackConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` - Response *FallbackResponse `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` -} - -func (x *FallbackConfig) Reset() { - *x = FallbackConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_model_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FallbackConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FallbackConfig) ProtoMessage() {} - -func (x *FallbackConfig) ProtoReflect() protoreflect.Message { - mi := &file_model_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FallbackConfig.ProtoReflect.Descriptor instead. -func (*FallbackConfig) Descriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{6} -} - -func (x *FallbackConfig) GetEnable() bool { - if x != nil { - return x.Enable - } - return false -} - -func (x *FallbackConfig) GetResponse() *FallbackResponse { - if x != nil { - return x.Response - } - return nil -} - -// fallback response -type FallbackResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Headers []*FallbackResponse_MessageHeader `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` - Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` -} - -func (x *FallbackResponse) Reset() { - *x = FallbackResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_model_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FallbackResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FallbackResponse) ProtoMessage() {} - -func (x *FallbackResponse) ProtoReflect() protoreflect.Message { - mi := &file_model_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FallbackResponse.ProtoReflect.Descriptor instead. -func (*FallbackResponse) Descriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{7} -} - -func (x *FallbackResponse) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *FallbackResponse) GetHeaders() []*FallbackResponse_MessageHeader { - if x != nil { - return x.Headers - } - return nil -} - -func (x *FallbackResponse) GetBody() string { - if x != nil { - return x.Body - } - return "" -} - -type FallbackResponse_MessageHeader struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *FallbackResponse_MessageHeader) Reset() { - *x = FallbackResponse_MessageHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_model_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FallbackResponse_MessageHeader) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FallbackResponse_MessageHeader) ProtoMessage() {} - -func (x *FallbackResponse_MessageHeader) ProtoReflect() protoreflect.Message { - mi := &file_model_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FallbackResponse_MessageHeader.ProtoReflect.Descriptor instead. -func (*FallbackResponse_MessageHeader) Descriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *FallbackResponse_MessageHeader) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *FallbackResponse_MessageHeader) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - var File_model_proto protoreflect.FileDescriptor var file_model_proto_rawDesc = []byte{ @@ -731,24 +556,7 @@ var file_model_proto_rawDesc = []byte{ 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x5a, - 0x0a, 0x0e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x31, 0x2e, - 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x10, 0x46, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x1a, 0x37, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, + 0x63, 0x68, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x79, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x6f, 0x6c, 0x61, 0x72, 0x69, 0x73, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, @@ -773,37 +581,32 @@ func file_model_proto_rawDescGZIP() []byte { } var file_model_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_model_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_model_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_model_proto_goTypes = []interface{}{ - (MatchString_MatchStringType)(0), // 0: v1.MatchString.MatchStringType - (MatchString_ValueType)(0), // 1: v1.MatchString.ValueType - (*Location)(nil), // 2: v1.Location - (*MatchString)(nil), // 3: v1.MatchString - (*StringList)(nil), // 4: v1.StringList - (*Summary)(nil), // 5: v1.Summary - (*ClientLabel)(nil), // 6: v1.ClientLabel - (*API)(nil), // 7: v1.API - (*FallbackConfig)(nil), // 8: v1.FallbackConfig - (*FallbackResponse)(nil), // 9: v1.FallbackResponse - (*FallbackResponse_MessageHeader)(nil), // 10: v1.FallbackResponse.MessageHeader - (*wrapperspb.StringValue)(nil), // 11: google.protobuf.StringValue + (MatchString_MatchStringType)(0), // 0: v1.MatchString.MatchStringType + (MatchString_ValueType)(0), // 1: v1.MatchString.ValueType + (*Location)(nil), // 2: v1.Location + (*MatchString)(nil), // 3: v1.MatchString + (*StringList)(nil), // 4: v1.StringList + (*Summary)(nil), // 5: v1.Summary + (*ClientLabel)(nil), // 6: v1.ClientLabel + (*API)(nil), // 7: v1.API + (*wrapperspb.StringValue)(nil), // 8: google.protobuf.StringValue } var file_model_proto_depIdxs = []int32{ - 11, // 0: v1.Location.region:type_name -> google.protobuf.StringValue - 11, // 1: v1.Location.zone:type_name -> google.protobuf.StringValue - 11, // 2: v1.Location.campus:type_name -> google.protobuf.StringValue - 0, // 3: v1.MatchString.type:type_name -> v1.MatchString.MatchStringType - 11, // 4: v1.MatchString.value:type_name -> google.protobuf.StringValue - 1, // 5: v1.MatchString.value_type:type_name -> v1.MatchString.ValueType - 3, // 6: v1.ClientLabel.value:type_name -> v1.MatchString - 3, // 7: v1.API.path:type_name -> v1.MatchString - 9, // 8: v1.FallbackConfig.response:type_name -> v1.FallbackResponse - 10, // 9: v1.FallbackResponse.headers:type_name -> v1.FallbackResponse.MessageHeader - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 8, // 0: v1.Location.region:type_name -> google.protobuf.StringValue + 8, // 1: v1.Location.zone:type_name -> google.protobuf.StringValue + 8, // 2: v1.Location.campus:type_name -> google.protobuf.StringValue + 0, // 3: v1.MatchString.type:type_name -> v1.MatchString.MatchStringType + 8, // 4: v1.MatchString.value:type_name -> google.protobuf.StringValue + 1, // 5: v1.MatchString.value_type:type_name -> v1.MatchString.ValueType + 3, // 6: v1.ClientLabel.value:type_name -> v1.MatchString + 3, // 7: v1.API.path:type_name -> v1.MatchString + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_model_proto_init() } @@ -884,42 +687,6 @@ func file_model_proto_init() { return nil } } - file_model_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FallbackConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_model_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FallbackResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_model_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FallbackResponse_MessageHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -927,7 +694,7 @@ func file_model_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_model_proto_rawDesc, NumEnums: 2, - NumMessages: 9, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/source/go/api/v1/traffic_manage/lossless.pb.go b/source/go/api/v1/traffic_manage/lossless.pb.go index 2d210108..e9f0ee0e 100644 --- a/source/go/api/v1/traffic_manage/lossless.pb.go +++ b/source/go/api/v1/traffic_manage/lossless.pb.go @@ -7,7 +7,7 @@ package traffic_manage import ( - model "github.com/polarismesh/specification/source/go/api/v1/model" + _ "github.com/polarismesh/specification/source/go/api/v1/model" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/known/durationpb" @@ -83,20 +83,18 @@ type LosslessRule struct { Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` // namespace for rule belongs to Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` - // match rules by labels - Labels map[string]*model.MatchString `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // revision routing version - Revision string `protobuf:"bytes,5,opt,name=revision,proto3" json:"revision,omitempty"` + Revision string `protobuf:"bytes,4,opt,name=revision,proto3" json:"revision,omitempty"` // ctime create time of the rules - Ctime string `protobuf:"bytes,6,opt,name=ctime,proto3" json:"ctime,omitempty"` + Ctime string `protobuf:"bytes,5,opt,name=ctime,proto3" json:"ctime,omitempty"` // mtime modify time of the rules - Mtime string `protobuf:"bytes,7,opt,name=mtime,proto3" json:"mtime,omitempty"` + Mtime string `protobuf:"bytes,6,opt,name=mtime,proto3" json:"mtime,omitempty"` // configuration for lossless online - LosslessOnline *LosslessOnline `protobuf:"bytes,8,opt,name=losslessOnline,json=lossless_online,proto3" json:"losslessOnline,omitempty"` + LosslessOnline *LosslessOnline `protobuf:"bytes,7,opt,name=losslessOnline,json=lossless_online,proto3" json:"losslessOnline,omitempty"` // configuration for lossless offline - LosslessOffline *LosslessOffline `protobuf:"bytes,9,opt,name=losslessOffline,json=lossless_offline,proto3" json:"losslessOffline,omitempty"` + LosslessOffline *LosslessOffline `protobuf:"bytes,8,opt,name=losslessOffline,json=lossless_offline,proto3" json:"losslessOffline,omitempty"` // rule labels - Metadata map[string]string `protobuf:"bytes,10,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Metadata map[string]string `protobuf:"bytes,9,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *LosslessRule) Reset() { @@ -152,13 +150,6 @@ func (x *LosslessRule) GetNamespace() string { return "" } -func (x *LosslessRule) GetLabels() map[string]*model.MatchString { - if x != nil { - return x.Labels - } - return nil -} - func (x *LosslessRule) GetRevision() string { if x != nil { return x.Revision @@ -558,105 +549,97 @@ var file_lossless_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x96, 0x04, 0x0a, 0x0c, 0x4c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x52, 0x75, + 0x6f, 0x22, 0x94, 0x03, 0x0a, 0x0c, 0x4c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x74, 0x69, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x6c, 0x6f, 0x73, 0x73, - 0x6c, 0x65, 0x73, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x4f, 0x6e, - 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x0f, 0x6c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x6f, - 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x3e, 0x0a, 0x0f, 0x6c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, - 0x73, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x4f, 0x66, 0x66, 0x6c, - 0x69, 0x6e, 0x65, 0x52, 0x10, 0x6c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x6f, 0x66, - 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x73, - 0x73, 0x6c, 0x65, 0x73, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x1a, 0x4a, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, - 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9b, 0x01, 0x0a, 0x0e, 0x4c, - 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x38, 0x0a, - 0x0d, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x06, 0x77, 0x61, 0x72, 0x6d, 0x75, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x72, - 0x6d, 0x75, 0x70, 0x52, 0x06, 0x77, 0x61, 0x72, 0x6d, 0x75, 0x70, 0x12, 0x2b, 0x0a, 0x09, 0x72, - 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x09, 0x72, - 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x22, 0x9d, 0x03, 0x0a, 0x0d, 0x44, 0x65, 0x6c, - 0x61, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x74, 0x69, + 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x6c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x4f, 0x6e, + 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x0f, + 0x6c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, + 0x3e, 0x0a, 0x0f, 0x6c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x4f, 0x66, 0x66, 0x6c, 0x69, + 0x6e, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, + 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x10, 0x6c, + 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x12, + 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x52, + 0x75, 0x6c, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9b, 0x01, 0x0a, 0x0e, 0x4c, 0x6f, 0x73, + 0x73, 0x6c, 0x65, 0x73, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x38, 0x0a, 0x0d, 0x64, + 0x65, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x06, 0x77, 0x61, 0x72, 0x6d, 0x75, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x72, 0x6d, 0x75, + 0x70, 0x52, 0x06, 0x77, 0x61, 0x72, 0x6d, 0x75, 0x70, 0x12, 0x2b, 0x0a, 0x09, 0x72, 0x65, 0x61, + 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x09, 0x72, 0x65, 0x61, + 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x22, 0x9d, 0x03, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x61, 0x79, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x12, 0x3b, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x52, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x27, 0x0a, + 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x12, 0x32, 0x0a, 0x13, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x15, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x2e, 0x0a, 0x11, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2a, 0x0a, 0x0f, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x19, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x3d, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x61, 0x79, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x45, 0x4c, 0x41, + 0x59, 0x5f, 0x42, 0x59, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x44, + 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x42, 0x59, 0x5f, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x43, + 0x48, 0x45, 0x43, 0x4b, 0x10, 0x01, 0x22, 0xe9, 0x01, 0x0a, 0x06, 0x57, 0x61, 0x72, 0x6d, 0x75, + 0x70, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x6f, + 0x6e, 0x64, 0x12, 0x3c, 0x0a, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, + 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x76, 0x65, + 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x42, 0x0a, 0x1b, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1d, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x5f, + 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x22, 0x23, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x29, 0x0a, 0x0f, 0x4c, 0x6f, 0x73, 0x73, 0x6c, + 0x65, 0x73, 0x73, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x53, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, - 0x27, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x6f, 0x6e, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x12, 0x32, 0x0a, 0x13, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x2e, 0x0a, 0x11, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2a, 0x0a, 0x0f, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x19, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, - 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x3d, 0x0a, 0x0d, 0x44, 0x65, 0x6c, - 0x61, 0x79, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x45, - 0x4c, 0x41, 0x59, 0x5f, 0x42, 0x59, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x00, 0x12, 0x19, 0x0a, - 0x15, 0x44, 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x42, 0x59, 0x5f, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, - 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x01, 0x22, 0xe9, 0x01, 0x0a, 0x06, 0x57, 0x61, 0x72, - 0x6d, 0x75, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x65, - 0x63, 0x6f, 0x6e, 0x64, 0x12, 0x3c, 0x0a, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x76, - 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, - 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x1b, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, - 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1d, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, - 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x75, 0x72, 0x76, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x22, 0x23, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, - 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x29, 0x0a, 0x0f, 0x4c, 0x6f, 0x73, - 0x73, 0x6c, 0x65, 0x73, 0x73, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x42, 0x8e, 0x01, 0x0a, 0x37, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, - 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x6f, 0x6c, 0x61, 0x72, 0x69, 0x73, 0x2e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x42, 0x0d, 0x4c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, - 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6f, 0x6c, 0x61, - 0x72, 0x69, 0x73, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x67, 0x6f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x65, 0x42, 0x8e, 0x01, 0x0a, 0x37, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, 0x63, 0x65, + 0x6e, 0x74, 0x2e, 0x70, 0x6f, 0x6c, 0x61, 0x72, 0x69, 0x73, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x42, 0x0d, + 0x4c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x44, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6f, 0x6c, 0x61, 0x72, 0x69, + 0x73, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -672,7 +655,7 @@ func file_lossless_proto_rawDescGZIP() []byte { } var file_lossless_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_lossless_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_lossless_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_lossless_proto_goTypes = []interface{}{ (DelayRegister_DelayStrategy)(0), // 0: v1.DelayRegister.DelayStrategy (*LosslessRule)(nil), // 1: v1.LosslessRule @@ -681,25 +664,21 @@ var file_lossless_proto_goTypes = []interface{}{ (*Warmup)(nil), // 4: v1.Warmup (*Readiness)(nil), // 5: v1.Readiness (*LosslessOffline)(nil), // 6: v1.LosslessOffline - nil, // 7: v1.LosslessRule.LabelsEntry - nil, // 8: v1.LosslessRule.MetadataEntry - (*model.MatchString)(nil), // 9: v1.MatchString + nil, // 7: v1.LosslessRule.MetadataEntry } var file_lossless_proto_depIdxs = []int32{ - 7, // 0: v1.LosslessRule.labels:type_name -> v1.LosslessRule.LabelsEntry - 2, // 1: v1.LosslessRule.losslessOnline:type_name -> v1.LosslessOnline - 6, // 2: v1.LosslessRule.losslessOffline:type_name -> v1.LosslessOffline - 8, // 3: v1.LosslessRule.metadata:type_name -> v1.LosslessRule.MetadataEntry - 3, // 4: v1.LosslessOnline.delayRegister:type_name -> v1.DelayRegister - 4, // 5: v1.LosslessOnline.warmup:type_name -> v1.Warmup - 5, // 6: v1.LosslessOnline.readiness:type_name -> v1.Readiness - 0, // 7: v1.DelayRegister.strategy:type_name -> v1.DelayRegister.DelayStrategy - 9, // 8: v1.LosslessRule.LabelsEntry.value:type_name -> v1.MatchString - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 2, // 0: v1.LosslessRule.losslessOnline:type_name -> v1.LosslessOnline + 6, // 1: v1.LosslessRule.losslessOffline:type_name -> v1.LosslessOffline + 7, // 2: v1.LosslessRule.metadata:type_name -> v1.LosslessRule.MetadataEntry + 3, // 3: v1.LosslessOnline.delayRegister:type_name -> v1.DelayRegister + 4, // 4: v1.LosslessOnline.warmup:type_name -> v1.Warmup + 5, // 5: v1.LosslessOnline.readiness:type_name -> v1.Readiness + 0, // 6: v1.DelayRegister.strategy:type_name -> v1.DelayRegister.DelayStrategy + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_lossless_proto_init() } @@ -787,7 +766,7 @@ func file_lossless_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_lossless_proto_rawDesc, NumEnums: 1, - NumMessages: 8, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/source/go/api/v1/traffic_manage/ratelimit.pb.go b/source/go/api/v1/traffic_manage/ratelimit.pb.go index 8f038cf6..e0036e21 100644 --- a/source/go/api/v1/traffic_manage/ratelimit.pb.go +++ b/source/go/api/v1/traffic_manage/ratelimit.pb.go @@ -400,7 +400,7 @@ type Rule struct { // amount for concurrency rate-limit ConcurrencyAmount *ConcurrencyAmount `protobuf:"bytes,27,opt,name=concurrencyAmount,json=concurrency_amount,proto3" json:"concurrencyAmount,omitempty"` // fallback configuration - FallbackConfig *model.FallbackConfig `protobuf:"bytes,28,opt,name=fallbackConfig,json=fallback_config,proto3" json:"fallbackConfig,omitempty"` + CustomResponse *CustomResponse `protobuf:"bytes,28,opt,name=customResponse,json=custom_response,proto3" json:"customResponse,omitempty"` // 限流规则标签数据 Metadata map[string]string `protobuf:"bytes,29,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } @@ -626,9 +626,9 @@ func (x *Rule) GetConcurrencyAmount() *ConcurrencyAmount { return nil } -func (x *Rule) GetFallbackConfig() *model.FallbackConfig { +func (x *Rule) GetCustomResponse() *CustomResponse { if x != nil { - return x.FallbackConfig + return x.CustomResponse } return nil } @@ -753,6 +753,54 @@ func (x *ConcurrencyAmount) GetMaxAmount() uint32 { return 0 } +// custom response text when limited +type CustomResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *CustomResponse) Reset() { + *x = CustomResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ratelimit_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CustomResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomResponse) ProtoMessage() {} + +func (x *CustomResponse) ProtoReflect() protoreflect.Message { + mi := &file_ratelimit_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomResponse.ProtoReflect.Descriptor instead. +func (*CustomResponse) Descriptor() ([]byte, []int) { + return file_ratelimit_proto_rawDescGZIP(), []int{4} +} + +func (x *CustomResponse) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + // 分布式限流服务集群 type RateLimitCluster struct { state protoimpl.MessageState @@ -767,7 +815,7 @@ type RateLimitCluster struct { func (x *RateLimitCluster) Reset() { *x = RateLimitCluster{} if protoimpl.UnsafeEnabled { - mi := &file_ratelimit_proto_msgTypes[4] + mi := &file_ratelimit_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -780,7 +828,7 @@ func (x *RateLimitCluster) String() string { func (*RateLimitCluster) ProtoMessage() {} func (x *RateLimitCluster) ProtoReflect() protoreflect.Message { - mi := &file_ratelimit_proto_msgTypes[4] + mi := &file_ratelimit_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -793,7 +841,7 @@ func (x *RateLimitCluster) ProtoReflect() protoreflect.Message { // Deprecated: Use RateLimitCluster.ProtoReflect.Descriptor instead. func (*RateLimitCluster) Descriptor() ([]byte, []int) { - return file_ratelimit_proto_rawDescGZIP(), []int{4} + return file_ratelimit_proto_rawDescGZIP(), []int{5} } func (x *RateLimitCluster) GetService() *wrapperspb.StringValue { @@ -831,7 +879,7 @@ type Amount struct { func (x *Amount) Reset() { *x = Amount{} if protoimpl.UnsafeEnabled { - mi := &file_ratelimit_proto_msgTypes[5] + mi := &file_ratelimit_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -844,7 +892,7 @@ func (x *Amount) String() string { func (*Amount) ProtoMessage() {} func (x *Amount) ProtoReflect() protoreflect.Message { - mi := &file_ratelimit_proto_msgTypes[5] + mi := &file_ratelimit_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -857,7 +905,7 @@ func (x *Amount) ProtoReflect() protoreflect.Message { // Deprecated: Use Amount.ProtoReflect.Descriptor instead. func (*Amount) Descriptor() ([]byte, []int) { - return file_ratelimit_proto_rawDescGZIP(), []int{5} + return file_ratelimit_proto_rawDescGZIP(), []int{6} } func (x *Amount) GetMaxAmount() *wrapperspb.UInt32Value { @@ -910,7 +958,7 @@ type Report struct { func (x *Report) Reset() { *x = Report{} if protoimpl.UnsafeEnabled { - mi := &file_ratelimit_proto_msgTypes[6] + mi := &file_ratelimit_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -923,7 +971,7 @@ func (x *Report) String() string { func (*Report) ProtoMessage() {} func (x *Report) ProtoReflect() protoreflect.Message { - mi := &file_ratelimit_proto_msgTypes[6] + mi := &file_ratelimit_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -936,7 +984,7 @@ func (x *Report) ProtoReflect() protoreflect.Message { // Deprecated: Use Report.ProtoReflect.Descriptor instead. func (*Report) Descriptor() ([]byte, []int) { - return file_ratelimit_proto_rawDescGZIP(), []int{6} + return file_ratelimit_proto_rawDescGZIP(), []int{7} } func (x *Report) GetInterval() *durationpb.Duration { @@ -965,7 +1013,7 @@ type AmountAdjuster struct { func (x *AmountAdjuster) Reset() { *x = AmountAdjuster{} if protoimpl.UnsafeEnabled { - mi := &file_ratelimit_proto_msgTypes[7] + mi := &file_ratelimit_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -978,7 +1026,7 @@ func (x *AmountAdjuster) String() string { func (*AmountAdjuster) ProtoMessage() {} func (x *AmountAdjuster) ProtoReflect() protoreflect.Message { - mi := &file_ratelimit_proto_msgTypes[7] + mi := &file_ratelimit_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -991,7 +1039,7 @@ func (x *AmountAdjuster) ProtoReflect() protoreflect.Message { // Deprecated: Use AmountAdjuster.ProtoReflect.Descriptor instead. func (*AmountAdjuster) Descriptor() ([]byte, []int) { - return file_ratelimit_proto_rawDescGZIP(), []int{7} + return file_ratelimit_proto_rawDescGZIP(), []int{8} } func (x *AmountAdjuster) GetClimb() *ClimbConfig { @@ -1016,7 +1064,7 @@ type ClimbConfig struct { func (x *ClimbConfig) Reset() { *x = ClimbConfig{} if protoimpl.UnsafeEnabled { - mi := &file_ratelimit_proto_msgTypes[8] + mi := &file_ratelimit_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1029,7 +1077,7 @@ func (x *ClimbConfig) String() string { func (*ClimbConfig) ProtoMessage() {} func (x *ClimbConfig) ProtoReflect() protoreflect.Message { - mi := &file_ratelimit_proto_msgTypes[8] + mi := &file_ratelimit_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1042,7 +1090,7 @@ func (x *ClimbConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ClimbConfig.ProtoReflect.Descriptor instead. func (*ClimbConfig) Descriptor() ([]byte, []int) { - return file_ratelimit_proto_rawDescGZIP(), []int{8} + return file_ratelimit_proto_rawDescGZIP(), []int{9} } func (x *ClimbConfig) GetEnable() *wrapperspb.BoolValue { @@ -1090,7 +1138,7 @@ type ClimbConfig_MetricConfig struct { func (x *ClimbConfig_MetricConfig) Reset() { *x = ClimbConfig_MetricConfig{} if protoimpl.UnsafeEnabled { - mi := &file_ratelimit_proto_msgTypes[12] + mi := &file_ratelimit_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1103,7 +1151,7 @@ func (x *ClimbConfig_MetricConfig) String() string { func (*ClimbConfig_MetricConfig) ProtoMessage() {} func (x *ClimbConfig_MetricConfig) ProtoReflect() protoreflect.Message { - mi := &file_ratelimit_proto_msgTypes[12] + mi := &file_ratelimit_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1116,7 +1164,7 @@ func (x *ClimbConfig_MetricConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ClimbConfig_MetricConfig.ProtoReflect.Descriptor instead. func (*ClimbConfig_MetricConfig) Descriptor() ([]byte, []int) { - return file_ratelimit_proto_rawDescGZIP(), []int{8, 0} + return file_ratelimit_proto_rawDescGZIP(), []int{9, 0} } func (x *ClimbConfig_MetricConfig) GetWindow() *durationpb.Duration { @@ -1153,7 +1201,7 @@ type ClimbConfig_TriggerPolicy struct { func (x *ClimbConfig_TriggerPolicy) Reset() { *x = ClimbConfig_TriggerPolicy{} if protoimpl.UnsafeEnabled { - mi := &file_ratelimit_proto_msgTypes[13] + mi := &file_ratelimit_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1166,7 +1214,7 @@ func (x *ClimbConfig_TriggerPolicy) String() string { func (*ClimbConfig_TriggerPolicy) ProtoMessage() {} func (x *ClimbConfig_TriggerPolicy) ProtoReflect() protoreflect.Message { - mi := &file_ratelimit_proto_msgTypes[13] + mi := &file_ratelimit_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1179,7 +1227,7 @@ func (x *ClimbConfig_TriggerPolicy) ProtoReflect() protoreflect.Message { // Deprecated: Use ClimbConfig_TriggerPolicy.ProtoReflect.Descriptor instead. func (*ClimbConfig_TriggerPolicy) Descriptor() ([]byte, []int) { - return file_ratelimit_proto_rawDescGZIP(), []int{8, 1} + return file_ratelimit_proto_rawDescGZIP(), []int{9, 1} } func (x *ClimbConfig_TriggerPolicy) GetErrorRate() *ClimbConfig_TriggerPolicy_ErrorRate { @@ -1215,7 +1263,7 @@ type ClimbConfig_ClimbThrottling struct { func (x *ClimbConfig_ClimbThrottling) Reset() { *x = ClimbConfig_ClimbThrottling{} if protoimpl.UnsafeEnabled { - mi := &file_ratelimit_proto_msgTypes[14] + mi := &file_ratelimit_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1228,7 +1276,7 @@ func (x *ClimbConfig_ClimbThrottling) String() string { func (*ClimbConfig_ClimbThrottling) ProtoMessage() {} func (x *ClimbConfig_ClimbThrottling) ProtoReflect() protoreflect.Message { - mi := &file_ratelimit_proto_msgTypes[14] + mi := &file_ratelimit_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1241,7 +1289,7 @@ func (x *ClimbConfig_ClimbThrottling) ProtoReflect() protoreflect.Message { // Deprecated: Use ClimbConfig_ClimbThrottling.ProtoReflect.Descriptor instead. func (*ClimbConfig_ClimbThrottling) Descriptor() ([]byte, []int) { - return file_ratelimit_proto_rawDescGZIP(), []int{8, 2} + return file_ratelimit_proto_rawDescGZIP(), []int{9, 2} } func (x *ClimbConfig_ClimbThrottling) GetColdBelowTuneDownRate() *wrapperspb.Int32Value { @@ -1315,7 +1363,7 @@ type ClimbConfig_TriggerPolicy_ErrorRate struct { func (x *ClimbConfig_TriggerPolicy_ErrorRate) Reset() { *x = ClimbConfig_TriggerPolicy_ErrorRate{} if protoimpl.UnsafeEnabled { - mi := &file_ratelimit_proto_msgTypes[15] + mi := &file_ratelimit_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1328,7 +1376,7 @@ func (x *ClimbConfig_TriggerPolicy_ErrorRate) String() string { func (*ClimbConfig_TriggerPolicy_ErrorRate) ProtoMessage() {} func (x *ClimbConfig_TriggerPolicy_ErrorRate) ProtoReflect() protoreflect.Message { - mi := &file_ratelimit_proto_msgTypes[15] + mi := &file_ratelimit_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1341,7 +1389,7 @@ func (x *ClimbConfig_TriggerPolicy_ErrorRate) ProtoReflect() protoreflect.Messag // Deprecated: Use ClimbConfig_TriggerPolicy_ErrorRate.ProtoReflect.Descriptor instead. func (*ClimbConfig_TriggerPolicy_ErrorRate) Descriptor() ([]byte, []int) { - return file_ratelimit_proto_rawDescGZIP(), []int{8, 1, 0} + return file_ratelimit_proto_rawDescGZIP(), []int{9, 1, 0} } func (x *ClimbConfig_TriggerPolicy_ErrorRate) GetEnable() *wrapperspb.BoolValue { @@ -1386,7 +1434,7 @@ type ClimbConfig_TriggerPolicy_SlowRate struct { func (x *ClimbConfig_TriggerPolicy_SlowRate) Reset() { *x = ClimbConfig_TriggerPolicy_SlowRate{} if protoimpl.UnsafeEnabled { - mi := &file_ratelimit_proto_msgTypes[16] + mi := &file_ratelimit_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1399,7 +1447,7 @@ func (x *ClimbConfig_TriggerPolicy_SlowRate) String() string { func (*ClimbConfig_TriggerPolicy_SlowRate) ProtoMessage() {} func (x *ClimbConfig_TriggerPolicy_SlowRate) ProtoReflect() protoreflect.Message { - mi := &file_ratelimit_proto_msgTypes[16] + mi := &file_ratelimit_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1412,7 +1460,7 @@ func (x *ClimbConfig_TriggerPolicy_SlowRate) ProtoReflect() protoreflect.Message // Deprecated: Use ClimbConfig_TriggerPolicy_SlowRate.ProtoReflect.Descriptor instead. func (*ClimbConfig_TriggerPolicy_SlowRate) Descriptor() ([]byte, []int) { - return file_ratelimit_proto_rawDescGZIP(), []int{8, 1, 1} + return file_ratelimit_proto_rawDescGZIP(), []int{9, 1, 1} } func (x *ClimbConfig_TriggerPolicy_SlowRate) GetEnable() *wrapperspb.BoolValue { @@ -1450,7 +1498,7 @@ type ClimbConfig_TriggerPolicy_ErrorRate_SpecialConfig struct { func (x *ClimbConfig_TriggerPolicy_ErrorRate_SpecialConfig) Reset() { *x = ClimbConfig_TriggerPolicy_ErrorRate_SpecialConfig{} if protoimpl.UnsafeEnabled { - mi := &file_ratelimit_proto_msgTypes[17] + mi := &file_ratelimit_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1463,7 +1511,7 @@ func (x *ClimbConfig_TriggerPolicy_ErrorRate_SpecialConfig) String() string { func (*ClimbConfig_TriggerPolicy_ErrorRate_SpecialConfig) ProtoMessage() {} func (x *ClimbConfig_TriggerPolicy_ErrorRate_SpecialConfig) ProtoReflect() protoreflect.Message { - mi := &file_ratelimit_proto_msgTypes[17] + mi := &file_ratelimit_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1476,7 +1524,7 @@ func (x *ClimbConfig_TriggerPolicy_ErrorRate_SpecialConfig) ProtoReflect() proto // Deprecated: Use ClimbConfig_TriggerPolicy_ErrorRate_SpecialConfig.ProtoReflect.Descriptor instead. func (*ClimbConfig_TriggerPolicy_ErrorRate_SpecialConfig) Descriptor() ([]byte, []int) { - return file_ratelimit_proto_rawDescGZIP(), []int{8, 1, 0, 0} + return file_ratelimit_proto_rawDescGZIP(), []int{9, 1, 0, 0} } func (x *ClimbConfig_TriggerPolicy_ErrorRate_SpecialConfig) GetType() *wrapperspb.StringValue { @@ -1604,10 +1652,10 @@ var file_ratelimit_proto_rawDesc = []byte{ 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x3b, 0x0a, 0x0e, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x66, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, + 0x74, 0x12, 0x3b, 0x0a, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0f, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, @@ -1653,174 +1701,176 @@ var file_ratelimit_proto_rawDesc = []byte{ 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x86, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x22, 0x24, 0x0a, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x86, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x07, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xbd, 0x02, 0x0a, 0x06, 0x41, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x41, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, + 0xbd, 0x02, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x09, 0x6d, 0x61, + 0x78, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x6d, 0x61, 0x78, + 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, + 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x83, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x12, 0x42, 0x0a, 0x0d, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0x37, 0x0a, 0x0e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x41, + 0x64, 0x6a, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x05, 0x63, 0x6c, 0x69, 0x6d, 0x62, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x6d, + 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x63, 0x6c, 0x69, 0x6d, 0x62, 0x22, 0xd0, + 0x0e, 0x0a, 0x0b, 0x43, 0x6c, 0x69, 0x6d, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, + 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x6d, 0x62, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x35, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, + 0x69, 0x6d, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x3f, 0x0a, 0x0a, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x6d, 0x62, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6c, 0x69, 0x6d, 0x62, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, + 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x69, 0x6e, 0x67, + 0x1a, 0xc0, 0x01, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x31, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x77, 0x69, + 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x3a, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x3f, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x3a, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, - 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, - 0x09, 0x6d, 0x69, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, - 0x6d, 0x69, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x06, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x42, 0x0a, 0x0d, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x41, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x1a, 0xa7, 0x06, 0x0a, 0x0d, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x45, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, + 0x69, 0x6d, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x61, 0x74, + 0x65, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x61, 0x74, 0x65, 0x12, 0x42, 0x0a, 0x08, + 0x73, 0x6c, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x6d, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x6c, + 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x52, 0x08, 0x73, 0x6c, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, + 0x1a, 0xdf, 0x03, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x61, 0x74, 0x65, 0x12, 0x32, + 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x54, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0d, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, - 0x37, 0x0a, 0x0e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x12, 0x25, 0x0a, 0x05, 0x63, 0x6c, 0x69, 0x6d, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x6d, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x05, 0x63, 0x6c, 0x69, 0x6d, 0x62, 0x22, 0xd0, 0x0e, 0x0a, 0x0b, 0x43, 0x6c, 0x69, - 0x6d, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x34, 0x0a, 0x06, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x6d, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x12, 0x35, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x6d, 0x62, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3f, 0x0a, 0x0a, 0x74, 0x68, 0x72, - 0x6f, 0x74, 0x74, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x6d, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, - 0x6c, 0x69, 0x6d, 0x62, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x0a, - 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x69, 0x6e, 0x67, 0x1a, 0xc0, 0x01, 0x0a, 0x0c, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x31, 0x0a, 0x06, 0x77, - 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x3a, - 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0e, 0x72, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x54, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x39, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, + 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x61, 0x74, 0x65, 0x12, 0x51, 0x0a, 0x08, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x6d, 0x62, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x61, 0x74, 0x65, 0x2e, 0x53, + 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0xb9, 0x01, 0x0a, 0x0d, 0x53, 0x70, 0x65, 0x63, 0x69, + 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x52, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, + 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x61, + 0x74, 0x65, 0x1a, 0xa8, 0x01, 0x0a, 0x08, 0x53, 0x6c, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x12, + 0x32, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x6d, 0x61, 0x78, 0x52, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x72, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x1a, 0xa7, 0x06, - 0x0a, 0x0d, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0x45, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x6d, 0x62, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x61, 0x74, 0x65, 0x52, 0x09, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x52, 0x61, 0x74, 0x65, 0x12, 0x42, 0x0a, 0x08, 0x73, 0x6c, 0x6f, 0x77, 0x52, 0x61, - 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, - 0x69, 0x6d, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x6c, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, - 0x52, 0x08, 0x73, 0x6c, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x1a, 0xdf, 0x03, 0x0a, 0x09, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x52, 0x61, 0x74, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x54, 0x0a, 0x16, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x12, 0x39, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x61, 0x74, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x61, 0x74, 0x65, 0x12, 0x51, 0x0a, - 0x08, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x35, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x6d, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x52, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x73, - 0x1a, 0xb9, 0x01, 0x0a, 0x0d, 0x53, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, - 0x73, 0x12, 0x39, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x61, 0x74, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x61, 0x74, 0x65, 0x1a, 0xa8, 0x01, 0x0a, - 0x08, 0x53, 0x6c, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2f, 0x0a, - 0x05, 0x6d, 0x61, 0x78, 0x52, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x6d, 0x61, 0x78, 0x52, 0x74, 0x12, 0x37, - 0x0a, 0x08, 0x73, 0x6c, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x6d, + 0x61, 0x78, 0x52, 0x74, 0x12, 0x37, 0x0a, 0x08, 0x73, 0x6c, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x08, 0x73, 0x6c, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x1a, 0xf1, 0x04, + 0x0a, 0x0f, 0x43, 0x6c, 0x69, 0x6d, 0x62, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x69, 0x6e, + 0x67, 0x12, 0x51, 0x0a, 0x15, 0x63, 0x6f, 0x6c, 0x64, 0x42, 0x65, 0x6c, 0x6f, 0x77, 0x54, 0x75, + 0x6e, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x73, - 0x6c, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x1a, 0xf1, 0x04, 0x0a, 0x0f, 0x43, 0x6c, 0x69, 0x6d, - 0x62, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x51, 0x0a, 0x15, 0x63, + 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, 0x63, 0x6f, 0x6c, 0x64, 0x42, 0x65, 0x6c, 0x6f, 0x77, 0x54, 0x75, 0x6e, 0x65, 0x44, 0x6f, 0x77, 0x6e, - 0x52, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, 0x63, 0x6f, 0x6c, 0x64, 0x42, 0x65, 0x6c, - 0x6f, 0x77, 0x54, 0x75, 0x6e, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x12, 0x4d, - 0x0a, 0x13, 0x63, 0x6f, 0x6c, 0x64, 0x42, 0x65, 0x6c, 0x6f, 0x77, 0x54, 0x75, 0x6e, 0x65, 0x55, - 0x70, 0x52, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x63, 0x6f, 0x6c, 0x64, 0x42, 0x65, - 0x6c, 0x6f, 0x77, 0x54, 0x75, 0x6e, 0x65, 0x55, 0x70, 0x52, 0x61, 0x74, 0x65, 0x12, 0x51, 0x0a, + 0x52, 0x61, 0x74, 0x65, 0x12, 0x4d, 0x0a, 0x13, 0x63, 0x6f, 0x6c, 0x64, 0x42, 0x65, 0x6c, 0x6f, + 0x77, 0x54, 0x75, 0x6e, 0x65, 0x55, 0x70, 0x52, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, + 0x63, 0x6f, 0x6c, 0x64, 0x42, 0x65, 0x6c, 0x6f, 0x77, 0x54, 0x75, 0x6e, 0x65, 0x55, 0x70, 0x52, + 0x61, 0x74, 0x65, 0x12, 0x51, 0x0a, 0x15, 0x63, 0x6f, 0x6c, 0x64, 0x41, 0x62, 0x6f, 0x76, 0x65, + 0x54, 0x75, 0x6e, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, 0x63, 0x6f, 0x6c, 0x64, 0x41, 0x62, 0x6f, 0x76, 0x65, 0x54, 0x75, 0x6e, 0x65, 0x44, 0x6f, - 0x77, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, 0x63, 0x6f, 0x6c, 0x64, 0x41, - 0x62, 0x6f, 0x76, 0x65, 0x54, 0x75, 0x6e, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x61, 0x74, 0x65, - 0x12, 0x4d, 0x0a, 0x13, 0x63, 0x6f, 0x6c, 0x64, 0x41, 0x62, 0x6f, 0x76, 0x65, 0x54, 0x75, 0x6e, - 0x65, 0x55, 0x70, 0x52, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x63, 0x6f, 0x6c, 0x64, - 0x41, 0x62, 0x6f, 0x76, 0x65, 0x54, 0x75, 0x6e, 0x65, 0x55, 0x70, 0x52, 0x61, 0x74, 0x65, 0x12, - 0x53, 0x0a, 0x16, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x65, 0x55, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x16, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x54, 0x6f, 0x54, 0x75, - 0x6e, 0x65, 0x55, 0x70, 0x12, 0x3f, 0x0a, 0x0d, 0x6a, 0x75, 0x64, 0x67, 0x65, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6a, 0x75, 0x64, 0x67, 0x65, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x75, 0x6e, 0x65, 0x55, 0x70, 0x50, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x74, 0x75, 0x6e, 0x65, 0x55, 0x70, - 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x43, 0x0a, 0x0e, 0x74, 0x75, 0x6e, 0x65, 0x44, 0x6f, - 0x77, 0x6e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x74, 0x75, 0x6e, - 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x42, 0x8f, 0x01, 0x0a, 0x37, - 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x6f, 0x6c, 0x61, - 0x72, 0x69, 0x73, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6f, 0x6c, 0x61, 0x72, 0x69, 0x73, 0x6d, 0x65, 0x73, 0x68, 0x2f, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74, - 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x77, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x12, 0x4d, 0x0a, 0x13, 0x63, 0x6f, 0x6c, 0x64, 0x41, 0x62, + 0x6f, 0x76, 0x65, 0x54, 0x75, 0x6e, 0x65, 0x55, 0x70, 0x52, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x13, 0x63, 0x6f, 0x6c, 0x64, 0x41, 0x62, 0x6f, 0x76, 0x65, 0x54, 0x75, 0x6e, 0x65, 0x55, + 0x70, 0x52, 0x61, 0x74, 0x65, 0x12, 0x53, 0x0a, 0x16, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x54, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x65, 0x55, 0x70, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x16, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x65, 0x55, 0x70, 0x12, 0x3f, 0x0a, 0x0d, 0x6a, 0x75, + 0x64, 0x67, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6a, 0x75, + 0x64, 0x67, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0c, 0x74, + 0x75, 0x6e, 0x65, 0x55, 0x70, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, + 0x74, 0x75, 0x6e, 0x65, 0x55, 0x70, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x43, 0x0a, 0x0e, + 0x74, 0x75, 0x6e, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x0e, 0x74, 0x75, 0x6e, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x42, 0x8f, 0x01, 0x0a, 0x37, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x6e, + 0x74, 0x2e, 0x70, 0x6f, 0x6c, 0x61, 0x72, 0x69, 0x73, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x74, + 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x42, 0x0e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x44, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6f, 0x6c, 0x61, 0x72, 0x69, + 0x73, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1836,7 +1886,7 @@ func file_ratelimit_proto_rawDescGZIP() []byte { } var file_ratelimit_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_ratelimit_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_ratelimit_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_ratelimit_proto_goTypes = []interface{}{ (Rule_Resource)(0), // 0: v1.Rule.Resource (Rule_Type)(0), // 1: v1.Rule.Type @@ -1847,84 +1897,84 @@ var file_ratelimit_proto_goTypes = []interface{}{ (*Rule)(nil), // 6: v1.Rule (*MatchArgument)(nil), // 7: v1.MatchArgument (*ConcurrencyAmount)(nil), // 8: v1.ConcurrencyAmount - (*RateLimitCluster)(nil), // 9: v1.RateLimitCluster - (*Amount)(nil), // 10: v1.Amount - (*Report)(nil), // 11: v1.Report - (*AmountAdjuster)(nil), // 12: v1.AmountAdjuster - (*ClimbConfig)(nil), // 13: v1.ClimbConfig - nil, // 14: v1.Rule.SubsetEntry - nil, // 15: v1.Rule.LabelsEntry - nil, // 16: v1.Rule.MetadataEntry - (*ClimbConfig_MetricConfig)(nil), // 17: v1.ClimbConfig.MetricConfig - (*ClimbConfig_TriggerPolicy)(nil), // 18: v1.ClimbConfig.TriggerPolicy - (*ClimbConfig_ClimbThrottling)(nil), // 19: v1.ClimbConfig.ClimbThrottling - (*ClimbConfig_TriggerPolicy_ErrorRate)(nil), // 20: v1.ClimbConfig.TriggerPolicy.ErrorRate - (*ClimbConfig_TriggerPolicy_SlowRate)(nil), // 21: v1.ClimbConfig.TriggerPolicy.SlowRate - (*ClimbConfig_TriggerPolicy_ErrorRate_SpecialConfig)(nil), // 22: v1.ClimbConfig.TriggerPolicy.ErrorRate.SpecialConfig - (*wrapperspb.StringValue)(nil), // 23: google.protobuf.StringValue - (*wrapperspb.UInt32Value)(nil), // 24: google.protobuf.UInt32Value - (*wrapperspb.BoolValue)(nil), // 25: google.protobuf.BoolValue - (*model.MatchString)(nil), // 26: v1.MatchString - (*model.FallbackConfig)(nil), // 27: v1.FallbackConfig + (*CustomResponse)(nil), // 9: v1.CustomResponse + (*RateLimitCluster)(nil), // 10: v1.RateLimitCluster + (*Amount)(nil), // 11: v1.Amount + (*Report)(nil), // 12: v1.Report + (*AmountAdjuster)(nil), // 13: v1.AmountAdjuster + (*ClimbConfig)(nil), // 14: v1.ClimbConfig + nil, // 15: v1.Rule.SubsetEntry + nil, // 16: v1.Rule.LabelsEntry + nil, // 17: v1.Rule.MetadataEntry + (*ClimbConfig_MetricConfig)(nil), // 18: v1.ClimbConfig.MetricConfig + (*ClimbConfig_TriggerPolicy)(nil), // 19: v1.ClimbConfig.TriggerPolicy + (*ClimbConfig_ClimbThrottling)(nil), // 20: v1.ClimbConfig.ClimbThrottling + (*ClimbConfig_TriggerPolicy_ErrorRate)(nil), // 21: v1.ClimbConfig.TriggerPolicy.ErrorRate + (*ClimbConfig_TriggerPolicy_SlowRate)(nil), // 22: v1.ClimbConfig.TriggerPolicy.SlowRate + (*ClimbConfig_TriggerPolicy_ErrorRate_SpecialConfig)(nil), // 23: v1.ClimbConfig.TriggerPolicy.ErrorRate.SpecialConfig + (*wrapperspb.StringValue)(nil), // 24: google.protobuf.StringValue + (*wrapperspb.UInt32Value)(nil), // 25: google.protobuf.UInt32Value + (*wrapperspb.BoolValue)(nil), // 26: google.protobuf.BoolValue + (*model.MatchString)(nil), // 27: v1.MatchString (*durationpb.Duration)(nil), // 28: google.protobuf.Duration (*wrapperspb.Int32Value)(nil), // 29: google.protobuf.Int32Value (*wrapperspb.Int64Value)(nil), // 30: google.protobuf.Int64Value } var file_ratelimit_proto_depIdxs = []int32{ 6, // 0: v1.RateLimit.rules:type_name -> v1.Rule - 23, // 1: v1.RateLimit.revision:type_name -> google.protobuf.StringValue - 23, // 2: v1.Rule.id:type_name -> google.protobuf.StringValue - 23, // 3: v1.Rule.service:type_name -> google.protobuf.StringValue - 23, // 4: v1.Rule.namespace:type_name -> google.protobuf.StringValue - 14, // 5: v1.Rule.subset:type_name -> v1.Rule.SubsetEntry - 24, // 6: v1.Rule.priority:type_name -> google.protobuf.UInt32Value + 24, // 1: v1.RateLimit.revision:type_name -> google.protobuf.StringValue + 24, // 2: v1.Rule.id:type_name -> google.protobuf.StringValue + 24, // 3: v1.Rule.service:type_name -> google.protobuf.StringValue + 24, // 4: v1.Rule.namespace:type_name -> google.protobuf.StringValue + 15, // 5: v1.Rule.subset:type_name -> v1.Rule.SubsetEntry + 25, // 6: v1.Rule.priority:type_name -> google.protobuf.UInt32Value 0, // 7: v1.Rule.resource:type_name -> v1.Rule.Resource 1, // 8: v1.Rule.type:type_name -> v1.Rule.Type - 15, // 9: v1.Rule.labels:type_name -> v1.Rule.LabelsEntry - 10, // 10: v1.Rule.amounts:type_name -> v1.Amount - 23, // 11: v1.Rule.action:type_name -> google.protobuf.StringValue - 25, // 12: v1.Rule.disable:type_name -> google.protobuf.BoolValue - 11, // 13: v1.Rule.report:type_name -> v1.Report - 23, // 14: v1.Rule.ctime:type_name -> google.protobuf.StringValue - 23, // 15: v1.Rule.mtime:type_name -> google.protobuf.StringValue - 23, // 16: v1.Rule.revision:type_name -> google.protobuf.StringValue - 23, // 17: v1.Rule.service_token:type_name -> google.protobuf.StringValue - 12, // 18: v1.Rule.adjuster:type_name -> v1.AmountAdjuster - 25, // 19: v1.Rule.regex_combine:type_name -> google.protobuf.BoolValue + 16, // 9: v1.Rule.labels:type_name -> v1.Rule.LabelsEntry + 11, // 10: v1.Rule.amounts:type_name -> v1.Amount + 24, // 11: v1.Rule.action:type_name -> google.protobuf.StringValue + 26, // 12: v1.Rule.disable:type_name -> google.protobuf.BoolValue + 12, // 13: v1.Rule.report:type_name -> v1.Report + 24, // 14: v1.Rule.ctime:type_name -> google.protobuf.StringValue + 24, // 15: v1.Rule.mtime:type_name -> google.protobuf.StringValue + 24, // 16: v1.Rule.revision:type_name -> google.protobuf.StringValue + 24, // 17: v1.Rule.service_token:type_name -> google.protobuf.StringValue + 13, // 18: v1.Rule.adjuster:type_name -> v1.AmountAdjuster + 26, // 19: v1.Rule.regex_combine:type_name -> google.protobuf.BoolValue 2, // 20: v1.Rule.amount_mode:type_name -> v1.Rule.AmountMode 3, // 21: v1.Rule.failover:type_name -> v1.Rule.FailoverType - 9, // 22: v1.Rule.cluster:type_name -> v1.RateLimitCluster - 26, // 23: v1.Rule.method:type_name -> v1.MatchString + 10, // 22: v1.Rule.cluster:type_name -> v1.RateLimitCluster + 27, // 23: v1.Rule.method:type_name -> v1.MatchString 7, // 24: v1.Rule.arguments:type_name -> v1.MatchArgument - 23, // 25: v1.Rule.name:type_name -> google.protobuf.StringValue - 23, // 26: v1.Rule.etime:type_name -> google.protobuf.StringValue - 24, // 27: v1.Rule.max_queue_delay:type_name -> google.protobuf.UInt32Value + 24, // 25: v1.Rule.name:type_name -> google.protobuf.StringValue + 24, // 26: v1.Rule.etime:type_name -> google.protobuf.StringValue + 25, // 27: v1.Rule.max_queue_delay:type_name -> google.protobuf.UInt32Value 8, // 28: v1.Rule.concurrencyAmount:type_name -> v1.ConcurrencyAmount - 27, // 29: v1.Rule.fallbackConfig:type_name -> v1.FallbackConfig - 16, // 30: v1.Rule.metadata:type_name -> v1.Rule.MetadataEntry + 9, // 29: v1.Rule.customResponse:type_name -> v1.CustomResponse + 17, // 30: v1.Rule.metadata:type_name -> v1.Rule.MetadataEntry 4, // 31: v1.MatchArgument.type:type_name -> v1.MatchArgument.Type - 26, // 32: v1.MatchArgument.value:type_name -> v1.MatchString - 23, // 33: v1.RateLimitCluster.service:type_name -> google.protobuf.StringValue - 23, // 34: v1.RateLimitCluster.namespace:type_name -> google.protobuf.StringValue - 24, // 35: v1.Amount.maxAmount:type_name -> google.protobuf.UInt32Value + 27, // 32: v1.MatchArgument.value:type_name -> v1.MatchString + 24, // 33: v1.RateLimitCluster.service:type_name -> google.protobuf.StringValue + 24, // 34: v1.RateLimitCluster.namespace:type_name -> google.protobuf.StringValue + 25, // 35: v1.Amount.maxAmount:type_name -> google.protobuf.UInt32Value 28, // 36: v1.Amount.validDuration:type_name -> google.protobuf.Duration - 24, // 37: v1.Amount.precision:type_name -> google.protobuf.UInt32Value - 24, // 38: v1.Amount.startAmount:type_name -> google.protobuf.UInt32Value - 24, // 39: v1.Amount.minAmount:type_name -> google.protobuf.UInt32Value + 25, // 37: v1.Amount.precision:type_name -> google.protobuf.UInt32Value + 25, // 38: v1.Amount.startAmount:type_name -> google.protobuf.UInt32Value + 25, // 39: v1.Amount.minAmount:type_name -> google.protobuf.UInt32Value 28, // 40: v1.Report.interval:type_name -> google.protobuf.Duration - 24, // 41: v1.Report.amountPercent:type_name -> google.protobuf.UInt32Value - 13, // 42: v1.AmountAdjuster.climb:type_name -> v1.ClimbConfig - 25, // 43: v1.ClimbConfig.enable:type_name -> google.protobuf.BoolValue - 17, // 44: v1.ClimbConfig.metric:type_name -> v1.ClimbConfig.MetricConfig - 18, // 45: v1.ClimbConfig.policy:type_name -> v1.ClimbConfig.TriggerPolicy - 19, // 46: v1.ClimbConfig.throttling:type_name -> v1.ClimbConfig.ClimbThrottling - 26, // 47: v1.Rule.SubsetEntry.value:type_name -> v1.MatchString - 26, // 48: v1.Rule.LabelsEntry.value:type_name -> v1.MatchString + 25, // 41: v1.Report.amountPercent:type_name -> google.protobuf.UInt32Value + 14, // 42: v1.AmountAdjuster.climb:type_name -> v1.ClimbConfig + 26, // 43: v1.ClimbConfig.enable:type_name -> google.protobuf.BoolValue + 18, // 44: v1.ClimbConfig.metric:type_name -> v1.ClimbConfig.MetricConfig + 19, // 45: v1.ClimbConfig.policy:type_name -> v1.ClimbConfig.TriggerPolicy + 20, // 46: v1.ClimbConfig.throttling:type_name -> v1.ClimbConfig.ClimbThrottling + 27, // 47: v1.Rule.SubsetEntry.value:type_name -> v1.MatchString + 27, // 48: v1.Rule.LabelsEntry.value:type_name -> v1.MatchString 28, // 49: v1.ClimbConfig.MetricConfig.window:type_name -> google.protobuf.Duration - 24, // 50: v1.ClimbConfig.MetricConfig.precision:type_name -> google.protobuf.UInt32Value + 25, // 50: v1.ClimbConfig.MetricConfig.precision:type_name -> google.protobuf.UInt32Value 28, // 51: v1.ClimbConfig.MetricConfig.reportInterval:type_name -> google.protobuf.Duration - 20, // 52: v1.ClimbConfig.TriggerPolicy.errorRate:type_name -> v1.ClimbConfig.TriggerPolicy.ErrorRate - 21, // 53: v1.ClimbConfig.TriggerPolicy.slowRate:type_name -> v1.ClimbConfig.TriggerPolicy.SlowRate + 21, // 52: v1.ClimbConfig.TriggerPolicy.errorRate:type_name -> v1.ClimbConfig.TriggerPolicy.ErrorRate + 22, // 53: v1.ClimbConfig.TriggerPolicy.slowRate:type_name -> v1.ClimbConfig.TriggerPolicy.SlowRate 29, // 54: v1.ClimbConfig.ClimbThrottling.coldBelowTuneDownRate:type_name -> google.protobuf.Int32Value 29, // 55: v1.ClimbConfig.ClimbThrottling.coldBelowTuneUpRate:type_name -> google.protobuf.Int32Value 29, // 56: v1.ClimbConfig.ClimbThrottling.coldAboveTuneDownRate:type_name -> google.protobuf.Int32Value @@ -1933,14 +1983,14 @@ var file_ratelimit_proto_depIdxs = []int32{ 28, // 59: v1.ClimbConfig.ClimbThrottling.judgeDuration:type_name -> google.protobuf.Duration 29, // 60: v1.ClimbConfig.ClimbThrottling.tuneUpPeriod:type_name -> google.protobuf.Int32Value 29, // 61: v1.ClimbConfig.ClimbThrottling.tuneDownPeriod:type_name -> google.protobuf.Int32Value - 25, // 62: v1.ClimbConfig.TriggerPolicy.ErrorRate.enable:type_name -> google.protobuf.BoolValue - 24, // 63: v1.ClimbConfig.TriggerPolicy.ErrorRate.requestVolumeThreshold:type_name -> google.protobuf.UInt32Value + 26, // 62: v1.ClimbConfig.TriggerPolicy.ErrorRate.enable:type_name -> google.protobuf.BoolValue + 25, // 63: v1.ClimbConfig.TriggerPolicy.ErrorRate.requestVolumeThreshold:type_name -> google.protobuf.UInt32Value 29, // 64: v1.ClimbConfig.TriggerPolicy.ErrorRate.errorRate:type_name -> google.protobuf.Int32Value - 22, // 65: v1.ClimbConfig.TriggerPolicy.ErrorRate.specials:type_name -> v1.ClimbConfig.TriggerPolicy.ErrorRate.SpecialConfig - 25, // 66: v1.ClimbConfig.TriggerPolicy.SlowRate.enable:type_name -> google.protobuf.BoolValue + 23, // 65: v1.ClimbConfig.TriggerPolicy.ErrorRate.specials:type_name -> v1.ClimbConfig.TriggerPolicy.ErrorRate.SpecialConfig + 26, // 66: v1.ClimbConfig.TriggerPolicy.SlowRate.enable:type_name -> google.protobuf.BoolValue 28, // 67: v1.ClimbConfig.TriggerPolicy.SlowRate.maxRt:type_name -> google.protobuf.Duration 29, // 68: v1.ClimbConfig.TriggerPolicy.SlowRate.slowRate:type_name -> google.protobuf.Int32Value - 23, // 69: v1.ClimbConfig.TriggerPolicy.ErrorRate.SpecialConfig.type:type_name -> google.protobuf.StringValue + 24, // 69: v1.ClimbConfig.TriggerPolicy.ErrorRate.SpecialConfig.type:type_name -> google.protobuf.StringValue 30, // 70: v1.ClimbConfig.TriggerPolicy.ErrorRate.SpecialConfig.errorCodes:type_name -> google.protobuf.Int64Value 29, // 71: v1.ClimbConfig.TriggerPolicy.ErrorRate.SpecialConfig.errorRate:type_name -> google.protobuf.Int32Value 72, // [72:72] is the sub-list for method output_type @@ -2005,7 +2055,7 @@ func file_ratelimit_proto_init() { } } file_ratelimit_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitCluster); i { + switch v := v.(*CustomResponse); i { case 0: return &v.state case 1: @@ -2017,7 +2067,7 @@ func file_ratelimit_proto_init() { } } file_ratelimit_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Amount); i { + switch v := v.(*RateLimitCluster); i { case 0: return &v.state case 1: @@ -2029,7 +2079,7 @@ func file_ratelimit_proto_init() { } } file_ratelimit_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Report); i { + switch v := v.(*Amount); i { case 0: return &v.state case 1: @@ -2041,7 +2091,7 @@ func file_ratelimit_proto_init() { } } file_ratelimit_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AmountAdjuster); i { + switch v := v.(*Report); i { case 0: return &v.state case 1: @@ -2053,6 +2103,18 @@ func file_ratelimit_proto_init() { } } file_ratelimit_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AmountAdjuster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ratelimit_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClimbConfig); i { case 0: return &v.state @@ -2064,7 +2126,7 @@ func file_ratelimit_proto_init() { return nil } } - file_ratelimit_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_ratelimit_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClimbConfig_MetricConfig); i { case 0: return &v.state @@ -2076,7 +2138,7 @@ func file_ratelimit_proto_init() { return nil } } - file_ratelimit_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_ratelimit_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClimbConfig_TriggerPolicy); i { case 0: return &v.state @@ -2088,7 +2150,7 @@ func file_ratelimit_proto_init() { return nil } } - file_ratelimit_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_ratelimit_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClimbConfig_ClimbThrottling); i { case 0: return &v.state @@ -2100,7 +2162,7 @@ func file_ratelimit_proto_init() { return nil } } - file_ratelimit_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_ratelimit_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClimbConfig_TriggerPolicy_ErrorRate); i { case 0: return &v.state @@ -2112,7 +2174,7 @@ func file_ratelimit_proto_init() { return nil } } - file_ratelimit_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_ratelimit_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClimbConfig_TriggerPolicy_SlowRate); i { case 0: return &v.state @@ -2124,7 +2186,7 @@ func file_ratelimit_proto_init() { return nil } } - file_ratelimit_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_ratelimit_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClimbConfig_TriggerPolicy_ErrorRate_SpecialConfig); i { case 0: return &v.state @@ -2143,7 +2205,7 @@ func file_ratelimit_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_ratelimit_proto_rawDesc, NumEnums: 5, - NumMessages: 18, + NumMessages: 19, NumExtensions: 0, NumServices: 0, }, From 233b6b9257a8cdb597f765b7a300dcb2246fce22 Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Mon, 19 Aug 2024 20:59:15 +0800 Subject: [PATCH 10/15] feat: add extendInfo to FaultDetector --- api/v1/fault_tolerance/fault_detector.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/v1/fault_tolerance/fault_detector.proto b/api/v1/fault_tolerance/fault_detector.proto index 8a28ab35..88e6d8dd 100644 --- a/api/v1/fault_tolerance/fault_detector.proto +++ b/api/v1/fault_tolerance/fault_detector.proto @@ -66,6 +66,8 @@ message FaultDetectRule { uint32 priority = 29 [ json_name = "priority" ]; // 探测规则标签数据 map metadata = 30; + // extend info, put some custom info to display in console + map extendInfo = 31; } message HttpProtocolConfig { From 51171c73f6b75aea9368cd7cb85061e65f1d0901 Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Mon, 19 Aug 2024 21:02:15 +0800 Subject: [PATCH 11/15] feat: add json name --- api/v1/fault_tolerance/fault_detector.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v1/fault_tolerance/fault_detector.proto b/api/v1/fault_tolerance/fault_detector.proto index 88e6d8dd..a781f75e 100644 --- a/api/v1/fault_tolerance/fault_detector.proto +++ b/api/v1/fault_tolerance/fault_detector.proto @@ -65,9 +65,9 @@ message FaultDetectRule { // priority rules priority uint32 priority = 29 [ json_name = "priority" ]; // 探测规则标签数据 - map metadata = 30; + map metadata = 30 [ json_name = "metadata" ]; // extend info, put some custom info to display in console - map extendInfo = 31; + map extendInfo = 31 [ json_name = "extend_info" ]; } message HttpProtocolConfig { From 3f3ea13228a00489b20434589ff98207f82373d5 Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Mon, 2 Sep 2024 11:44:06 +0800 Subject: [PATCH 12/15] feat: add blockallowlist rules & remove unused imports --- api/v1/security/block_allow_list.proto | 90 ++++++++++++++++++++++++++ api/v1/service_manage/request.proto | 3 +- api/v1/service_manage/response.proto | 5 ++ api/v1/traffic_manage/lossless.proto | 4 -- 4 files changed, 97 insertions(+), 5 deletions(-) create mode 100644 api/v1/security/block_allow_list.proto diff --git a/api/v1/security/block_allow_list.proto b/api/v1/security/block_allow_list.proto new file mode 100644 index 00000000..f21c50a9 --- /dev/null +++ b/api/v1/security/block_allow_list.proto @@ -0,0 +1,90 @@ +syntax = "proto3"; + +package v1; + +import "google/protobuf/wrappers.proto"; +import "model.proto"; + +option go_package = "github.com/polarismesh/specification/source/go/api/v1/security"; +option java_package = "com.tencent.polaris.specification.api.v1.security"; +option java_outer_classname = "BlockAllowListProto"; + +message BlockAllowListRule { + + // unique rule id + string id = 1 [ json_name = "id" ]; + + // unique rule name + string name = 2 [ json_name = "name" ]; + + // metadata for block allow list rules + map metadata = 3 [ json_name = "metadata" ]; + + // service namespace + string namespace = 4 [ json_name = "namespace" ]; + + // service name + string service = 5 [ json_name = "service" ]; + + // rule description + string description = 6 [ json_name = "description" ]; + + // rule priority + uint32 priority = 7 [ json_name = "priority" ]; + + // rule enable + bool enable = 8 [ json_name = "enable" ]; + + // ctime create time of the rules + string ctime = 9 [ json_name = "ctime" ]; + + // mtime modify time of the rules + string mtime = 10 [ json_name = "mtime" ]; + + // etime enable time of the rules + string etime = 11 [ json_name = "etime" ]; + + // block or allow configuration + repeated BlockAllowConfig blockAllowConfig = 12 [ json_name = "block_allow_config" ]; + +} + +message BlockAllowConfig { + // blocking target api + API api = 1 [ json_name = "api" ]; + + message MatchArgument { + // label type for gateway request + enum Type { + // custom arguments + CUSTOM = 0; + // header, match the http header, dubbo attachment, grpc header + HEADER = 1; + // query, match the http query, dubbo argument + QUERY = 2; + // caller service + CALLER_SERVICE = 3; + // caller host ip + CALLER_IP = 4; + // caller instance metadata + CALLER_METADATA = 5; + // caller instance metadata + CALLEE_METADATA = 6; + } + Type type = 1 [ json_name = "type" ]; + // header key or query key + string key = 2 [ json_name = "key" ]; + // header value or query value + MatchString value = 3 [ json_name = "value" ]; + } + // arguments to match this config + repeated MatchArgument arguments = 2 [ json_name = "arguments" ]; + + enum BlockAllowPolicy { + ALLOW_LIST = 0; + BLOCK_LIST = 1; + } + // block or allow as policy + BlockAllowPolicy blockAllowPolicy = 3 [ json_name = "block_allow_policy" ]; +} + diff --git a/api/v1/service_manage/request.proto b/api/v1/service_manage/request.proto index bc4bb3ef..dc059df0 100644 --- a/api/v1/service_manage/request.proto +++ b/api/v1/service_manage/request.proto @@ -3,7 +3,6 @@ syntax = "proto3"; package v1; import "service.proto"; -import "contract.proto"; option go_package = "github.com/polarismesh/specification/source/go/api/v1/service_manage"; option java_package = "com.tencent.polaris.specification.api.v1.service.manage"; @@ -33,6 +32,8 @@ message DiscoverRequest { NEARBY_ROUTE_RULE = 102; // 无损上下线规则 LOSSLESS = 103; + // 服务黑白名单规则 + BLOCK_ALLOW_RULE = 104; } DiscoverRequestType type = 1; diff --git a/api/v1/service_manage/response.proto b/api/v1/service_manage/response.proto index 66bf7df7..70dc6bea 100644 --- a/api/v1/service_manage/response.proto +++ b/api/v1/service_manage/response.proto @@ -17,6 +17,7 @@ import "auth.proto"; import "contract.proto"; import "lane.proto"; import "lossless.proto"; +import "block_allow_list.proto"; option go_package = "github.com/polarismesh/specification/source/go/api/v1/service_manage"; option java_package = "com.tencent.polaris.specification.api.v1.service.manage"; @@ -104,6 +105,8 @@ message DiscoverResponse { NEARBY_ROUTE_RULE = 102; // 无损上下线规则 LOSSLESS = 103; + // 服务黑白名单规则 + BLOCK_ALLOW_RULE = 104; } DiscoverResponseType type = 3; @@ -124,6 +127,8 @@ message DiscoverResponse { repeated RouteRule nearbyRouteRules = 24; // 无损上下线规则内容 repeated LosslessRule losslessRules = 25; + // 服务黑白名单鉴权规则 + repeated BlockAllowListRule blockAllowListRule = 26; } message OptionSwitch { map options = 1; } diff --git a/api/v1/traffic_manage/lossless.proto b/api/v1/traffic_manage/lossless.proto index 3b96d321..c885e5cc 100644 --- a/api/v1/traffic_manage/lossless.proto +++ b/api/v1/traffic_manage/lossless.proto @@ -2,10 +2,6 @@ syntax = "proto3"; package v1; -import "google/protobuf/wrappers.proto"; -import "google/protobuf/duration.proto"; -import "model.proto"; - option go_package = "github.com/polarismesh/specification/source/go/api/v1/traffic_manage"; option java_package = "com.tencent.polaris.specification.api.v1.traffic.manage"; option java_outer_classname = "LosslessProto"; From 948a8a4b8e359d84b14aba8c0f2c1d16cc1c9123 Mon Sep 17 00:00:00 2001 From: andrewshan Date: Sat, 14 Sep 2024 16:51:28 +0800 Subject: [PATCH 13/15] feat: enhance lane route rule to support more reflexible functions --- api/v1/traffic_manage/lane.proto | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/api/v1/traffic_manage/lane.proto b/api/v1/traffic_manage/lane.proto index d4de1bbc..17d8b924 100644 --- a/api/v1/traffic_manage/lane.proto +++ b/api/v1/traffic_manage/lane.proto @@ -58,6 +58,15 @@ message LaneGroup { repeated LaneRule rules = 11; // 泳道组标签信息 map metadata = 12; + // 基线实例的过滤策略,默认为不带有标签KEY的实例属于该泳道 + enum BaselineFilterStrategy { + // 带有标签KEY的实例属于该泳道 + NOT_MATCH_KEY = 0; + // 匹配上KEY和VALUE的实例才属于该泳道 + NOT_MATCH_KEY_VALUE = 1; + } + BaselineFilterStrategy baseline_filter_strategy = 13 [ json_name = "baseline_filter_strategy" ]; + // 操作标志位 bool editable = 20 [ json_name = "editable" ]; bool deleteable = 21 [ json_name = "deleteable" ]; @@ -108,4 +117,9 @@ message LaneRule { uint32 priority = 12; // description simple description rules string description = 13; + // 属于该泳道的实例标签值,只要匹配上其中一个标签,就代表这个实例属于这个泳道 + // 如果为空,则使用default_label_value + repeated string label_values = 14; + // 属于该泳道的实例标签KEY,默认为lane + string label_key = 15; } \ No newline at end of file From 5e267d7907a4c5d3b8c65fb828a59c90e0ecff91 Mon Sep 17 00:00:00 2001 From: andrewshan Date: Sat, 14 Sep 2024 17:18:16 +0800 Subject: [PATCH 14/15] =?UTF-8?q?fix:=20=E6=9E=9A=E4=B8=BE=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=B8=8D=E8=83=BD=E4=BB=A5VALUE=E7=BB=93=E5=B0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/v1/traffic_manage/lane.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v1/traffic_manage/lane.proto b/api/v1/traffic_manage/lane.proto index 17d8b924..842c30f1 100644 --- a/api/v1/traffic_manage/lane.proto +++ b/api/v1/traffic_manage/lane.proto @@ -63,9 +63,9 @@ message LaneGroup { // 带有标签KEY的实例属于该泳道 NOT_MATCH_KEY = 0; // 匹配上KEY和VALUE的实例才属于该泳道 - NOT_MATCH_KEY_VALUE = 1; + NOT_MATCH_KEY_VALUES = 1; } - BaselineFilterStrategy baseline_filter_strategy = 13 [ json_name = "baseline_filter_strategy" ]; + BaselineFilterStrategy baselineFilterStrategy = 13 [ json_name = "baseline_filter_strategy" ]; // 操作标志位 bool editable = 20 [ json_name = "editable" ]; From dae35053e84a75d4fa2d30ba960041ea63423b55 Mon Sep 17 00:00:00 2001 From: andrewshan Date: Wed, 9 Oct 2024 10:33:07 +0800 Subject: [PATCH 15/15] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E6=8C=87?= =?UTF-8?q?=E5=AE=9Alabel=5Fkey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/v1/traffic_manage/lane.proto | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/api/v1/traffic_manage/lane.proto b/api/v1/traffic_manage/lane.proto index 842c30f1..d39ff90c 100644 --- a/api/v1/traffic_manage/lane.proto +++ b/api/v1/traffic_manage/lane.proto @@ -58,15 +58,6 @@ message LaneGroup { repeated LaneRule rules = 11; // 泳道组标签信息 map metadata = 12; - // 基线实例的过滤策略,默认为不带有标签KEY的实例属于该泳道 - enum BaselineFilterStrategy { - // 带有标签KEY的实例属于该泳道 - NOT_MATCH_KEY = 0; - // 匹配上KEY和VALUE的实例才属于该泳道 - NOT_MATCH_KEY_VALUES = 1; - } - BaselineFilterStrategy baselineFilterStrategy = 13 [ json_name = "baseline_filter_strategy" ]; - // 操作标志位 bool editable = 20 [ json_name = "editable" ]; bool deleteable = 21 [ json_name = "deleteable" ]; @@ -117,9 +108,6 @@ message LaneRule { uint32 priority = 12; // description simple description rules string description = 13; - // 属于该泳道的实例标签值,只要匹配上其中一个标签,就代表这个实例属于这个泳道 - // 如果为空,则使用default_label_value - repeated string label_values = 14; - // 属于该泳道的实例标签KEY,默认为lane - string label_key = 15; + // 属于该泳道的实例标签KEY,不填默认为lane + string label_key = 14; } \ No newline at end of file