overflow_api_service/grpc/grpc.proto
insanity@loafle.com 23f6a0e3f4 test
2017-06-27 14:58:14 +09:00

53 lines
1.0 KiB
Protocol Buffer

syntax = "proto3";
package gwrpc;
import "google/api/annotations.proto";
message ServiceInput {
string serviceName = 1;
string methodName = 2;
map<string,string> param = 3;
}
message ServiceOutput {
string resultStr = 1;
}
service OverflowGateway {
rpc ExecServices(ServiceInput) returns (ServiceOutput) {
option (google.api.http) = {
post: "/v1/overflow/services"
body: "*"
};
}
}
message EchoRequest {
string message = 1;
}
message EchoResponse {
string message = 1;
}
message Heartbeat {
enum Status {
UNKNOWN = 0;
OK = 1;
}
Status status = 1;
}
message Empty {}
service EchoService {
rpc Echo(stream EchoRequest) returns (stream EchoResponse) {
option (google.api.http) = {post: "/echo", body: "*"};
}
rpc Stream(Empty) returns (stream EchoResponse) {
option (google.api.http) = {get: "/echo"};
}
rpc Heartbeats(stream Empty) returns (stream Heartbeat) {
option (google.api.http) = {post: "/heartbeats"};
}
}