userver: ydb::YdbComponent Class Reference
Loading...
Searching...
No Matches
ydb::YdbComponent Class Referencefinal

#include <userver/ydb/component.hpp>

Detailed Description

YDB client component.

Provides access to ydb::TableClient.

Static options:

Name Description Default value
credentials-provider name of credentials provider component -
operation-settings.retries default retries count for an operation 3
operation-settings.operation-timeout default operation timeout in utils::StringToDuration() format 1s
operation-settings.cancel-after cancel operation after specified string in utils::StringToDuration() format 1s
operation-settings.client-timeout default client timeout in utils::StringToDuration() format 1s
operation-settings.get-session-timeout default session timeout in milliseconds 5s
databases.<dbname>.endpoint gRPC endpoint URL, e.g. grpc://localhost:1234 -
databases.<dbname>.database full database path, e.g. /ru/service/production/database -
databases.<dbname>.credentials credentials config passed to credentials provider component -
databases.<dbname>.min_pool_size minimum pool size for database with name <dbname> 10
databases.<dbname>.max_pool_size maximum pool size for database with name <dbname> 50
databases.<dbname>.keep-in-query-cache whether to use query cache true
databases.<dbname>.prefer_local_dc prefer making requests to local DataCenter false
databases.<dbname>.aliases list of alias names for this database []
databases.<dbname>.sync_start fail on boot time if YDB is not accessible true
databases.<dbname>.by-database-timings-buckets-ms histogram bounds for by-database timing metrics 40 buckets with +20% increment per step
databases.<dbname>.by-query-timings-buckets-ms histogram bounds for by-query timing metrics 15 buckets with +100% increment per step

Definition at line 61 of file component.hpp.

+ Inheritance diagram for ydb::YdbComponent:
+ Collaboration diagram for ydb::YdbComponent:

Public Member Functions

 YdbComponent (const components::ComponentConfig &, const components::ComponentContext &)
 
std::shared_ptr< TableClientGetTableClient (const std::string &dbname) const
 
std::shared_ptr< TopicClientGetTopicClient (const std::string &dbname) const
 
std::shared_ptr< CoordinationClientGetCoordinationClient (const std::string &dbname) const
 
const NYdb::TDriver & GetNativeDriver (const std::string &dbname) const
 
const std::string & GetDatabasePath (const std::string &dbname) const
 
- Public Member Functions inherited from components::LoggableComponentBase
 LoggableComponentBase (const ComponentConfig &, const ComponentContext &)
 
 LoggableComponentBase (LoggableComponentBase &&)=delete
 
 LoggableComponentBase (const LoggableComponentBase &)=delete
 
 ~LoggableComponentBase () override=default
 
ComponentHealth GetComponentHealth () const override
 
void OnLoadingCancelled () override
 
void OnAllComponentsLoaded () override
 
void OnAllComponentsAreStopping () override
 

Static Public Member Functions

static yaml_config::Schema GetStaticConfigSchema ()
 
- Static Public Member Functions inherited from components::LoggableComponentBase
static yaml_config::Schema GetStaticConfigSchema ()
 

Static Public Attributes

static constexpr std::string_view kName = "ydb"
 The default name of ydb::YdbComponent component.
 

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