@@ -26,16 +26,20 @@ class TDriverConfig {
2626 // ! where "<protocol>://" can be "grpc://" or "grpcs://" or be absent, "<hostname:port>" is endpoint,
2727 // ! "/?database=<database-path>" is optional
2828 TDriverConfig (const std::string& connectionString = " " );
29+
2930 // ! Endpoint to initiate connections with Ydb cluster,
3031 // ! client will connect to others nodes according to client loadbalancing
3132 TDriverConfig& SetEndpoint (const std::string& endpoint);
33+
3234 // ! Set number of network threads, default: 2
3335 TDriverConfig& SetNetworkThreadsNum (size_t sz);
36+
3437 // ! Set number of client pool threads, if 0 adaptive thread pool will be used.
3538 // ! NOTE: in case of no zero value it is possible to get deadlock if all threads
3639 // ! of this pool is blocked somewhere in user code.
3740 // ! default: 0
3841 TDriverConfig& SetClientThreadsNum (size_t sz);
42+
3943 // ! Warning: not recommended to change
4044 // ! Set max number of queued responses. 0 - no limit
4145 // ! There is a queue to perform async calls to user code,
@@ -46,29 +50,37 @@ class TDriverConfig {
4650 // ! This value doesn't make sense if SetClientThreadsNum is 0
4751 // ! default: 0
4852 TDriverConfig& SetMaxClientQueueSize (size_t sz);
53+
4954 // ! Enable Ssl.
5055 // ! caCerts - The buffer containing the PEM encoded root certificates for SSL/TLS connections.
5156 // ! If this parameter is empty, the default roots will be used.
5257 TDriverConfig& UseSecureConnection (const std::string& caCerts = std::string());
5358 TDriverConfig& SetUsePerChannelTcpConnection (bool usePerChannel);
5459 TDriverConfig& UseClientCertificate (const std::string& clientCert, const std::string& clientPrivateKey);
60+
5561 // ! Set token, this option can be overridden for client by ClientSettings
5662 TDriverConfig& SetAuthToken (const std::string& token);
63+
5764 // ! Set database, this option can be overridden for client by ClientSettings
5865 TDriverConfig& SetDatabase (const std::string& database);
66+
5967 // ! Set credentials data, this option can be overridden for client by ClientSettings
6068 TDriverConfig& SetCredentialsProviderFactory (std::shared_ptr<ICredentialsProviderFactory> credentialsProviderFactory);
69+
6170 // ! Set behaviour of discovery routine
6271 // ! See EDiscoveryMode enum comments
6372 // ! default: EDiscoveryMode::Sync
6473 TDriverConfig& SetDiscoveryMode (EDiscoveryMode discoveryMode);
74+
6575 // ! Max number of requests in queue waiting for discovery if "Async" mode chosen
6676 // ! default: 100
6777 TDriverConfig& SetMaxQueuedRequests (size_t sz);
78+
6879 // ! Limit using of memory for grpc buffer pool. 0 means disabled.
6980 // ! If enabled the size must be greater than size of recieved message.
7081 // ! default: 0
7182 TDriverConfig& SetGrpcMemoryQuota (uint64_t bytes);
83+
7284 // ! Specify tcp keep alive settings
7385 // ! This option allows to adjust tcp keep alive settings, useful to work
7486 // ! with balancers or to detect unexpected connectivity problem.
@@ -83,12 +95,20 @@ class TDriverConfig {
8395 // ! NOTE: Please read OS documentation and investigate your network topology before touching this option.
8496 // ! default: true, 30, 5, 10 for linux, and true and OS default for others POSIX
8597 TDriverConfig& SetTcpKeepAliveSettings (bool enable, size_t idle, size_t count, size_t interval);
98+
8699 // ! Enable or disable drain of client logic (e.g. session pool drain) during dtor call
87100 TDriverConfig& SetDrainOnDtors (bool allowed);
101+
102+ // ! Set policy for balancing
103+ // ! default: TBalancingPolicy::UsePreferableLocation()
104+ TDriverConfig& SetBalancingPolicy (TBalancingPolicy&& policy);
105+
106+ // ! DEPRECATED
88107 // ! Set policy for balancing
89108 // ! Params is a optionally field to set policy settings
90109 // ! default: EBalancingPolicy::UsePreferableLocation
91110 TDriverConfig& SetBalancingPolicy (EBalancingPolicy policy, const std::string& params = std::string());
111+
92112 // ! Set grpc level keep alive. If keepalive ping was delayed more than given timeout
93113 // ! internal grpc routine fails request with TRANSIENT_FAILURE or TRANSPORT_UNAVAILABLE error
94114 // ! Note: this timeout should not be too small to prevent fail due to
@@ -97,6 +117,7 @@ class TDriverConfig {
97117 // ! default: enabled, 10 seconds
98118 TDriverConfig& SetGRpcKeepAliveTimeout (TDuration timeout);
99119 TDriverConfig& SetGRpcKeepAlivePermitWithoutCalls (bool permitWithoutCalls);
120+
100121 // ! Set inactive socket timeout.
101122 // ! Used to close connections, that were inactive for given time.
102123 // ! Closes unused connections every 1/10 of timeout, so deletion time is approximate.
@@ -107,11 +128,14 @@ class TDriverConfig {
107128 // ! Set maximum incoming message size.
108129 // ! Note: this option overrides MaxMessageSize for incoming messages.
109130 // ! default: 0
131+
110132 TDriverConfig& SetMaxInboundMessageSize (uint64_t maxInboundMessageSize);
133+
111134 // ! Set maximum outgoing message size.
112135 // ! Note: this option overrides MaxMessageSize for outgoing messages.
113136 // ! default: 0
114137 TDriverConfig& SetMaxOutboundMessageSize (uint64_t maxOutboundMessageSize);
138+
115139 // ! Note: if this option is unset, default 64_MB message size will be used.
116140 // ! default: 0
117141 TDriverConfig& SetMaxMessageSize (uint64_t maxMessageSize);
0 commit comments