12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- // Licensed to the Apache Software Foundation (ASF) under one
- // or more contributor license agreements. See the NOTICE file
- // distributed with this work for additional information
- // regarding copyright ownership. The ASF licenses this file
- // to you 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="proto2";
- // Converted from echo.idl by brpc/tools/idl2proto
- import "idl_options.proto";
- option (idl_support) = true;
- option cc_generic_services = true;
- package example;
- message Parameter {
- optional int32 x = 1;
- optional string y = 2;
- optional int64 z = 3;
- }
- message Object {
- required int32 id = 1 [(idl_type)=IDL_INT8];
- optional int32 value = 2;
- optional string note = 3;
- repeated Parameter params = 4;
- }
- message EchoRequest {
- required string message = 1;
- repeated Object objects = 2;
- }
- message EchoResponse {
- required string message = 1;
- repeated Object objects = 2;
- }
- message MultiRequests {
- required EchoRequest req1 = 1;
- required EchoRequest req2 = 2;
- }
- message MultiResponses {
- required EchoRequest res1 = 1;
- required EchoRequest res2 = 2;
- }
- service EchoService {
- // [idl] void Echo(EchoRequest req, out EchoResponse res);
- rpc Echo(EchoRequest) returns (EchoResponse);
- // [idl] uint32_t EchoWithMultiArgs(EchoRequest req1, EchoRequest req2,
- // out EchoResponse res1, out EchoResponse res2);
- rpc EchoWithMultiArgs(MultiRequests) returns (MultiResponses);
- }
|