Skip to content

Commit 199c40a

Browse files
tmcyugui
authored andcommitted
Allow methods with no bindings. Fixes #263 (#267)
1 parent 5e41241 commit 199c40a

File tree

4 files changed

+121
-81
lines changed

4 files changed

+121
-81
lines changed

examples/examplepb/a_bit_of_everything.pb.go

Lines changed: 110 additions & 76 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/examplepb/a_bit_of_everything.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ service ABitOfEverythingService {
115115
body: "*"
116116
};
117117
}
118+
rpc NoBindings(google.protobuf.Empty) returns (google.protobuf.Empty) {}
118119
rpc Timeout(google.protobuf.Empty) returns (google.protobuf.Empty) {
119120
option (google.api.http) = {
120121
get: "/v2/example/timeout",

examples/server/a_bit_of_everything.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ func (s *_ABitOfEverythingServer) DeepPathEcho(ctx context.Context, msg *example
221221
return msg, nil
222222
}
223223

224+
func (s *_ABitOfEverythingServer) NoBindings(ctx context.Context, msg *empty.Empty) (*empty.Empty, error) {
225+
return nil, nil
226+
}
227+
224228
func (s *_ABitOfEverythingServer) Timeout(ctx context.Context, msg *empty.Empty) (*empty.Empty, error) {
225229
select {
226230
case <-ctx.Done():

0 commit comments

Comments
 (0)