#include <userver/ugrpc/server/server_component.hpp>
Component that configures and manages the gRPC server.
The component name for static config is "grpc-server"
.
Name | Description | Default value |
---|---|---|
access-tskv-logger | logger name for access-tskv.log | - |
port | the port to use for all gRPC services, or 0 to pick any available | - |
unix-socket-path | unix socket absolute path to listen to, instead of listening on port | - |
completion-queue-count | count of completion queues to create | 2 |
channel-args | a map of channel arguments, see gRPC Core docs | {} |
native-log-level | min log level for the native gRPC library | 'error' |
enable-channelz | initialize service with runtime info about gRPC connections | false |
service-defaults | default config values for gRPC services, see config schema | {} |
tls.cert | path to file with server TLS certificate | - |
tls.key | path to file with secret key from server TLS certificate | - |
tls.ca | path to TLS client CA certificate | - |
Definition at line 44 of file server_component.hpp.
Public Member Functions | |
ServerComponent (const components::ComponentConfig &config, const components::ComponentContext &context) | |
Server & | GetServer () noexcept |
ComponentHealth | GetComponentHealth () const override |
void | OnLoadingCancelled () override |
Static Public Member Functions | |
static yaml_config::Schema | GetStaticConfigSchema () |
Static Public Attributes | |
static constexpr std::string_view | kName = "grpc-server" |
The default name of ugrpc::server::ServerComponent. | |
Protected Types | |
using | LoggableComponentBase = ComponentBase |
Legacy alias, use ComponentBase instead. | |
|
protectedinherited |
Legacy alias, use ComponentBase instead.
Definition at line 67 of file component_base.hpp.
|
inlineoverridevirtualinherited |
Override this function to inform the world of the state of your component.
Reimplemented from components::RawComponentBase.
Reimplemented in server::handlers::Restart.
Definition at line 35 of file component_base.hpp.
|
noexcept |
|
inlineoverridevirtualinherited |
Called once if the creation of any other component failed. If the current component expects some other component to take any action with the current component, this call is a signal that such action may never happen due to components loading was cancelled. Application components might not want to override it.
Reimplemented from components::RawComponentBase.
Definition at line 42 of file component_base.hpp.