37 lines
856 B
Protocol Buffer
37 lines
856 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package helloworld;
|
|
|
|
import "google/protobuf/empty.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
option java_multiple_files = true;
|
|
option java_package = "com.zyplayer.doc.grpc.proto";
|
|
option java_outer_classname = "HelloWorldProto";
|
|
|
|
// The greeting service definition.
|
|
service ZyplayerGreeter {
|
|
// Sends a greeting
|
|
rpc sayHello (HelloRequest) returns (HelloResponse) {}
|
|
|
|
// Sends the current time
|
|
rpc sayTime (google.protobuf.Empty) returns (TimeResponse) {}
|
|
}
|
|
|
|
// The request message containing the user's name.
|
|
message HelloRequest {
|
|
string name = 1;
|
|
string content = 2;
|
|
int32 time = 3;
|
|
}
|
|
|
|
// The response message containing the greetings
|
|
message HelloResponse {
|
|
string message = 1;
|
|
}
|
|
|
|
// The response message containing the time
|
|
message TimeResponse {
|
|
google.protobuf.Timestamp time = 1;
|
|
}
|