userver: ugrpc::server::ServerConfig Struct Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
ugrpc::server::ServerConfig Struct Referencefinal

Your opinion will help to improve our service

Leave a feedback >

#include <userver/ugrpc/server/server.hpp>

Detailed Description

Settings relating to the whole gRPC server.

Definition at line 48 of file server.hpp.

Public Attributes

std::optional< int > port {0}
 
std::optional< std::string > unix_socket_path {std::nullopt}
 
std::size_t completion_queue_num {2}
 
std::unordered_map< std::string, std::string > channel_args {}
 
logging::Level native_log_level {logging::Level::kError}
 
bool enable_channelz {false}
 Serve a web page with runtime info about gRPC connections.
 
TlsConfig tls
 TLS settings.
 

Member Data Documentation

◆ channel_args

std::unordered_map<std::string, std::string> ugrpc::server::ServerConfig::channel_args {}

Optional grpc-core channel args

See also
https://grpc.github.io/grpc/core/group__grpc__arg__keys.html

Definition at line 64 of file server.hpp.

◆ completion_queue_num

std::size_t ugrpc::server::ServerConfig::completion_queue_num {2}

Number of completion queues to create. Should be ~2 times less than number of worker threads for best RPS.

Definition at line 60 of file server.hpp.

◆ enable_channelz

bool ugrpc::server::ServerConfig::enable_channelz {false}

Serve a web page with runtime info about gRPC connections.

Definition at line 71 of file server.hpp.

◆ native_log_level

logging::Level ugrpc::server::ServerConfig::native_log_level {logging::Level::kError}

The logging level override for the internal grpcpp library. Must be either kDebug, kInfo or kError.

Definition at line 68 of file server.hpp.

◆ port

std::optional<int> ugrpc::server::ServerConfig::port {0}

The port to listen to. If 0, a free port will be picked automatically. If none, the ports have to be configured programmatically using Server::WithServerBuilder.

Definition at line 52 of file server.hpp.

◆ tls

TlsConfig ugrpc::server::ServerConfig::tls

TLS settings.

Definition at line 74 of file server.hpp.

◆ unix_socket_path

std::optional<std::string> ugrpc::server::ServerConfig::unix_socket_path {std::nullopt}

Absolute path to the unix socket to listen to. A server can listen to both port and unix socket simultaneously.

Definition at line 56 of file server.hpp.


The documentation for this struct was generated from the following file: