Class: Google::Cloud::Spanner::RequestIdInterceptor
- Inherits:
-
GRPC::ClientInterceptor
- Object
- GRPC::ClientInterceptor
- Google::Cloud::Spanner::RequestIdInterceptor
- Defined in:
- lib/google/cloud/spanner/request_id_interceptor.rb
Overview
RequestIdInterceptor is a GRPC interceptor class that captures all the rpc calls made by the GRPC layer inserting a new Header with a specific ID for debugging purposes.
Instance Method Summary collapse
-
#bidi_streamer(method:, request:, call:, metadata:, &block) ⇒ void
Intercepts a bidi_streamer rpc call.
-
#client_streamer(method:, request:, call:, metadata:, &block) ⇒ void
Intercepts a client_streamer rpc call.
-
#initialize(process_id: nil) ⇒ Google::Cloud::Spanner::RequestIdInterceptor
constructor
Initializes a request_id_interceptor instance.
-
#request_response(method:, request:, call:, metadata:, &block) ⇒ void
Intercepts a request_response rpc call.
-
#server_streamer(method:, request:, call:, metadata:, &block) ⇒ void
Intercepts a server_streamer rpc call.
Constructor Details
#initialize(process_id: nil) ⇒ Google::Cloud::Spanner::RequestIdInterceptor
Initializes a request_id_interceptor instance.
89 90 91 92 93 94 95 96 97 |
# File 'lib/google/cloud/spanner/request_id_interceptor.rb', line 89 def initialize process_id: nil super @version = 1 @process_id = self.class.send :get_process_id, process_id @client_id = self.class.send :next_client_id @channel_id = self.class.send :next_channel_id @request_id_counter = 0 @request_mutex = Mutex.new end |
Instance Method Details
#bidi_streamer(method:, request:, call:, metadata:, &block) ⇒ void
This method returns an undefined value.
Intercepts a bidi_streamer rpc call
151 152 153 154 155 156 157 |
# File 'lib/google/cloud/spanner/request_id_interceptor.rb', line 151 def bidi_streamer method:, request:, call:, metadata:, &block # Unused. This is to avoid Rubocop's Lint/UnusedMethodArgument _method = method _request = request _call = call , &block end |
#client_streamer(method:, request:, call:, metadata:, &block) ⇒ void
This method returns an undefined value.
Intercepts a client_streamer rpc call
121 122 123 124 125 126 127 |
# File 'lib/google/cloud/spanner/request_id_interceptor.rb', line 121 def client_streamer method:, request:, call:, metadata:, &block # Unused. This is to avoid Rubocop's Lint/UnusedMethodArgument _method = method _request = request _call = call , &block end |
#request_response(method:, request:, call:, metadata:, &block) ⇒ void
This method returns an undefined value.
Intercepts a request_response rpc call
106 107 108 109 110 111 112 |
# File 'lib/google/cloud/spanner/request_id_interceptor.rb', line 106 def request_response method:, request:, call:, metadata:, &block # Unused. This is to avoid Rubocop's Lint/UnusedMethodArgument _method = method _request = request _call = call , &block end |
#server_streamer(method:, request:, call:, metadata:, &block) ⇒ void
This method returns an undefined value.
Intercepts a server_streamer rpc call
136 137 138 139 140 141 142 |
# File 'lib/google/cloud/spanner/request_id_interceptor.rb', line 136 def server_streamer method:, request:, call:, metadata:, &block # Unused. This is to avoid Rubocop's Lint/UnusedMethodArgument _method = method _request = request _call = call , &block end |