diff --git a/api/v1/traffic_manage/routing.proto b/api/v1/traffic_manage/routing.proto index 2a78d80..a942b83 100644 --- a/api/v1/traffic_manage/routing.proto +++ b/api/v1/traffic_manage/routing.proto @@ -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" ]; }