Class: GoogleRpcStatusTestService
- Includes:
- GRPC::GenericService
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/src/ruby/spec/google_rpc_status_utils_spec.rb
Overview
A test service that fills in the “reserved” grpc-status-details-bin trailer, for client-side testing of GoogleRpcStatus protobuf extraction from trailers.
Instance Method Summary collapse
- #an_rpc(_, _) ⇒ Object
-
#initialize(encoded_rpc_status) ⇒ GoogleRpcStatusTestService
constructor
A new instance of GoogleRpcStatusTestService.
Methods included from GRPC::GenericService
Constructor Details
#initialize(encoded_rpc_status) ⇒ GoogleRpcStatusTestService
Returns a new instance of GoogleRpcStatusTestService.
123 124 125 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/src/ruby/spec/google_rpc_status_utils_spec.rb', line 123 def initialize(encoded_rpc_status) @encoded_rpc_status = encoded_rpc_status end |
Instance Method Details
#an_rpc(_, _) ⇒ Object
127 128 129 130 131 132 133 134 135 136 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/src/ruby/spec/google_rpc_status_utils_spec.rb', line 127 def an_rpc(_, _) # TODO: create a server-side utility API for sending a google rpc status. # Applications are not expected to set the grpc-status-details-bin # ("grpc"-fixed and reserved for library use) manually. # Doing so here is only for testing of the client-side api for extracting # a google rpc status, which is useful # when the interacting with a server that does fill in this trailer. fail GRPC::Unknown.new('test message', 'grpc-status-details-bin' => @encoded_rpc_status) end |