userver
C++ Async Framework
Toggle main menu visibility
Documentation
API Groups
Namespaces
Reference
Class List
Class Index
File List
Macros
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
service_base.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/ugrpc/server/service_base.hpp
4
/// @brief @copybrief ugrpc::server::ServiceBase
5
6
#
include
<
userver
/
engine
/
task
/
task_processor_fwd
.
hpp
>
7
8
#
include
<
userver
/
ugrpc
/
server
/
call_context
.
hpp
>
9
#
include
<
userver
/
ugrpc
/
server
/
impl
/
service_worker
.
hpp
>
10
#
include
<
userver
/
ugrpc
/
server
/
middlewares
/
fwd
.
hpp
>
11
12
USERVER_NAMESPACE_BEGIN
13
14
namespace
ugrpc::server {
15
16
namespace
impl {
17
struct
ServiceInternals;
18
}
// namespace impl
19
20
/// Per-service settings
21
struct
ServiceConfig
final
{
22
/// TaskProcessor to use for serving RPCs.
23
engine::TaskProcessor&
task_processor
;
24
25
/// Server middlewares to use for the gRPC service.
26
Middlewares
middlewares
;
27
};
21
struct
ServiceConfig
final
{
…
};
28
29
/// @brief The type-erased base class for all gRPC service implementations
30
/// @note User-defined services should inherit from code-generated base service
31
/// classes, not from this class directly.
32
class
ServiceBase
{
33
public
:
34
using
CallContext = ugrpc::server::CallContext;
35
36
ServiceBase
& operator=(
ServiceBase
&&) =
delete
;
37
virtual
~ServiceBase();
38
39
/// @cond
40
// Creates a worker that forwards requests to this service.
41
// The service must be destroyed after the worker.
42
// For internal use only.
43
virtual
std::unique_ptr<impl::ServiceWorker> MakeWorker(impl::ServiceInternals&& internals) = 0;
44
/// @endcond
45
};
32
class
ServiceBase
{
…
};
46
47
}
// namespace ugrpc::server
48
49
USERVER_NAMESPACE_END
userver
ugrpc
server
service_base.hpp
Generated on Wed Apr 30 2025 15:49:08 for userver by
Doxygen
1.13.2