Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e0e1e1d
feat: add ratelimit spec & remove temporary proto files
andrewshan Aug 12, 2024
ca5eb29
Merge branch 'polarismesh:main' into main
andrewshan Aug 12, 2024
02ae852
Update version to 1.5.3-SNAPSHOT
andrewshan Aug 12, 2024
b4028c8
fix: change maxAmount to max_amount
andrewshan Aug 12, 2024
c54e971
Merge branch 'polarismesh:main' into main
andrewshan Aug 12, 2024
0cc9d29
feat: add lossless rule specification
andrewshan Aug 13, 2024
e4f17d3
Merge branch 'polarismesh:main' into main
andrewshan Aug 13, 2024
cbe4598
feat: lossless支持lables过滤
andrewshan Aug 13, 2024
f3f32fa
Merge branch 'polarismesh:main' into main
andrewshan Aug 15, 2024
9b47ee6
Merge branch 'polarismesh:main' into main
andrewshan Aug 15, 2024
8c58ad5
feat: restore circuitbreaker fallback & ratelimit add custom response
andrewshan Aug 15, 2024
08f17d3
fix: add json_name
andrewshan Aug 15, 2024
c1d1fa9
fix: customResponse to custom_response
andrewshan Aug 15, 2024
2f4733b
Merge branch 'polarismesh:main' into main
andrewshan Aug 15, 2024
6601b20
feat: add go compile sources
andrewshan Aug 15, 2024
ca44f9a
Merge branch 'polarismesh:main' into main
andrewshan Aug 15, 2024
233b6b9
feat: add extendInfo to FaultDetector
andrewshan Aug 19, 2024
51171c7
feat: add json name
andrewshan Aug 19, 2024
1dec977
Merge branch 'polarismesh:main' into main
andrewshan Aug 19, 2024
63677cb
Merge branch 'polarismesh:main' into main
andrewshan Sep 2, 2024
3f3ea13
feat: add blockallowlist rules & remove unused imports
andrewshan Sep 2, 2024
ff2d2bf
Merge branch 'polarismesh:main' into main
andrewshan Sep 2, 2024
948a8a4
feat: enhance lane route rule to support more reflexible functions
andrewshan Sep 14, 2024
136e007
Merge branch 'polarismesh:main' into main
andrewshan Sep 14, 2024
5e267d7
fix: 枚举类型不能以VALUE结尾
andrewshan Sep 14, 2024
d8a1566
Merge branch 'polarismesh:main' into main
andrewshan Oct 9, 2024
dae3505
feat: 支持指定label_key
andrewshan Oct 9, 2024
2092d93
Merge branch 'main' of https://github.com/andrewshan/specification
andrewshan Oct 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add lossless rule specification
  • Loading branch information
andrewshan committed Aug 13, 2024
commit 0cc9d2900dee1873f3eb76a1ba3d143b1a9b312c
2 changes: 2 additions & 0 deletions api/v1/service_manage/request.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ message DiscoverRequest {
CUSTOM_ROUTE_RULE = 101;
// 就近路由规则
NEARBY_ROUTE_RULE = 102;
// 无损上下线规则
LOSSLESS = 103;
}

DiscoverRequestType type = 1;
Expand Down
5 changes: 5 additions & 0 deletions api/v1/service_manage/response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -101,6 +102,8 @@ message DiscoverResponse {
CUSTOM_ROUTE_RULE = 101;
// 就近路由规则
NEARBY_ROUTE_RULE = 102;
// 无损上下线规则
LOSSLESS = 103;
}

DiscoverResponseType type = 3;
Expand All @@ -119,6 +122,8 @@ message DiscoverResponse {
repeated RouteRule customRouteRules = 23;
// 就近路由规则内容
repeated RouteRule nearbyRouteRules = 24;
// 无损上下线规则内容
LosslessRule losslessRule = 25;
}

message OptionSwitch { map<string, string> options = 1; }
Expand Down
86 changes: 86 additions & 0 deletions api/v1/traffic_manage/lossless.proto
Original file line number Diff line number Diff line change
@@ -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" ];
}