2017-11-28 17:50:30 +08:00
|
|
|
// Copyright 2017 The Cartographer Authors
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package cartographer_grpc.framework.proto;
|
|
|
|
|
2017-11-29 17:40:26 +08:00
|
|
|
message GetSumRequest {
|
2017-11-28 17:50:30 +08:00
|
|
|
int32 input = 1;
|
|
|
|
}
|
|
|
|
|
2017-11-29 17:40:26 +08:00
|
|
|
message GetSumResponse {
|
2017-11-28 17:50:30 +08:00
|
|
|
int32 output = 1;
|
|
|
|
}
|
|
|
|
|
2017-11-30 20:18:16 +08:00
|
|
|
message GetSquareRequest {
|
|
|
|
int32 input = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetSquareResponse {
|
|
|
|
int32 output = 1;
|
|
|
|
}
|
|
|
|
|
2017-11-28 17:50:30 +08:00
|
|
|
// Provides information about the gRPC server.
|
|
|
|
service Math {
|
2017-11-29 17:40:26 +08:00
|
|
|
rpc GetSum(stream GetSumRequest) returns (GetSumResponse);
|
2017-11-30 20:18:16 +08:00
|
|
|
rpc GetSquare(GetSquareRequest) returns (GetSquareResponse);
|
2017-12-04 22:28:19 +08:00
|
|
|
rpc GetRunningSum(stream GetSumRequest) returns (stream GetSumResponse);
|
2017-11-28 17:50:30 +08:00
|
|
|
}
|