Cloud Spanner API - Class Google::Cloud::Spanner::RequestIdInterceptor (v2.34.0)

Reference documentation and code samples for the Cloud Spanner API class Google::Cloud::Spanner::RequestIdInterceptor.

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.

Inherits

  • GRPC::ClientInterceptor

Methods

#bidi_streamer

def bidi_streamer(method:, request:, call:, metadata:, &block) -> void

Intercepts a bidi_streamer rpc call

Parameters
  • method (String) — The RPC method name
  • request (Google::Protobuf::MessageExts) — The request to be sent to the RPC call
  • call (GRPC::ActiveCall::InterceptableView) — An interceptable view object for the call class
  • metadata (Hash) — The metadata to be sent to the RPC call
Returns
  • (void)

#client_streamer

def client_streamer(method:, request:, call:, metadata:, &block) -> void

Intercepts a client_streamer rpc call

Parameters
  • method (String) — The RPC method name
  • request (Google::Protobuf::MessageExts) — The request to be sent to the RPC call
  • call (GRPC::ActiveCall::InterceptableView) — An interceptable view object for the call class
  • metadata (Hash) — All the metadata to be sent to the RPC call
Returns
  • (void)

#initialize

def initialize(process_id: nil) -> Google::Cloud::Spanner::RequestIdInterceptor

Initializes a request_id_interceptor instance.

Parameter
  • process_id (String, int) (defaults to: nil) — A 64 bit value in Hex or Integer format

#request_response

def request_response(method:, request:, call:, metadata:, &block) -> void

Intercepts a request_response rpc call

Parameters
  • method (String) — The RPC method name
  • request (Google::Protobuf::MessageExts) — The request to be sent to the RPC call
  • call (GRPC::ActiveCall::InterceptableView) — An interceptable view object for the call class
  • metadata (Hash) — All the metadata to be sent to the RPC call
Returns
  • (void)

#server_streamer

def server_streamer(method:, request:, call:, metadata:, &block) -> void

Intercepts a server_streamer rpc call

Parameters
  • method (String) — The RPC method name
  • request (Google::Protobuf::MessageExts) — The request to be sent to the RPC call
  • call (GRPC::ActiveCall::InterceptableView) — An interceptable view object for the call class
  • metadata (Hash) — All the metadata to be sent to the RPC call
Returns
  • (void)