Class: Labkit::Correlation::GRPC::ClientInterceptor
- Inherits:
-
GRPC::ClientInterceptor
- Object
- GRPC::ClientInterceptor
- Labkit::Correlation::GRPC::ClientInterceptor
show all
- Includes:
- GRPCCommon, Singleton
- Defined in:
- lib/labkit/correlation/grpc/client_interceptor.rb
Overview
ClientInterceptor is used to inject the correlation_id into the metadata or a GRPC call for onward propagation to the server
Constant Summary
Constants included
from GRPCCommon
GRPCCommon::CORRELATION_METADATA_KEY
Instance Method Summary
collapse
-
#bidi_streamer(requests:, call:, method:, metadata:) ⇒ Object
-
#client_streamer(requests:, call:, method:, metadata:) ⇒ Object
-
#request_response(request:, call:, method:, metadata:) ⇒ Object
-
#server_streamer(request:, call:, method:, metadata:) ⇒ Object
Methods included from GRPCCommon
#rpc_split
Instance Method Details
#bidi_streamer(requests:, call:, method:, metadata:) ⇒ Object
35
36
37
38
39
|
# File 'lib/labkit/correlation/grpc/client_interceptor.rb', line 35
def bidi_streamer(requests:, call:, method:, metadata:)
inject_correlation_id_into_metadata(metadata)
yield
end
|
#client_streamer(requests:, call:, method:, metadata:) ⇒ Object
23
24
25
26
27
|
# File 'lib/labkit/correlation/grpc/client_interceptor.rb', line 23
def client_streamer(requests:, call:, method:, metadata:)
inject_correlation_id_into_metadata(metadata)
yield
end
|
#request_response(request:, call:, method:, metadata:) ⇒ Object
17
18
19
20
21
|
# File 'lib/labkit/correlation/grpc/client_interceptor.rb', line 17
def request_response(request:, call:, method:, metadata:)
inject_correlation_id_into_metadata(metadata)
yield
end
|
#server_streamer(request:, call:, method:, metadata:) ⇒ Object
29
30
31
32
33
|
# File 'lib/labkit/correlation/grpc/client_interceptor.rb', line 29
def server_streamer(request:, call:, method:, metadata:)
inject_correlation_id_into_metadata(metadata)
yield
end
|