Class: Labkit::Correlation::GRPC::ServerInterceptor

Inherits:
GRPC::ServerInterceptor
  • Object
show all
Includes:
GRPCCommon
Defined in:
lib/labkit/correlation/grpc/server_interceptor.rb

Overview

ServerInterceptor is a server-side GRPC interceptor for injecting GRPC calls with a correlation-id passed from a GRPC client to the GRPC Ruby Service

Constant Summary

Constants included from GRPCCommon

GRPCCommon::CORRELATION_METADATA_KEY

Instance Method Summary collapse

Methods included from GRPCCommon

#rpc_split

Instance Method Details

#bidi_streamer(requests: nil, call: nil, method: nil) ⇒ Object



35
36
37
38
39
# File 'lib/labkit/correlation/grpc/server_interceptor.rb', line 35

def bidi_streamer(requests: nil, call: nil, method: nil)
  wrap_with_correlation_id(call) do
    yield
  end
end

#client_streamer(call: nil, method: nil) ⇒ Object



23
24
25
26
27
# File 'lib/labkit/correlation/grpc/server_interceptor.rb', line 23

def client_streamer(call: nil, method: nil)
  wrap_with_correlation_id(call) do
    yield
  end
end

#request_response(request: nil, call: nil, method: nil) ⇒ Object



17
18
19
20
21
# File 'lib/labkit/correlation/grpc/server_interceptor.rb', line 17

def request_response(request: nil, call: nil, method: nil)
  wrap_with_correlation_id(call) do
    yield
  end
end

#server_streamer(request: nil, call: nil, method: nil) ⇒ Object



29
30
31
32
33
# File 'lib/labkit/correlation/grpc/server_interceptor.rb', line 29

def server_streamer(request: nil, call: nil, method: nil)
  wrap_with_correlation_id(call) do
    yield
  end
end