Skip to content

Commit b615f46

Browse files
committed
feat: 按照插件进行 proto 拆分,方便服务自动发现
1 parent 503d8df commit b615f46

11 files changed

+515
-756
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea
22
.vscode
33
remote-rate-limit-*
4-
*.log
4+
*.log
5+
venv

api/plugin.pb.go

+24-173
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/plugin.proto

+3-26
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,15 @@
1616
*/
1717

1818
syntax = "proto3";
19-
package api.components;
19+
package api;
2020

2121
option java_package = "cn.polaris.plugin.api";
2222
option java_multiple_files = false;
2323
option java_outer_classname = "Service";
2424
option go_package = "./;api";
2525

26-
import "google/protobuf/any.proto";
27-
28-
29-
// Request polaris remote plugin request from polaris-server.
30-
message Request {
31-
google.protobuf.Any payload = 1;
32-
}
33-
34-
// Response polaris remote plugin response from third remote plugin.
35-
message Response {
36-
// Reply the plugin server return value.
37-
google.protobuf.Any reply = 1;
38-
}
39-
4026
// Ping request
41-
message PingRequest {
42-
43-
}
27+
message PingRequest {}
4428

4529
// Ping response
46-
message PongResponse {
47-
}
48-
49-
// Plugin polaris remote plugin service.
50-
service Plugin {
51-
rpc Call(Request) returns (Response);
52-
rpc Ping(PingRequest) returns (PongResponse);
53-
}
30+
message PongResponse {}

0 commit comments

Comments
 (0)