@@ -73,6 +73,7 @@ func WithRequestsType(requestsType string) Option {
7373// grpc[s]://{endpoint}/{database}[?param=value]
7474//
7575// Warning: WithConnectionString will be removed at next major release
76+ //
7677// (connection string will be required string param of ydb.Open)
7778func WithConnectionString (connectionString string ) Option {
7879 return func (ctx context.Context , c * connection ) error {
@@ -106,7 +107,9 @@ func WithConnectionTTL(ttl time.Duration) Option {
106107
107108// WithEndpoint defines endpoint option
108109//
109- // Warning: use WithConnectionString or dsn package instead
110+ // Warning: use ydb.Open with required connection string parameter instead
111+ //
112+ // For making connection string from endpoint+database+secure - use sugar.DSN()
110113func WithEndpoint (endpoint string ) Option {
111114 return func (ctx context.Context , c * connection ) error {
112115 c .options = append (c .options , config .WithEndpoint (endpoint ))
@@ -116,7 +119,9 @@ func WithEndpoint(endpoint string) Option {
116119
117120// WithDatabase defines database option
118121//
119- // Warning: use WithConnectionString or dsn package instead
122+ // Warning: use ydb.Open with required connection string parameter instead
123+ //
124+ // For making connection string from endpoint+database+secure - use sugar.DSN()
120125func WithDatabase (database string ) Option {
121126 return func (ctx context.Context , c * connection ) error {
122127 c .options = append (c .options , config .WithDatabase (database ))
@@ -126,7 +131,9 @@ func WithDatabase(database string) Option {
126131
127132// WithSecure defines secure option
128133//
129- // Warning: if secure is false - TLS config options has no effect.
134+ // Warning: use ydb.Open with required connection string parameter instead
135+ //
136+ // For making connection string from endpoint+database+secure - use sugar.DSN()
130137func WithSecure (secure bool ) Option {
131138 return func (ctx context.Context , c * connection ) error {
132139 c .options = append (c .options , config .WithSecure (secure ))
@@ -218,6 +225,8 @@ func WithBalancer(balancer *balancerConfig.Config) Option {
218225}
219226
220227// WithDialTimeout sets timeout for establishing new connection to cluster
228+ //
229+ // Default dial timeout is config.DefaultDialTimeout
221230func WithDialTimeout (timeout time.Duration ) Option {
222231 return func (ctx context.Context , c * connection ) error {
223232 c .options = append (c .options , config .WithDialTimeout (timeout ))
@@ -226,6 +235,7 @@ func WithDialTimeout(timeout time.Duration) Option {
226235}
227236
228237// With collects additional configuration options.
238+ //
229239// This option does not replace collected option, instead it will append provided options.
230240func With (options ... config.Option ) Option {
231241 return func (ctx context.Context , c * connection ) error {
0 commit comments