Skip to content

Commit

Permalink
feat:支持查询服务契约列表 (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun authored Jan 16, 2024
1 parent 4185019 commit 17e2063
Show file tree
Hide file tree
Showing 6 changed files with 244 additions and 225 deletions.
2 changes: 2 additions & 0 deletions api/v1/service_manage/grpcapi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ service PolarisHeartbeatGRPC {
service PolarisServiceContractGRPC {
// 上报服务契约
rpc ReportServiceContract(ServiceContract) returns (Response) {}
// 查询服务契约
rpc GetServiceContract(ServiceContract) returns (Response) {}
}
2 changes: 0 additions & 2 deletions api/v1/service_manage/request.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ message DiscoverRequest {
reserved 7 to 11;
NAMESPACES = 12;
FAULT_DETECTOR = 13;
SERVICE_CONTRACT = 14;
}

DiscoverRequestType type = 1;
Service service = 2;
reserved 3 to 4;
DiscoverFilter Filter = 30;
ServiceContract service_contract = 31;
}

4 changes: 2 additions & 2 deletions api/v1/service_manage/response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ message Response {
InstanceLabels instanceLabels = 28;

google.protobuf.Any data = 29;

ServiceContract serviceContract = 30;
}

message BatchWriteResponse {
Expand Down Expand Up @@ -92,7 +94,6 @@ message DiscoverResponse {
reserved "MESH", "MESH_CONFIG", "FLUX_DBREFRESH", "FLUX_SDK", "FLUX_SERVER";
NAMESPACES = 12;
FAULT_DETECTOR = 13;
SERVICE_CONTRACT = 14;
}

DiscoverResponseType type = 3;
Expand All @@ -106,7 +107,6 @@ message DiscoverResponse {
FaultDetector faultDetector = 11;
reserved 12 to 20;
Service aliasFor = 21;
ServiceContract serviceContract = 22;
}


Expand Down
90 changes: 63 additions & 27 deletions source/go/api/v1/service_manage/grpcapi.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

117 changes: 52 additions & 65 deletions source/go/api/v1/service_manage/request.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 17e2063

Please sign in to comment.