39 lines
605 B
Protocol Buffer
39 lines
605 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package Greeter;
|
|
option go_package = "tldemo/services/Greeter";
|
|
|
|
message HelloRequest {
|
|
string name = 1;
|
|
}
|
|
|
|
message HelloResponse {
|
|
string reply_message = 1;
|
|
}
|
|
|
|
service GreeterService {
|
|
rpc Hello (HelloRequest) returns (HelloResponse);
|
|
}
|
|
|
|
message Nothing {
|
|
|
|
}
|
|
|
|
message TicktokRequest {
|
|
int32 counts = 1;
|
|
}
|
|
|
|
message WatchRequest {
|
|
|
|
}
|
|
|
|
message NowResponse {
|
|
uint64 now = 1;
|
|
int32 counts=2;
|
|
}
|
|
|
|
service TimeService {
|
|
rpc Now (Nothing) returns (NowResponse);
|
|
rpc Ticktok (TicktokRequest) returns (stream NowResponse);
|
|
rpc Watch (stream WatchRequest) returns (stream NowResponse);
|
|
} |