Skip to content

Commit

Permalink
Allow methods with no bindings. Fixes grpc-ecosystem#263
Browse files Browse the repository at this point in the history
  • Loading branch information
tmc committed Nov 20, 2016
1 parent 9108558 commit b24cc22
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 81 deletions.
186 changes: 110 additions & 76 deletions examples/examplepb/a_bit_of_everything.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/examplepb/a_bit_of_everything.proto
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ service ABitOfEverythingService {
body: "*"
};
}
rpc NoBindings(google.protobuf.Empty) returns (google.protobuf.Empty) {}
rpc Timeout(google.protobuf.Empty) returns (google.protobuf.Empty) {
option (google.api.http) = {
get: "/v2/example/timeout",
Expand Down
4 changes: 4 additions & 0 deletions examples/server/a_bit_of_everything.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ func (s *_ABitOfEverythingServer) DeepPathEcho(ctx context.Context, msg *example
return msg, nil
}

func (s *_ABitOfEverythingServer) NoBindings(ctx context.Context, msg *empty.Empty) (*empty.Empty, error) {
return nil, nil
}

func (s *_ABitOfEverythingServer) Timeout(ctx context.Context, msg *empty.Empty) (*empty.Empty, error) {
select {
case <-ctx.Done():
Expand Down
Loading

0 comments on commit b24cc22

Please sign in to comment.