feat: add a gRPC endpoint
This commit is contained in:
26
grpc.proto
Normal file
26
grpc.proto
Normal file
@ -0,0 +1,26 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package whoami;
|
||||
|
||||
option go_package = "./grpc";
|
||||
|
||||
service Whoami {
|
||||
rpc Whoami (WhoamiRequest) returns (WhoamiReply) {}
|
||||
rpc Bench(BenchRequest) returns (BenchReply) {}
|
||||
}
|
||||
|
||||
message WhoamiRequest {}
|
||||
|
||||
message WhoamiReply {
|
||||
string name = 1;
|
||||
string hostname = 2;
|
||||
repeated string iface = 3;
|
||||
}
|
||||
|
||||
// The empty request message
|
||||
message BenchRequest {}
|
||||
|
||||
// The response message containing simple data
|
||||
message BenchReply {
|
||||
int32 data = 1;
|
||||
}
|
Reference in New Issue
Block a user