ShawnHXH commented on issue #487:
URL: https://github.com/apache/dubbo-go-pixiu/issues/487#issuecomment-1420917790

   那我先按照自己的理解进行设计了,若有不妥请及时指正。
   
   ---
   
   关于 service_search 的 proto 设计如下:
   ```proto
   syntax = "proto3";
   
   package istio.extensions.v1alpha1;
   
   option go_package="istio.io/api/extensions/v1alpha1";
   
   message ServiceSearch {
   
       string service_name = 1;
   
       string application_name = 2;
   
       string group_name = 3;
   
       string version = 4;
   }
   ```
   
   借鉴 dubbo-admin 服务查询的功能,可将「服务查询」这个服务的 proto 设计为如下所示:
   
   ```proto
   syntax = "proto3";
   
   package dubbo.networking.v1alpha1;
   
   option go_package = "istio.io/api/dubbo/v1alpha1";
   
   service ServiceSearchService {
       rpc Get(GetServiceSearchRequest) returns (GetServiceSearchResponse);
   }
   
   message GetServiceSearchRequest {
   
       string pattern = 1;  // 存在按照服务名、IP地址、应用三种模式的查询
   
       string filter = 2;  // 查询匹配字段,值为 `*` 表示返回所有服务
   }
   
   message GetServiceSearchResponse {
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to