@@ -3,30 +3,58 @@ package config
33import (
44 "crypto/tls"
55 "crypto/x509"
6- "time"
76
87 "google.golang.org/grpc"
98 grpcCredentials "google.golang.org/grpc/credentials"
109 "google.golang.org/grpc/credentials/insecure"
11- "google.golang.org/grpc/keepalive"
1210
1311 "github.com/ydb-platform/ydb-go-sdk/v3/balancers"
1412 "github.com/ydb-platform/ydb-go-sdk/v3/credentials"
13+ "github.com/ydb-platform/ydb-go-sdk/v3/internal/config"
1514 "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack"
1615 "github.com/ydb-platform/ydb-go-sdk/v3/trace"
1716)
1817
1918var (
2019 // DefaultKeepaliveInterval contains default duration between grpc keepalive
21- DefaultKeepaliveInterval = 10 * time .Second
22- MinKeepaliveInterval = 10 * time .Second
23- DefaultDialTimeout = 5 * time .Second
24- DefaultGRPCMsgSize = 64 * 1024 * 1024 // 64MB
25- DefaultGrpcConnectionPolicy = keepalive.ClientParameters {
26- Time : DefaultKeepaliveInterval ,
27- Timeout : MinKeepaliveInterval ,
28- PermitWithoutStream : true ,
29- }
20+ //
21+ // Will be removed after Aug 2024.
22+ // Write Issue if you need the variable https://github.com/ydb-platform/ydb-go-sdk/issues/new/choose
23+ // Read about versioning policy: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#deprecated
24+ DefaultKeepaliveInterval = config .DefaultKeepaliveInterval // 10 * time.Second
25+
26+ // MinKeepaliveInterval
27+ //
28+ // Will be removed after Aug 2024.
29+ // Write Issue if you need the variable https://github.com/ydb-platform/ydb-go-sdk/issues/new/choose
30+ // Read about versioning policy: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#deprecated
31+ MinKeepaliveInterval = config .MinKeepaliveInterval // 10 * time.Second
32+
33+ // DefaultDialTimeout
34+ //
35+ // Will be removed after Aug 2024.
36+ // Write Issue if you need the variable https://github.com/ydb-platform/ydb-go-sdk/issues/new/choose
37+ // Read about versioning policy: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#deprecated
38+ DefaultDialTimeout = config .DefaultDialTimeout // 5 * time.Second
39+
40+ // DefaultGRPCMsgSize
41+ //
42+ // Will be removed after Aug 2024.
43+ // Write Issue if you need the variable https://github.com/ydb-platform/ydb-go-sdk/issues/new/choose
44+ // Read about versioning policy: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#deprecated
45+ DefaultGRPCMsgSize = config .DefaultGRPCMsgSize // 64 * 1024 * 1024 // 64MB
46+
47+ // DefaultGrpcConnectionPolicy
48+ //
49+ // Will be removed after Aug 2024.
50+ // Write Issue if you need the variable https://github.com/ydb-platform/ydb-go-sdk/issues/new/choose
51+ // Read about versioning policy: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#deprecated
52+ DefaultGrpcConnectionPolicy = config .DefaultGrpcConnectionPolicy
53+ //DefaultGrpcConnectionPolicy = keepalive.ClientParameters{
54+ // Time: DefaultKeepaliveInterval,
55+ // Timeout: MinKeepaliveInterval,
56+ // PermitWithoutStream: true,
57+ //}
3058)
3159
3260func defaultGrpcOptions (secure bool , tlsConfig * tls.Config ) (opts []grpc.DialOption ) {
0 commit comments