Skip to content

Commit f192c1e

Browse files
author
gaoxinge
authored
support multi pb (#1361)
1 parent 495090f commit f192c1e

File tree

9 files changed

+1046
-36
lines changed

9 files changed

+1046
-36
lines changed

protocol/grpc/internal/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ This internal package is for test. So don't use internal in production.
1111

1212
- [helloworld](./helloworld): test unary process
1313
- [routeguide](./routeguide): test stream process
14+
- [multiprotos](./multiprotos): use multi pb to generate multi pb.go

protocol/grpc/internal/helloworld/helloworld.pb.go

+9-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
grpc-gen:
17+
protoc -I ./ first.proto second.proto --go_out=plugins=grpc:.
18+
dubbo-gen:
19+
protoc -I ./ first.proto second.proto --dubbo_out=plugins=grpc+dubbo:.

protocol/grpc/internal/multiprotos/first.pb.go

+307
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
syntax = "proto3";
19+
20+
package multiprotos;
21+
22+
message FirstRequest {
23+
string message = 1;
24+
}
25+
26+
message FirstResponse {
27+
string message = 1;
28+
}
29+
30+
service FristService {
31+
rpc Service (FirstRequest) returns (FirstResponse) {}
32+
}

0 commit comments

Comments
 (0)