userver
C++ Async Framework
Loading...
Searching...
No Matches
call_context.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/ugrpc/client/call_context.hpp
4
/// @brief @copybrief ugrpc::client::CallContext
5
6
#
include
<
grpcpp
/
client_context
.
h
>
7
8
#
include
<
userver
/
tracing
/
span
.
hpp
>
9
#
include
<
userver
/
utils
/
impl
/
internal_tag_fwd
.
hpp
>
10
11
USERVER_NAMESPACE_BEGIN
12
13
namespace
ugrpc::client {
14
15
namespace
impl {
16
class
CallState;
17
}
// namespace impl
18
19
/// @brief gRPC call context
20
class
CallContext
{
21
public
:
22
/// @cond
23
// For internal use only
24
CallContext(
utils
::impl::InternalTag, impl::CallState& state)
noexcept
;
25
/// @endcond
26
27
/// @returns the `ClientContext` used for this RPC
28
grpc::ClientContext&
GetClientContext
();
29
30
/// @returns client name
31
std::string_view
GetClientName
()
const
noexcept
;
32
33
/// @returns RPC name
34
std::string_view
GetCallName
()
const
noexcept
;
35
36
/// @returns RPC span
37
tracing
::Span&
GetSpan
()
noexcept
;
38
39
private
:
40
impl::CallState& state_;
41
};
42
43
}
// namespace ugrpc::client
44
45
USERVER_NAMESPACE_END
userver
ugrpc
client
call_context.hpp
Generated on Tue Sep 2 2025 12:37:22 for userver by
Doxygen
1.13.2