Skip to content

Commit

Permalink
feat: add LocationLevel as enum (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewshan authored Jul 15, 2024
1 parent 232dd79 commit 4a298f3
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions api/v1/traffic_manage/routing.proto
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,26 @@ message MetadataRoutingConfig {

// 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" ];
// 默认就近级别,为空时默认为zone
string match_level = 3 [ json_name = "match_level" ];
// 最大就近级别,为空值默认为none
string max_match_level = 4 [ json_name = "max_match_level" ];
// 默认就近级别
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" ];
}
Expand Down

0 comments on commit 4a298f3

Please sign in to comment.