diff --git a/CHANGELOG.md b/CHANGELOG.md index feacaa99e..cda75a2b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +* Added `ydb.WithTraceRetry` option * Added `internal/credentials.IsAccessError(err)` helper for check access errors * Changed period for re-fresh static credentials token from `1/2` to `1/10` to expiration time diff --git a/config/config.go b/config/config.go index 20dc44bb6..5cf9a0a09 100644 --- a/config/config.go +++ b/config/config.go @@ -155,6 +155,12 @@ func WithTrace(t trace.Driver, opts ...trace.DriverComposeOption) Option { //nol } } +func WithTraceRetry(t *trace.Retry, opts ...trace.RetryComposeOption) Option { + return func(c *Config) { + config.SetTraceRetry(&c.Common, t, opts...) + } +} + func WithUserAgent(userAgent string) Option { return func(c *Config) { c.metaOptions = append(c.metaOptions, meta.WithUserAgentOption(userAgent)) diff --git a/connection.go b/connection.go index fd2822a1f..28b81788d 100644 --- a/connection.go +++ b/connection.go @@ -427,6 +427,7 @@ func newConnectionFromOptions(ctx context.Context, opts ...Option) (_ *Driver, e WithTraceDiscovery(log.Discovery(d.logger, d.loggerDetails, d.loggerOpts...)), WithTraceTopic(log.Topic(d.logger, d.loggerDetails, d.loggerOpts...)), WithTraceDatabaseSQL(log.DatabaseSQL(d.logger, d.loggerDetails, d.loggerOpts...)), + WithTraceRetry(log.Retry(d.logger, d.loggerDetails, d.loggerOpts...)), } { if opt != nil { err = opt(ctx, d) diff --git a/examples/go.mod b/examples/go.mod index b5d57d574..88d3898e0 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -5,26 +5,23 @@ go 1.20 require ( github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 - github.com/lib/pq v1.10.2 - github.com/prometheus/client_golang v1.13.0 + github.com/lib/pq v1.10.7 github.com/ydb-platform/gorm-driver v0.0.5 github.com/ydb-platform/ydb-go-sdk-auth-environ v0.1.2 - github.com/ydb-platform/ydb-go-sdk-prometheus v0.11.10 - github.com/ydb-platform/ydb-go-sdk/v3 v3.47.3 + github.com/ydb-platform/ydb-go-sdk/v3 v3.48.7 github.com/ydb-platform/ydb-go-yc v0.10.1 google.golang.org/genproto v0.0.0-20230131230820-1c016267d619 gorm.io/driver/postgres v1.5.0 gorm.io/driver/sqlite v1.5.0 gorm.io/gorm v1.25.1 - modernc.org/sqlite v1.14.2 + modernc.org/sqlite v1.20.4 xorm.io/builder v0.3.11-0.20220531020008-1bd24a7dc978 xorm.io/xorm v1.3.2 ) require ( cloud.google.com/go/firestore v1.9.0 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/dustin/go-humanize v1.0.0 // indirect github.com/goccy/go-json v0.8.1 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang-jwt/jwt/v4 v4.4.3 // indirect @@ -39,18 +36,13 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/mattn/go-isatty v0.0.16 // indirect - github.com/mattn/go-sqlite3 v1.14.15 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mattn/go-sqlite3 v1.14.16 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect github.com/syndtr/goleveldb v1.0.0 // indirect github.com/yandex-cloud/go-genproto v0.0.0-20220815090733-4c139c0154e2 // indirect github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd // indirect - github.com/ydb-platform/ydb-go-sdk-metrics v0.16.3 // indirect github.com/ydb-platform/ydb-go-yc-metadata v0.5.4 // indirect golang.org/x/crypto v0.13.0 // indirect golang.org/x/mod v0.8.0 // indirect @@ -61,17 +53,17 @@ require ( golang.org/x/tools v0.6.0 // indirect google.golang.org/grpc v1.53.0 // indirect google.golang.org/protobuf v1.28.1 // indirect - lukechampine.com/uint128 v1.1.1 // indirect - modernc.org/cc/v3 v3.35.18 // indirect - modernc.org/ccgo/v3 v3.12.82 // indirect - modernc.org/libc v1.11.87 // indirect - modernc.org/mathutil v1.4.1 // indirect - modernc.org/memory v1.0.5 // indirect - modernc.org/opt v0.1.1 // indirect - modernc.org/strutil v1.1.1 // indirect - modernc.org/token v1.0.0 // indirect + lukechampine.com/uint128 v1.2.0 // indirect + modernc.org/cc/v3 v3.40.0 // indirect + modernc.org/ccgo/v3 v3.16.13 // indirect + modernc.org/libc v1.22.2 // indirect + modernc.org/mathutil v1.5.0 // indirect + modernc.org/memory v1.4.0 // indirect + modernc.org/opt v0.1.3 // indirect + modernc.org/strutil v1.1.3 // indirect + modernc.org/token v1.0.1 // indirect ) replace github.com/ydb-platform/ydb-go-sdk/v3 => ../ -replace xorm.io/xorm => github.com/ydb-platform/xorm v0.0.3 +replace xorm.io/xorm => github.com/ydb-platform/xorm v0.0.6 diff --git a/examples/go.sum b/examples/go.sum index 2001ebd3b..f63c31597 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -389,49 +389,26 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7 gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s= gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0pAQhH8yz+DNjUbjppKQzKFAn28TMYPB6IU= gitee.com/travelliu/dm v1.8.11192/go.mod h1:DHTzyhCrM843x9VdKVbZ+GKXGRbKM2sJ4LxihRxShkE= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -446,29 +423,17 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/denisenkom/go-mssqldb v0.12.3/go.mod h1:k0mtMFOnU+AihqFxPMiF05rtiDrorD1Vrm1KEz5hxDo= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -482,44 +447,28 @@ github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= +github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/goccy/go-json v0.8.1 h1:4/Wjm0JIJaTDm8K1KcGrLHJoa8EsJ13YWeX+6Kfq6uI= github.com/goccy/go-json v0.8.1/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU= github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -594,8 +543,9 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= +github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -614,62 +564,33 @@ github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMd github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= -github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk= -github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= -github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= -github.com/jackc/pgconn v1.8.1/go.mod h1:JV6m6b6jhjdmzchES0drzCcYcAHS1OPD5xu3OZ/lE2g= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= +github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= +github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= +github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= @@ -677,68 +598,46 @@ github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgproto3/v2 v2.3.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= -github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0= -github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po= -github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ= -github.com/jackc/pgtype v1.7.0/go.mod h1:ZnHF+rMePVqDKaOfJVI4Q8IVvAQMryDlDkZnKOI75BE= -github.com/jackc/pgtype v1.8.0/go.mod h1:PqDKcEBtllAtk/2p6z6SHdXW5UB+MhE75tUol2OKexE= +github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= +github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= -github.com/jackc/pgx/v4 v4.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA= -github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o= -github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg= -github.com/jackc/pgx/v4 v4.11.0/go.mod h1:i62xJgdrtVDsnL3U8ekyrQXEwGNTRoG7/8r+CIdYfcc= -github.com/jackc/pgx/v4 v4.12.0/go.mod h1:fE547h6VulLPA3kySjfnSG/e2D861g/50JlVUa/ub60= +github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= +github.com/jackc/pgx/v4 v4.18.0/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE= github.com/jackc/pgx/v5 v5.3.0 h1:/NQi8KHMpKWHInxXesC8yD4DhkXPrVhmnwYkjp9AmBA= github.com/jackc/pgx/v5 v5.3.0/go.mod h1:t3JDKnCBlYIc0ewLF0Q7B8MXmoIaBOZj/ic7iHozM/8= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle/v2 v2.2.0/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.3.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= @@ -749,160 +648,60 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI= github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= +github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rekby/fixenv v0.3.2/go.mod h1:/b5LRc06BYJtslRtHKxsPWFT/ySpHV+rWvzTg+XWk4c= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -920,10 +719,6 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yandex-cloud/go-genproto v0.0.0-20211115083454-9ca41db5ed9e/go.mod h1:HEUYX/p8966tMUHHT+TsS0hF/Ca/NYwqprC5WXSDMfE= github.com/yandex-cloud/go-genproto v0.0.0-20220815090733-4c139c0154e2 h1:blq4r095kIQLPb+O2k5XWmVizOwrws92cD3yioijS0U= github.com/yandex-cloud/go-genproto v0.0.0-20220815090733-4c139c0154e2/go.mod h1:HEUYX/p8966tMUHHT+TsS0hF/Ca/NYwqprC5WXSDMfE= @@ -931,14 +726,12 @@ github.com/ydb-platform/gorm-driver v0.0.5 h1:q6Cg/iSFw4TAmSyMh25YM0GRmr6LVM2gnF github.com/ydb-platform/gorm-driver v0.0.5/go.mod h1:fkCvWZlA3PzL5MiMc7yFOzxUOzLpY1uT8yZo+e4SV4Y= github.com/ydb-platform/xorm v0.0.3 h1:MXk42lANB6r/MMLg/XdJfyXJycGUDlCeLiMlLGDKVPw= github.com/ydb-platform/xorm v0.0.3/go.mod h1:hFsU7EUF0o3S+l5c0eyP2yPVjJ0d4gsFdqCsyazzwBc= +github.com/ydb-platform/xorm v0.0.6 h1:mlclMIXR7Obwho3cYIIgBoMlMZ+APJZ9gnJQICyVAYY= +github.com/ydb-platform/xorm v0.0.6/go.mod h1:vLAI6Xqpa+48y9I9HJnjD6IDKp/GnATYbtDgWzQb88c= github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd h1:dzWP1Lu+A40W883dK/Mr3xyDSM/2MggS8GtHT0qgAnE= github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= github.com/ydb-platform/ydb-go-sdk-auth-environ v0.1.2 h1:EYSI1kulnHb0H0zt3yOw4cRj4ABMSMGwNe43D+fX7e4= github.com/ydb-platform/ydb-go-sdk-auth-environ v0.1.2/go.mod h1:Xfjce+VMU9yJVr1lj60yK2fFPWjB4jr/4cp3K7cjzi4= -github.com/ydb-platform/ydb-go-sdk-metrics v0.16.3 h1:30D5jErLAiGjchVG2D9JiCLbST5LpAiyS7DoUtHkWsU= -github.com/ydb-platform/ydb-go-sdk-metrics v0.16.3/go.mod h1:bqOjIBSt5LtA8fcTprRPGLvlQGkNlqBSRqnL+yZUJh4= -github.com/ydb-platform/ydb-go-sdk-prometheus v0.11.10 h1:eXRJ8nKGv5Dyz7qTDFraahyqlSmOf1/8JqUtlxGlA4o= -github.com/ydb-platform/ydb-go-sdk-prometheus v0.11.10/go.mod h1:7OffPa+OmsJgIP5G+2Cg5oP9+xB5UJSLm5AUpLxi5Uc= github.com/ydb-platform/ydb-go-yc v0.8.3/go.mod h1:zUolAFGzJ5XG8uwiseTLr9Lapm7L7hdVdZgLSuv9FXE= github.com/ydb-platform/ydb-go-yc v0.10.1 h1:9SBUpR94tzasEzqYSbBuuEp9mY/jV6xbwPMy3muvV7U= github.com/ydb-platform/ydb-go-yc v0.10.1/go.mod h1:9HaZmOHUWy2MpJ4GZw9j9gR2I82/kb6H8fjsu8b2lxQ= @@ -953,10 +746,6 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -978,25 +767,21 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= @@ -1043,19 +828,13 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1084,8 +863,9 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1100,7 +880,6 @@ golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= @@ -1148,14 +927,9 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1168,13 +942,10 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1188,17 +959,13 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201126233918-771906719818/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1209,7 +976,6 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1217,16 +983,14 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1239,7 +1003,6 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1249,7 +1012,6 @@ golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXR golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= @@ -1265,27 +1027,22 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1352,7 +1109,6 @@ golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1405,7 +1161,6 @@ google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -1417,7 +1172,6 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -1527,15 +1281,10 @@ google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614G google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230131230820-1c016267d619 h1:p0kMzw6AG0JEzd7Z+kXqOiLhC6gjUQTbtS2zR0Q3DbI= google.golang.org/genproto v0.0.0-20230131230820-1c016267d619/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -1569,7 +1318,6 @@ google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCD google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= -google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -1589,31 +1337,23 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -1624,7 +1364,6 @@ gorm.io/driver/sqlite v1.5.0/go.mod h1:kDMDfntV9u/vuMmz8APHtHF0b4nyBB7sfCieC6G8k gorm.io/gorm v1.24.7-0.20230306060331-85eaf9eeda11/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= gorm.io/gorm v1.25.1 h1:nsSALe5Pr+cM3V1qwwQ7rOkw+6UeLrX5O4v3llhHa64= gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1632,123 +1371,49 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -lukechampine.com/uint128 v1.1.1 h1:pnxCASz787iMf+02ssImqk6OLt+Z5QHMoZyUXR4z6JU= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -modernc.org/cc/v3 v3.33.6/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.33.9/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.33.11/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.34.0/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.0/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.4/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.5/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.7/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.8/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.10/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.15/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.16/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.17/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.18 h1:rMZhRcWrba0y3nVmdiQ7kxAgOOSq2m2f2VzjHLgEs6U= -modernc.org/cc/v3 v3.35.18/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/ccgo/v3 v3.9.5/go.mod h1:umuo2EP2oDSBnD3ckjaVUXMrmeAw8C8OSICVa0iFf60= -modernc.org/ccgo/v3 v3.10.0/go.mod h1:c0yBmkRFi7uW4J7fwx/JiijwOjeAeR2NoSaRVFPmjMw= -modernc.org/ccgo/v3 v3.11.0/go.mod h1:dGNposbDp9TOZ/1KBxghxtUp/bzErD0/0QW4hhSaBMI= -modernc.org/ccgo/v3 v3.11.1/go.mod h1:lWHxfsn13L3f7hgGsGlU28D9eUOf6y3ZYHKoPaKU0ag= -modernc.org/ccgo/v3 v3.11.3/go.mod h1:0oHunRBMBiXOKdaglfMlRPBALQqsfrCKXgw9okQ3GEw= -modernc.org/ccgo/v3 v3.12.4/go.mod h1:Bk+m6m2tsooJchP/Yk5ji56cClmN6R1cqc9o/YtbgBQ= -modernc.org/ccgo/v3 v3.12.6/go.mod h1:0Ji3ruvpFPpz+yu+1m0wk68pdr/LENABhTrDkMDWH6c= -modernc.org/ccgo/v3 v3.12.8/go.mod h1:Hq9keM4ZfjCDuDXxaHptpv9N24JhgBZmUG5q60iLgUo= -modernc.org/ccgo/v3 v3.12.11/go.mod h1:0jVcmyDwDKDGWbcrzQ+xwJjbhZruHtouiBEvDfoIsdg= -modernc.org/ccgo/v3 v3.12.14/go.mod h1:GhTu1k0YCpJSuWwtRAEHAol5W7g1/RRfS4/9hc9vF5I= -modernc.org/ccgo/v3 v3.12.18/go.mod h1:jvg/xVdWWmZACSgOiAhpWpwHWylbJaSzayCqNOJKIhs= -modernc.org/ccgo/v3 v3.12.20/go.mod h1:aKEdssiu7gVgSy/jjMastnv/q6wWGRbszbheXgWRHc8= -modernc.org/ccgo/v3 v3.12.21/go.mod h1:ydgg2tEprnyMn159ZO/N4pLBqpL7NOkJ88GT5zNU2dE= -modernc.org/ccgo/v3 v3.12.22/go.mod h1:nyDVFMmMWhMsgQw+5JH6B6o4MnZ+UQNw1pp52XYFPRk= -modernc.org/ccgo/v3 v3.12.25/go.mod h1:UaLyWI26TwyIT4+ZFNjkyTbsPsY3plAEB6E7L/vZV3w= -modernc.org/ccgo/v3 v3.12.29/go.mod h1:FXVjG7YLf9FetsS2OOYcwNhcdOLGt8S9bQ48+OP75cE= -modernc.org/ccgo/v3 v3.12.36/go.mod h1:uP3/Fiezp/Ga8onfvMLpREq+KUjUmYMxXPO8tETHtA8= -modernc.org/ccgo/v3 v3.12.38/go.mod h1:93O0G7baRST1vNj4wnZ49b1kLxt0xCW5Hsa2qRaZPqc= -modernc.org/ccgo/v3 v3.12.43/go.mod h1:k+DqGXd3o7W+inNujK15S5ZYuPoWYLpF5PYougCmthU= -modernc.org/ccgo/v3 v3.12.46/go.mod h1:UZe6EvMSqOxaJ4sznY7b23/k13R8XNlyWsO5bAmSgOE= -modernc.org/ccgo/v3 v3.12.47/go.mod h1:m8d6p0zNps187fhBwzY/ii6gxfjob1VxWb919Nk1HUk= -modernc.org/ccgo/v3 v3.12.50/go.mod h1:bu9YIwtg+HXQxBhsRDE+cJjQRuINuT9PUK4orOco/JI= -modernc.org/ccgo/v3 v3.12.51/go.mod h1:gaIIlx4YpmGO2bLye04/yeblmvWEmE4BBBls4aJXFiE= -modernc.org/ccgo/v3 v3.12.53/go.mod h1:8xWGGTFkdFEWBEsUmi+DBjwu/WLy3SSOrqEmKUjMeEg= -modernc.org/ccgo/v3 v3.12.54/go.mod h1:yANKFTm9llTFVX1FqNKHE0aMcQb1fuPJx6p8AcUx+74= -modernc.org/ccgo/v3 v3.12.55/go.mod h1:rsXiIyJi9psOwiBkplOaHye5L4MOOaCjHg1Fxkj7IeU= -modernc.org/ccgo/v3 v3.12.56/go.mod h1:ljeFks3faDseCkr60JMpeDb2GSO3TKAmrzm7q9YOcMU= -modernc.org/ccgo/v3 v3.12.57/go.mod h1:hNSF4DNVgBl8wYHpMvPqQWDQx8luqxDnNGCMM4NFNMc= -modernc.org/ccgo/v3 v3.12.60/go.mod h1:k/Nn0zdO1xHVWjPYVshDeWKqbRWIfif5dtsIOCUVMqM= -modernc.org/ccgo/v3 v3.12.65/go.mod h1:D6hQtKxPNZiY6wDBtehSGKFKmyXn53F8nGTpH+POmS4= -modernc.org/ccgo/v3 v3.12.66/go.mod h1:jUuxlCFZTUZLMV08s7B1ekHX5+LIAurKTTaugUr/EhQ= -modernc.org/ccgo/v3 v3.12.67/go.mod h1:Bll3KwKvGROizP2Xj17GEGOTrlvB1XcVaBrC90ORO84= -modernc.org/ccgo/v3 v3.12.73/go.mod h1:hngkB+nUUqzOf3iqsM48Gf1FZhY599qzVg1iX+BT3cQ= -modernc.org/ccgo/v3 v3.12.81/go.mod h1:p2A1duHoBBg1mFtYvnhAnQyI6vL0uw5PGYLSIgF6rYY= -modernc.org/ccgo/v3 v3.12.82 h1:wudcnJyjLj1aQQCXF3IM9Gz2X6UNjw+afIghzdtn0v8= -modernc.org/ccgo/v3 v3.12.82/go.mod h1:ApbflUfa5BKadjHynCficldU1ghjen84tuM5jRynB7w= -modernc.org/ccorpus v1.11.1 h1:K0qPfpVG1MJh5BYazccnmhywH4zHuOgJXgbjzyp6dWA= -modernc.org/ccorpus v1.11.1/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= +lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= +lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +modernc.org/cc/v3 v3.37.0/go.mod h1:vtL+3mdHx/wcj3iEGz84rQa8vEqR6XM84v5Lcvfph20= +modernc.org/cc/v3 v3.38.1/go.mod h1:vtL+3mdHx/wcj3iEGz84rQa8vEqR6XM84v5Lcvfph20= +modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw= +modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= +modernc.org/ccgo/v3 v3.0.0-20220904174949-82d86e1b6d56/go.mod h1:YSXjPL62P2AMSxBphRHPn7IkzhVHqkvOnRKAKh+W6ZI= +modernc.org/ccgo/v3 v3.0.0-20220910160915-348f15de615a/go.mod h1:8p47QxPkdugex9J4n9P2tLZ9bK01yngIVp00g4nomW0= +modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8/go.mod h1:fUB3Vn0nVPReA+7IG7yZDfjv1TMWjhQP8gCxrFAtL5g= +modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= +modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= +modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= +modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= -modernc.org/libc v1.9.8/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w= -modernc.org/libc v1.9.11/go.mod h1:NyF3tsA5ArIjJ83XB0JlqhjTabTCHm9aX4XMPHyQn0Q= -modernc.org/libc v1.11.0/go.mod h1:2lOfPmj7cz+g1MrPNmX65QCzVxgNq2C5o0jdLY2gAYg= -modernc.org/libc v1.11.2/go.mod h1:ioIyrl3ETkugDO3SGZ+6EOKvlP3zSOycUETe4XM4n8M= -modernc.org/libc v1.11.5/go.mod h1:k3HDCP95A6U111Q5TmG3nAyUcp3kR5YFZTeDS9v8vSU= -modernc.org/libc v1.11.6/go.mod h1:ddqmzR6p5i4jIGK1d/EiSw97LBcE3dK24QEwCFvgNgE= -modernc.org/libc v1.11.11/go.mod h1:lXEp9QOOk4qAYOtL3BmMve99S5Owz7Qyowzvg6LiZso= -modernc.org/libc v1.11.13/go.mod h1:ZYawJWlXIzXy2Pzghaf7YfM8OKacP3eZQI81PDLFdY8= -modernc.org/libc v1.11.16/go.mod h1:+DJquzYi+DMRUtWI1YNxrlQO6TcA5+dRRiq8HWBWRC8= -modernc.org/libc v1.11.19/go.mod h1:e0dgEame6mkydy19KKaVPBeEnyJB4LGNb0bBH1EtQ3I= -modernc.org/libc v1.11.24/go.mod h1:FOSzE0UwookyT1TtCJrRkvsOrX2k38HoInhw+cSCUGk= -modernc.org/libc v1.11.26/go.mod h1:SFjnYi9OSd2W7f4ct622o/PAYqk7KHv6GS8NZULIjKY= -modernc.org/libc v1.11.27/go.mod h1:zmWm6kcFXt/jpzeCgfvUNswM0qke8qVwxqZrnddlDiE= -modernc.org/libc v1.11.28/go.mod h1:Ii4V0fTFcbq3qrv3CNn+OGHAvzqMBvC7dBNyC4vHZlg= -modernc.org/libc v1.11.31/go.mod h1:FpBncUkEAtopRNJj8aRo29qUiyx5AvAlAxzlx9GNaVM= -modernc.org/libc v1.11.34/go.mod h1:+Tzc4hnb1iaX/SKAutJmfzES6awxfU1BPvrrJO0pYLg= -modernc.org/libc v1.11.37/go.mod h1:dCQebOwoO1046yTrfUE5nX1f3YpGZQKNcITUYWlrAWo= -modernc.org/libc v1.11.39/go.mod h1:mV8lJMo2S5A31uD0k1cMu7vrJbSA3J3waQJxpV4iqx8= -modernc.org/libc v1.11.42/go.mod h1:yzrLDU+sSjLE+D4bIhS7q1L5UwXDOw99PLSX0BlZvSQ= -modernc.org/libc v1.11.44/go.mod h1:KFq33jsma7F5WXiYelU8quMJasCCTnHK0mkri4yPHgA= -modernc.org/libc v1.11.45/go.mod h1:Y192orvfVQQYFzCNsn+Xt0Hxt4DiO4USpLNXBlXg/tM= -modernc.org/libc v1.11.47/go.mod h1:tPkE4PzCTW27E6AIKIR5IwHAQKCAtudEIeAV1/SiyBg= -modernc.org/libc v1.11.49/go.mod h1:9JrJuK5WTtoTWIFQ7QjX2Mb/bagYdZdscI3xrvHbXjE= -modernc.org/libc v1.11.51/go.mod h1:R9I8u9TS+meaWLdbfQhq2kFknTW0O3aw3kEMqDDxMaM= -modernc.org/libc v1.11.53/go.mod h1:5ip5vWYPAoMulkQ5XlSJTy12Sz5U6blOQiYasilVPsU= -modernc.org/libc v1.11.54/go.mod h1:S/FVnskbzVUrjfBqlGFIPA5m7UwB3n9fojHhCNfSsnw= -modernc.org/libc v1.11.55/go.mod h1:j2A5YBRm6HjNkoSs/fzZrSxCuwWqcMYTDPLNx0URn3M= -modernc.org/libc v1.11.56/go.mod h1:pakHkg5JdMLt2OgRadpPOTnyRXm/uzu+Yyg/LSLdi18= -modernc.org/libc v1.11.58/go.mod h1:ns94Rxv0OWyoQrDqMFfWwka2BcaF6/61CqJRK9LP7S8= -modernc.org/libc v1.11.70/go.mod h1:DUOmMYe+IvKi9n6Mycyx3DbjfzSKrdr/0Vgt3j7P5gw= -modernc.org/libc v1.11.71/go.mod h1:DUOmMYe+IvKi9n6Mycyx3DbjfzSKrdr/0Vgt3j7P5gw= -modernc.org/libc v1.11.75/go.mod h1:dGRVugT6edz361wmD9gk6ax1AbDSe0x5vji0dGJiPT0= -modernc.org/libc v1.11.82/go.mod h1:NF+Ek1BOl2jeC7lw3a7Jj5PWyHPwWD4aq3wVKxqV1fI= -modernc.org/libc v1.11.86/go.mod h1:ePuYgoQLmvxdNT06RpGnaDKJmDNEkV7ZPKI2jnsvZoE= -modernc.org/libc v1.11.87 h1:PzIzOqtlzMDDcCzJ5cUP6h/Ku6Fa9iyflP2ccTY64aE= -modernc.org/libc v1.11.87/go.mod h1:Qvd5iXTeLhI5PS0XSyqMY99282y+3euapQFxM7jYnpY= -modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.4.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.4.1 h1:ij3fYGe8zBF4Vu+g0oT7mB06r8sqGWKuJu1yXeR4by8= -modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/memory v1.0.4/go.mod h1:nV2OApxradM3/OVbs2/0OsP6nPfakXpi50C7dcoHXlc= -modernc.org/memory v1.0.5 h1:XRch8trV7GgvTec2i7jc33YlUI0RKVDBvZ5eZ5m8y14= -modernc.org/memory v1.0.5/go.mod h1:B7OYswTRnfGg+4tDH1t1OeUNnsy2viGTdME4tzd+IjM= -modernc.org/opt v0.1.1 h1:/0RX92k9vwVeDXj+Xn23DKp2VJubL7k8qNffND6qn3A= +modernc.org/libc v1.17.4/go.mod h1:WNg2ZH56rDEwdropAJeZPQkXmDwh+JCA1s/htl6r2fA= +modernc.org/libc v1.18.0/go.mod h1:vj6zehR5bfc98ipowQOM2nIDUZnVew/wNC/2tOGS+q0= +modernc.org/libc v1.19.0/go.mod h1:ZRfIaEkgrYgZDl6pa4W39HgN5G/yDW+NRmNKZBDFrk0= +modernc.org/libc v1.20.3/go.mod h1:ZRfIaEkgrYgZDl6pa4W39HgN5G/yDW+NRmNKZBDFrk0= +modernc.org/libc v1.21.4/go.mod h1:przBsL5RDOZajTVslkugzLBj1evTue36jEomFQOoYuI= +modernc.org/libc v1.22.2 h1:4U7v51GyhlWqQmwCHj28Rdq2Yzwk55ovjFrdPjs8Hb0= +modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug= +modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= +modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/memory v1.3.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/memory v1.4.0 h1:crykUfNSnMAXaOJnnxcSzbUGMqkLWjklJKkBK2nwZwk= +modernc.org/memory v1.4.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.14.2 h1:ohsW2+e+Qe2To1W6GNezzKGwjXwSax6R+CrhRxVaFbE= -modernc.org/sqlite v1.14.2/go.mod h1:yqfn85u8wVOE6ub5UT8VI9JjhrwBUUCNyTACN0h6Sx8= -modernc.org/strutil v1.1.1 h1:xv+J1BXY3Opl2ALrBwyfEikFAj8pmqcpnfmuwUwcozs= -modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= -modernc.org/tcl v1.8.13 h1:V0sTNBw0Re86PvXZxuCub3oO9WrSTqALgrwNZNvLFGw= -modernc.org/tcl v1.8.13/go.mod h1:V+q/Ef0IJaNUSECieLU4o+8IScapxnMyFV6i/7uQlAY= -modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk= -modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/z v1.2.19 h1:BGyRFWhDVn5LFS5OcX4Yd/MlpRTOc7hOPTdcIpCiUao= -modernc.org/z v1.2.19/go.mod h1:+ZpP0pc4zz97eukOzW3xagV/lS82IpPN9NGG5pNF9vY= +modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= +modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/sqlite v1.20.4 h1:J8+m2trkN+KKoE7jglyHYYYiaq5xmz2HoHJIiBlRzbE= +modernc.org/sqlite v1.20.4/go.mod h1:zKcGyrICaxNTMEHSr1HQ2GUraP0j+845GYw37+EyT6A= +modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= +modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= +modernc.org/tcl v1.15.0 h1:oY+JeD11qVVSgVvodMJsu7Edf8tr5E/7tuhF5cNYz34= +modernc.org/tcl v1.15.0/go.mod h1:xRoGotBZ6dU+Zo2tca+2EqVEeMmOUBzHnhIwq4YrVnE= +modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg= +modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/z v1.7.0 h1:xkDw/KepgEjeizO2sNco+hqYkU12taxQFqPEmgm1GWE= +modernc.org/z v1.7.0/go.mod h1:hVdgNMh8ggTuRG1rGU8x+xGRFfiQUIAw0ZqlPy8+HyQ= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= xorm.io/builder v0.3.11-0.20220531020008-1bd24a7dc978 h1:bvLlAPW1ZMTWA32LuZMBEGHAUOcATZjzHcotf3SWweM= xorm.io/builder v0.3.11-0.20220531020008-1bd24a7dc978/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE= diff --git a/examples/serverless/url_shortener/service.go b/examples/serverless/url_shortener/service.go index 892970c92..620ccbfe8 100644 --- a/examples/serverless/url_shortener/service.go +++ b/examples/serverless/url_shortener/service.go @@ -15,13 +15,9 @@ import ( "strings" "sync" "text/template" - "time" "github.com/gorilla/mux" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promhttp" environ "github.com/ydb-platform/ydb-go-sdk-auth-environ" - ydbMetrics "github.com/ydb-platform/ydb-go-sdk-prometheus" ydb "github.com/ydb-platform/ydb-go-sdk/v3" "github.com/ydb-platform/ydb-go-sdk/v3/table" @@ -29,7 +25,6 @@ import ( "github.com/ydb-platform/ydb-go-sdk/v3/table/result" "github.com/ydb-platform/ydb-go-sdk/v3/table/result/named" "github.com/ydb-platform/ydb-go-sdk/v3/table/types" - "github.com/ydb-platform/ydb-go-sdk/v3/trace" ) //go:embed static/index.html @@ -71,76 +66,16 @@ type templateConfig struct { } type service struct { - db *ydb.Driver - registry *prometheus.Registry - router *mux.Router - - calls *prometheus.GaugeVec - callsLatency *prometheus.HistogramVec - callsErrors *prometheus.GaugeVec + db *ydb.Driver + router *mux.Router } var once sync.Once func getService(ctx context.Context, dsn string, opts ...ydb.Option) (s *service, err error) { once.Do(func() { - var ( - registry = prometheus.NewRegistry() - calls = prometheus.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: "app", - Name: "calls", - }, []string{ - "method", - "success", - }) - callsLatency = prometheus.NewHistogramVec(prometheus.HistogramOpts{ - Namespace: "app", - Name: "latency", - Buckets: []float64{ - (1 * time.Millisecond).Seconds(), - (5 * time.Millisecond).Seconds(), - (10 * time.Millisecond).Seconds(), - (50 * time.Millisecond).Seconds(), - (100 * time.Millisecond).Seconds(), - (500 * time.Millisecond).Seconds(), - (1000 * time.Millisecond).Seconds(), - (5000 * time.Millisecond).Seconds(), - (10000 * time.Millisecond).Seconds(), - }, - }, []string{ - "success", - "method", - }) - callsErrors = prometheus.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: "app", - Name: "errors", - }, []string{ - "method", - }) - ) - - registry.MustRegister(calls) - registry.MustRegister(callsLatency) - registry.MustRegister(callsErrors) - - opts = append( - opts, - ydbMetrics.WithTraces( - registry, - ydbMetrics.WithSeparator("_"), - ydbMetrics.WithDetails( - trace.DetailsAll, - ), - ), - ) - s = &service{ - registry: registry, - router: mux.NewRouter(), - - calls: calls, - callsLatency: callsLatency, - callsErrors: callsErrors, + router: mux.NewRouter(), } s.db, err = ydb.Open(ctx, dsn, opts...) @@ -149,9 +84,6 @@ func getService(ctx context.Context, dsn string, opts ...ydb.Option) (s *service return } - s.router.Handle("/metrics", promhttp.InstrumentMetricHandler( - registry, promhttp.HandlerFor(registry, promhttp.HandlerOpts{}), - )) s.router.HandleFunc("/", s.handleIndex).Methods(http.MethodGet) s.router.HandleFunc("/shorten", s.handleShorten).Methods(http.MethodPost) s.router.HandleFunc("/{[0-9a-fA-F]{8}}", s.handleLonger).Methods(http.MethodGet) @@ -299,34 +231,11 @@ func writeResponse(w http.ResponseWriter, statusCode int, body string) { _, _ = w.Write([]byte(body)) } -func successToString(b bool) string { - if b { - return "true" - } - return "false" -} - func (s *service) handleIndex(w http.ResponseWriter, r *http.Request) { var ( - err error - tpl *template.Template - start = time.Now() + err error + tpl *template.Template ) - defer func() { - if err != nil { - s.callsErrors.With(prometheus.Labels{ - "method": "index", - }).Add(1) - } - s.callsLatency.With(prometheus.Labels{ - "method": "index", - "success": successToString(err == nil), - }).Observe(time.Since(start).Seconds()) - s.calls.With(prometheus.Labels{ - "method": "index", - "success": successToString(err == nil), - }).Add(1) - }() tpl, err = template.ParseFS(static, "static/index.html") if err != nil { writeResponse(w, http.StatusInternalServerError, err.Error()) @@ -345,26 +254,10 @@ func (s *service) handleIndex(w http.ResponseWriter, r *http.Request) { func (s *service) handleShorten(w http.ResponseWriter, r *http.Request) { var ( - err error - url []byte - hash string - start = time.Now() + err error + url []byte + hash string ) - defer func() { - if err != nil { - s.callsErrors.With(prometheus.Labels{ - "method": "shorten", - }).Add(1) - } - s.callsLatency.With(prometheus.Labels{ - "method": "shorten", - "success": successToString(err == nil), - }).Observe(time.Since(start).Seconds()) - s.calls.With(prometheus.Labels{ - "method": "index", - "success": successToString(err == nil), - }).Add(1) - }() url, err = io.ReadAll(r.Body) if err != nil { writeResponse(w, http.StatusInternalServerError, err.Error()) @@ -386,25 +279,9 @@ func (s *service) handleShorten(w http.ResponseWriter, r *http.Request) { func (s *service) handleLonger(w http.ResponseWriter, r *http.Request) { var ( - err error - url string - start = time.Now() + err error + url string ) - defer func() { - if err != nil { - s.callsErrors.With(prometheus.Labels{ - "method": "longer", - }).Add(1) - } - s.callsLatency.With(prometheus.Labels{ - "method": "longer", - "success": successToString(err == nil), - }).Observe(time.Since(start).Seconds()) - s.calls.With(prometheus.Labels{ - "method": "index", - "success": successToString(err == nil), - }).Add(1) - }() path := strings.Split(r.URL.Path, "/") if !isShortCorrect(path[len(path)-1]) { err = fmt.Errorf("'%s' is not a valid short path", path[len(path)-1]) diff --git a/internal/balancer/balancer.go b/internal/balancer/balancer.go index 23c07b710..170a78999 100644 --- a/internal/balancer/balancer.go +++ b/internal/balancer/balancer.go @@ -62,27 +62,31 @@ func (b *Balancer) OnUpdate(onApplyDiscoveredEndpoints func(ctx context.Context, }) } -func (b *Balancer) clusterDiscovery(ctx context.Context) (err error) { - if err = retry.Retry(ctx, func(childCtx context.Context) (err error) { - if err = b.clusterDiscoveryAttempt(childCtx); err != nil { - if credentials.IsAccessError(err) { - return credentials.AccessError("cluster discovery failed", err, - credentials.WithEndpoint(b.driverConfig.Endpoint()), - credentials.WithDatabase(b.driverConfig.Database()), - credentials.WithCredentials(b.driverConfig.Credentials()), - ) - } - // if got err but parent context is not done - mark error as retryable - if ctx.Err() == nil && xerrors.IsTimeoutError(err) { - return xerrors.WithStackTrace(xerrors.Retryable(err)) +func (b *Balancer) clusterDiscovery(ctx context.Context) error { + return retry.Retry( + xcontext.WithTraceRetry( + repeater.WithEvent(ctx, repeater.EventInit), + b.driverConfig.TraceRetry(), + ), + func(childCtx context.Context) error { + if err := b.clusterDiscoveryAttempt(childCtx); err != nil { + if credentials.IsAccessError(err) { + return credentials.AccessError("cluster discovery failed", err, + credentials.WithEndpoint(b.driverConfig.Endpoint()), + credentials.WithDatabase(b.driverConfig.Database()), + credentials.WithCredentials(b.driverConfig.Credentials()), + ) + } + // if got err but parent context is not done - mark error as retryable + if ctx.Err() == nil && xerrors.IsTimeoutError(err) { + return xerrors.WithStackTrace(xerrors.Retryable(err)) + } + return xerrors.WithStackTrace(err) } - return xerrors.WithStackTrace(err) - } - return nil - }, retry.WithIdempotent(true)); err != nil { - return xerrors.WithStackTrace(err) - } - return nil + return nil + }, + retry.WithIdempotent(true), + ) } func (b *Balancer) clusterDiscoveryAttempt(ctx context.Context) (err error) { @@ -293,7 +297,7 @@ func (b *Balancer) wrapCall(ctx context.Context, f func(ctx context.Context, cc if err = f(ctx, cc); err != nil { if conn.UseWrapping(ctx) { if credentials.IsAccessError(err) { - err = credentials.AccessError("no access", err, + err = credentials.AccessError("unauthenticated", err, credentials.WithAddress(cc.Endpoint().String()), credentials.WithNodeID(cc.Endpoint().NodeID()), credentials.WithCredentials(b.driverConfig.Credentials()), diff --git a/internal/config/config.go b/internal/config/config.go index f7a094d7e..dcf89c4b7 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -2,12 +2,15 @@ package config import ( "time" + + "github.com/ydb-platform/ydb-go-sdk/v3/trace" ) type Common struct { operationTimeout time.Duration operationCancelAfter time.Duration disableAutoRetry bool + traceRetry trace.Retry panicCallback func(e interface{}) } @@ -41,6 +44,10 @@ func (c *Common) OperationCancelAfter() time.Duration { return c.operationCancelAfter } +func (c *Common) TraceRetry() *trace.Retry { + return &c.traceRetry +} + // SetOperationTimeout define the maximum amount of time a YDB server will process // an operation. After timeout exceeds YDB will try to cancel operation and // regardless of the cancellation appropriate error will be returned to @@ -70,3 +77,7 @@ func SetPanicCallback(c *Common, panicCallback func(e interface{})) { func SetAutoRetry(c *Common, autoRetry bool) { c.disableAutoRetry = !autoRetry } + +func SetTraceRetry(c *Common, t *trace.Retry, opts ...trace.RetryComposeOption) { + c.traceRetry = *c.traceRetry.Compose(t, opts...) +} diff --git a/internal/coordination/client.go b/internal/coordination/client.go index a73a81d45..a8fb09878 100644 --- a/internal/coordination/client.go +++ b/internal/coordination/client.go @@ -11,6 +11,7 @@ import ( "github.com/ydb-platform/ydb-go-sdk/v3/coordination" "github.com/ydb-platform/ydb-go-sdk/v3/internal/coordination/config" "github.com/ydb-platform/ydb-go-sdk/v3/internal/operation" + "github.com/ydb-platform/ydb-go-sdk/v3/internal/xcontext" "github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors" "github.com/ydb-platform/ydb-go-sdk/v3/retry" "github.com/ydb-platform/ydb-go-sdk/v3/scheme" @@ -34,17 +35,28 @@ func New(cc grpc.ClientConnInterface, config config.Config) *Client { } } -func (c *Client) CreateNode(ctx context.Context, path string, config coordination.NodeConfig) (err error) { +func (c *Client) CreateNode(ctx context.Context, path string, config coordination.NodeConfig) error { if c == nil { return xerrors.WithStackTrace(errNilClient) } call := func(ctx context.Context) error { - return xerrors.WithStackTrace(c.createNode(ctx, path, config)) + if err := c.createNode(ctx, path, config); err != nil { + return xerrors.WithStackTrace(err) + } + return nil } if !c.config.AutoRetry() { - return call(ctx) + if err := call(ctx); err != nil { + return xerrors.WithStackTrace(err) + } + return nil } - return retry.Retry(ctx, call, retry.WithStackTrace(), retry.WithIdempotent(true)) + return retry.Retry( + xcontext.WithTraceRetry(ctx, c.config.TraceRetry()), + call, + retry.WithStackTrace(), + retry.WithIdempotent(true), + ) } func (c *Client) createNode(ctx context.Context, path string, config coordination.NodeConfig) (err error) { @@ -71,17 +83,28 @@ func (c *Client) createNode(ctx context.Context, path string, config coordinatio return xerrors.WithStackTrace(err) } -func (c *Client) AlterNode(ctx context.Context, path string, config coordination.NodeConfig) (err error) { +func (c *Client) AlterNode(ctx context.Context, path string, config coordination.NodeConfig) error { if c == nil { return xerrors.WithStackTrace(errNilClient) } call := func(ctx context.Context) error { - return xerrors.WithStackTrace(c.alterNode(ctx, path, config)) + if err := c.alterNode(ctx, path, config); err != nil { + return xerrors.WithStackTrace(err) + } + return nil } if !c.config.AutoRetry() { - return call(ctx) + if err := call(ctx); err != nil { + return xerrors.WithStackTrace(err) + } + return nil } - return retry.Retry(ctx, call, retry.WithStackTrace(), retry.WithIdempotent(true)) + return retry.Retry( + xcontext.WithTraceRetry(ctx, c.config.TraceRetry()), + call, + retry.WithStackTrace(), + retry.WithIdempotent(true), + ) } func (c *Client) alterNode(ctx context.Context, path string, config coordination.NodeConfig) (err error) { @@ -108,17 +131,28 @@ func (c *Client) alterNode(ctx context.Context, path string, config coordination return xerrors.WithStackTrace(err) } -func (c *Client) DropNode(ctx context.Context, path string) (err error) { +func (c *Client) DropNode(ctx context.Context, path string) error { if c == nil { return xerrors.WithStackTrace(errNilClient) } call := func(ctx context.Context) error { - return xerrors.WithStackTrace(c.dropNode(ctx, path)) + if err := c.dropNode(ctx, path); err != nil { + return xerrors.WithStackTrace(err) + } + return nil } if !c.config.AutoRetry() { - return call(ctx) + if err := call(ctx); err != nil { + return xerrors.WithStackTrace(err) + } + return nil } - return retry.Retry(ctx, call, retry.WithStackTrace(), retry.WithIdempotent(true)) + return retry.Retry( + xcontext.WithTraceRetry(ctx, c.config.TraceRetry()), + call, + retry.WithStackTrace(), + retry.WithIdempotent(true), + ) } func (c *Client) dropNode(ctx context.Context, path string) (err error) { @@ -141,24 +175,37 @@ func (c *Client) DescribeNode( ctx context.Context, path string, ) ( - entry *scheme.Entry, - config *coordination.NodeConfig, - err error, + *scheme.Entry, + *coordination.NodeConfig, + error, ) { if c == nil { - err = xerrors.WithStackTrace(errNilClient) - return + return nil, nil, xerrors.WithStackTrace(errNilClient) } - call := func(ctx context.Context) error { + var ( + entry *scheme.Entry + config *coordination.NodeConfig + ) + call := func(ctx context.Context) (err error) { entry, config, err = c.describeNode(ctx, path) - return xerrors.WithStackTrace(err) + if err != nil { + return xerrors.WithStackTrace(err) + } + return nil } if !c.config.AutoRetry() { - err = call(ctx) - return + if err := call(ctx); err != nil { + return nil, nil, xerrors.WithStackTrace(err) + } + return entry, config, nil } - err = retry.Retry(ctx, call, retry.WithStackTrace(), retry.WithIdempotent(true)) - return + err := retry.Retry( + xcontext.WithTraceRetry(ctx, c.config.TraceRetry()), + call, + retry.WithStackTrace(), + retry.WithIdempotent(true), + ) + return entry, config, err } // DescribeNode describes a coordination node diff --git a/internal/ratelimiter/client.go b/internal/ratelimiter/client.go index 6b51a21c5..05a7f17bc 100644 --- a/internal/ratelimiter/client.go +++ b/internal/ratelimiter/client.go @@ -14,6 +14,7 @@ import ( "github.com/ydb-platform/ydb-go-sdk/v3/internal/ratelimiter/config" ratelimiterErrors "github.com/ydb-platform/ydb-go-sdk/v3/internal/ratelimiter/errors" "github.com/ydb-platform/ydb-go-sdk/v3/internal/ratelimiter/options" + "github.com/ydb-platform/ydb-go-sdk/v3/internal/xcontext" "github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors" "github.com/ydb-platform/ydb-go-sdk/v3/ratelimiter" "github.com/ydb-platform/ydb-go-sdk/v3/retry" @@ -47,17 +48,28 @@ func (c *Client) CreateResource( ctx context.Context, coordinationNodePath string, resource ratelimiter.Resource, -) (err error) { +) error { if c == nil { return xerrors.WithStackTrace(errNilClient) } call := func(ctx context.Context) error { - return xerrors.WithStackTrace(c.createResource(ctx, coordinationNodePath, resource)) + if err := c.createResource(ctx, coordinationNodePath, resource); err != nil { + return xerrors.WithStackTrace(err) + } + return nil } if !c.config.AutoRetry() { - return call(ctx) + if err := call(ctx); err != nil { + return xerrors.WithStackTrace(err) + } + return nil } - return retry.Retry(ctx, call, retry.WithStackTrace(), retry.WithIdempotent(true)) + return retry.Retry( + xcontext.WithTraceRetry(ctx, c.config.TraceRetry()), + call, + retry.WithIdempotent(true), + retry.WithStackTrace(), + ) } func (c *Client) createResource( @@ -90,17 +102,28 @@ func (c *Client) AlterResource( ctx context.Context, coordinationNodePath string, resource ratelimiter.Resource, -) (err error) { +) error { if c == nil { return xerrors.WithStackTrace(errNilClient) } call := func(ctx context.Context) error { - return xerrors.WithStackTrace(c.alterResource(ctx, coordinationNodePath, resource)) + if err := c.alterResource(ctx, coordinationNodePath, resource); err != nil { + return xerrors.WithStackTrace(err) + } + return nil } if !c.config.AutoRetry() { - return call(ctx) + if err := call(ctx); err != nil { + return xerrors.WithStackTrace(err) + } + return nil } - return retry.Retry(ctx, call, retry.WithStackTrace(), retry.WithIdempotent(true)) + return retry.Retry( + xcontext.WithTraceRetry(ctx, c.config.TraceRetry()), + call, + retry.WithIdempotent(true), + retry.WithStackTrace(), + ) } func (c *Client) alterResource( @@ -133,17 +156,28 @@ func (c *Client) DropResource( ctx context.Context, coordinationNodePath string, resourcePath string, -) (err error) { +) error { if c == nil { return xerrors.WithStackTrace(errNilClient) } call := func(ctx context.Context) error { - return xerrors.WithStackTrace(c.dropResource(ctx, coordinationNodePath, resourcePath)) + if err := c.dropResource(ctx, coordinationNodePath, resourcePath); err != nil { + return xerrors.WithStackTrace(err) + } + return nil } if !c.config.AutoRetry() { - return call(ctx) + if err := call(ctx); err != nil { + return xerrors.WithStackTrace(err) + } + return nil } - return retry.Retry(ctx, call, retry.WithStackTrace(), retry.WithIdempotent(true)) + return retry.Retry( + xcontext.WithTraceRetry(ctx, c.config.TraceRetry()), + call, + retry.WithIdempotent(true), + retry.WithStackTrace(), + ) } func (c *Client) dropResource( @@ -169,20 +203,30 @@ func (c *Client) ListResource( coordinationNodePath string, resourcePath string, recursive bool, -) (list []string, err error) { +) (list []string, _ error) { if c == nil { return list, xerrors.WithStackTrace(errNilClient) } - call := func(ctx context.Context) error { + call := func(ctx context.Context) (err error) { list, err = c.listResource(ctx, coordinationNodePath, resourcePath, recursive) - return xerrors.WithStackTrace(err) + if err != nil { + return xerrors.WithStackTrace(err) + } + return nil } if !c.config.AutoRetry() { - err = call(ctx) - return + if err := call(ctx); err != nil { + return nil, xerrors.WithStackTrace(err) + } + return list, nil } - err = retry.Retry(ctx, call, retry.WithIdempotent(true), retry.WithStackTrace()) - return + err := retry.Retry( + xcontext.WithTraceRetry(ctx, c.config.TraceRetry()), + call, + retry.WithIdempotent(true), + retry.WithStackTrace(), + ) + return list, err } func (c *Client) listResource( @@ -220,20 +264,31 @@ func (c *Client) DescribeResource( ctx context.Context, coordinationNodePath string, resourcePath string, -) (resource *ratelimiter.Resource, err error) { +) (*ratelimiter.Resource, error) { if c == nil { - return resource, xerrors.WithStackTrace(errNilClient) + return nil, xerrors.WithStackTrace(errNilClient) } - call := func(ctx context.Context) error { + var resource *ratelimiter.Resource + call := func(ctx context.Context) (err error) { resource, err = c.describeResource(ctx, coordinationNodePath, resourcePath) - return xerrors.WithStackTrace(err) + if err != nil { + return xerrors.WithStackTrace(err) + } + return nil } if !c.config.AutoRetry() { - err = call(ctx) - return + if err := call(ctx); err != nil { + return nil, xerrors.WithStackTrace(err) + } + return resource, nil } - err = retry.Retry(ctx, call, retry.WithIdempotent(true), retry.WithStackTrace()) - return + err := retry.Retry( + xcontext.WithTraceRetry(ctx, c.config.TraceRetry()), + call, + retry.WithIdempotent(true), + retry.WithStackTrace(), + ) + return resource, err } func (c *Client) describeResource( @@ -285,17 +340,27 @@ func (c *Client) AcquireResource( resourcePath string, amount uint64, opts ...options.AcquireOption, -) (err error) { +) error { if c == nil { return xerrors.WithStackTrace(errNilClient) } call := func(ctx context.Context) error { - return xerrors.WithStackTrace(c.acquireResource(ctx, coordinationNodePath, resourcePath, amount, opts...)) + if err := c.acquireResource(ctx, coordinationNodePath, resourcePath, amount, opts...); err != nil { + return xerrors.WithStackTrace(err) + } + return nil } if !c.config.AutoRetry() { - return call(ctx) + if err := call(ctx); err != nil { + return xerrors.WithStackTrace(err) + } + return nil } - return retry.Retry(ctx, call, retry.WithStackTrace()) + return retry.Retry( + xcontext.WithTraceRetry(ctx, c.config.TraceRetry()), + call, + retry.WithStackTrace(), + ) } func (c *Client) acquireResource( diff --git a/internal/repeater/repeater.go b/internal/repeater/repeater.go index bfb8e228b..ca7481625 100644 --- a/internal/repeater/repeater.go +++ b/internal/repeater/repeater.go @@ -65,6 +65,7 @@ type Event = string const ( EventUnknown = Event("") + EventInit = Event("init") EventTick = Event("tick") EventForce = Event("force") EventCancel = Event("cancel") @@ -79,7 +80,7 @@ func EventType(ctx context.Context) Event { return EventUnknown } -func withEvent(ctx context.Context, event Event) context.Context { +func WithEvent(ctx context.Context, event Event) context.Context { return context.WithValue(ctx, ctxEventTypeKey{}, event, @@ -140,7 +141,7 @@ func (r *repeater) wakeUp(ctx context.Context, e Event) (err error) { return err } - ctx = withEvent(ctx, e) + ctx = WithEvent(ctx, e) onDone := trace.DriverOnRepeaterWakeUp(r.trace, &ctx, r.name, e) defer func() { diff --git a/internal/scheme/client.go b/internal/scheme/client.go index d345e47e2..fad0345d4 100644 --- a/internal/scheme/client.go +++ b/internal/scheme/client.go @@ -100,20 +100,23 @@ func (c *Client) removeDirectory(ctx context.Context, path string) (err error) { return xerrors.WithStackTrace(err) } -func (c *Client) ListDirectory(ctx context.Context, path string) (d scheme.Directory, err error) { +func (c *Client) ListDirectory(ctx context.Context, path string) (d scheme.Directory, _ error) { if c == nil { return d, xerrors.WithStackTrace(errNilClient) } - call := func(ctx context.Context) error { + call := func(ctx context.Context) (err error) { d, err = c.listDirectory(ctx, path) - return xerrors.WithStackTrace(err) + if err != nil { + return xerrors.WithStackTrace(err) + } + return nil } if !c.config.AutoRetry() { - err = call(ctx) - return + err := call(ctx) + return d, err } - err = retry.Retry(ctx, call, retry.WithIdempotent(true), retry.WithStackTrace()) - return + err := retry.Retry(ctx, call, retry.WithIdempotent(true), retry.WithStackTrace()) + return d, err } func (c *Client) listDirectory(ctx context.Context, path string) (scheme.Directory, error) { @@ -164,10 +167,7 @@ func (c *Client) DescribePath(ctx context.Context, path string) (e scheme.Entry, return } err = retry.Retry(ctx, call, retry.WithIdempotent(true), retry.WithStackTrace()) - if err != nil { - return e, xerrors.WithStackTrace(err) - } - return e, nil + return e, err } func (c *Client) describePath(ctx context.Context, path string) (e scheme.Entry, err error) { diff --git a/internal/scripting/client.go b/internal/scripting/client.go index b79c2bea1..b80f15c3a 100644 --- a/internal/scripting/client.go +++ b/internal/scripting/client.go @@ -40,20 +40,20 @@ func (c *Client) Execute( ctx context.Context, query string, params *table.QueryParameters, -) (r result.Result, err error) { +) (r result.Result, _ error) { if c == nil { return r, xerrors.WithStackTrace(errNilClient) } - call := func(ctx context.Context) error { + call := func(ctx context.Context) (err error) { r, err = c.execute(ctx, query, params) return xerrors.WithStackTrace(err) } if !c.config.AutoRetry() { - err = call(ctx) - return + err := call(ctx) + return r, err } - err = retry.Retry(ctx, call, retry.WithStackTrace()) - return + err := retry.Retry(ctx, call, retry.WithStackTrace()) + return r, err } func (c *Client) execute( @@ -108,20 +108,20 @@ func (c *Client) Explain( ctx context.Context, query string, mode scripting.ExplainMode, -) (e table.ScriptingYQLExplanation, err error) { +) (e table.ScriptingYQLExplanation, _ error) { if c == nil { return e, xerrors.WithStackTrace(errNilClient) } - call := func(ctx context.Context) error { + call := func(ctx context.Context) (err error) { e, err = c.explain(ctx, query, mode) return xerrors.WithStackTrace(err) } if !c.config.AutoRetry() { - err = call(ctx) - return + err := call(ctx) + return e, err } - err = retry.Retry(ctx, call, retry.WithStackTrace(), retry.WithIdempotent(true)) - return + err := retry.Retry(ctx, call, retry.WithStackTrace(), retry.WithIdempotent(true)) + return e, err } func (c *Client) explain( @@ -172,20 +172,20 @@ func (c *Client) StreamExecute( ctx context.Context, query string, params *table.QueryParameters, -) (r result.StreamResult, err error) { +) (r result.StreamResult, _ error) { if c == nil { return r, xerrors.WithStackTrace(errNilClient) } - call := func(ctx context.Context) error { + call := func(ctx context.Context) (err error) { r, err = c.streamExecute(ctx, query, params) return xerrors.WithStackTrace(err) } if !c.config.AutoRetry() { - err = call(ctx) - return + err := call(ctx) + return r, err } - err = retry.Retry(ctx, call, retry.WithStackTrace()) - return + err := retry.Retry(ctx, call, retry.WithStackTrace()) + return r, err } func (c *Client) streamExecute( diff --git a/internal/stack/record.go b/internal/stack/record.go index 8b1482b5c..403f7f396 100644 --- a/internal/stack/record.go +++ b/internal/stack/record.go @@ -1,21 +1,157 @@ package stack import ( + "fmt" "runtime" - "strconv" "strings" + + "github.com/ydb-platform/ydb-go-sdk/v3/internal/allocator" ) -func Record(depth int) string { +type recordOptions struct { + packagePath bool + packageName bool + structName bool + functionName bool + fileName bool + line bool + lambdas bool +} + +type recordOption func(opts *recordOptions) + +func PackageName(b bool) recordOption { + return func(opts *recordOptions) { + opts.packageName = b + } +} + +func FunctionName(b bool) recordOption { + return func(opts *recordOptions) { + opts.functionName = b + } +} + +func FileName(b bool) recordOption { + return func(opts *recordOptions) { + opts.fileName = b + } +} + +func Line(b bool) recordOption { + return func(opts *recordOptions) { + opts.line = b + } +} + +func StructName(b bool) recordOption { + return func(opts *recordOptions) { + opts.structName = b + } +} + +func Lambda(b bool) recordOption { + return func(opts *recordOptions) { + opts.lambdas = b + } +} + +func PackagePath(b bool) recordOption { + return func(opts *recordOptions) { + opts.packagePath = b + } +} + +func Record(depth int, opts ...recordOption) string { + optionsHolder := recordOptions{ + packagePath: true, + packageName: true, + structName: true, + functionName: true, + fileName: true, + line: true, + lambdas: true, + } + for _, opt := range opts { + opt(&optionsHolder) + } function, file, line, _ := runtime.Caller(depth + 1) name := runtime.FuncForPC(function).Name() - return name + "(" + fileName(file) + ":" + strconv.Itoa(line) + ")" -} + var ( + pkgPath string + pkgName string + structName string + funcName string + ) + if i := strings.LastIndex(file, "/"); i > -1 { + file = file[i+1:] + } + if i := strings.LastIndex(name, "/"); i > -1 { + pkgPath, name = name[:i], name[i+1:] + } + split := strings.Split(name, ".") + lambdas := make([]string, 0, len(split)) + for i := range split { + elem := split[len(split)-i-1] + if !strings.HasPrefix(elem, "func") { + break + } + lambdas = append(lambdas, elem) + } + split = split[:len(split)-len(lambdas)] + if len(split) > 0 { + pkgName = split[0] + } + if len(split) > 1 { + funcName = split[len(split)-1] + } + if len(split) > 2 { + structName = split[1] + } -func fileName(original string) string { - i := strings.LastIndex(original, "/") - if i == -1 { - return original + buffer := allocator.Buffers.Get() + defer allocator.Buffers.Put(buffer) + if optionsHolder.packagePath { + buffer.WriteString(pkgPath) + } + if optionsHolder.packageName { + if buffer.Len() > 0 { + buffer.WriteByte('/') + } + buffer.WriteString(pkgName) + } + if optionsHolder.structName && len(structName) > 0 { + if buffer.Len() > 0 { + buffer.WriteByte('.') + } + buffer.WriteString(structName) + } + if optionsHolder.functionName { + if buffer.Len() > 0 { + buffer.WriteByte('.') + } + buffer.WriteString(funcName) + if optionsHolder.lambdas { + for i := range lambdas { + buffer.WriteByte('.') + buffer.WriteString(lambdas[len(lambdas)-i-1]) + } + } + } + if optionsHolder.fileName { + var closeBrace bool + if buffer.Len() > 0 { + buffer.WriteByte('(') + closeBrace = true + } + buffer.WriteString(file) + if optionsHolder.line { + buffer.WriteByte(':') + fmt.Fprintf(buffer, "%d", line) + } + if closeBrace { + buffer.WriteByte(')') + } } - return original[i+1:] + return buffer.String() } diff --git a/internal/stack/record_test.go b/internal/stack/record_test.go index 273bff226..7baee43b3 100644 --- a/internal/stack/record_test.go +++ b/internal/stack/record_test.go @@ -6,6 +6,23 @@ import ( "github.com/stretchr/testify/require" ) +type testStruct struct { + depth int + opts []recordOption +} + +func (s testStruct) TestFunc() string { + return func() string { + return Record(s.depth, s.opts...) + }() +} + +func (s *testStruct) TestPointerFunc() string { + return func() string { + return Record(s.depth, s.opts...) + }() +} + func TestRecord(t *testing.T) { for _, tt := range []struct { act string @@ -13,13 +30,13 @@ func TestRecord(t *testing.T) { }{ { act: Record(0), - exp: "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack.TestRecord(record_test.go:15)", + exp: "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack.TestRecord(record_test.go:32)", }, { act: func() string { return Record(1) }(), - exp: "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack.TestRecord(record_test.go:21)", + exp: "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack.TestRecord(record_test.go:38)", }, { act: func() string { @@ -27,7 +44,211 @@ func TestRecord(t *testing.T) { return Record(2) }() }(), - exp: "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack.TestRecord(record_test.go:29)", + exp: "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack.TestRecord(record_test.go:46)", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + PackagePath(false), + PackageName(false), + StructName(false), + FunctionName(false), + Lambda(false), + FileName(false), + Line(false), + }}.TestFunc(), + exp: "", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + // PackagePath(false), + PackageName(false), + StructName(false), + FunctionName(false), + Lambda(false), + FileName(false), + Line(false), + }}.TestFunc(), + exp: "github.com/ydb-platform/ydb-go-sdk/v3/internal", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + PackagePath(false), + // PackageName(false), + StructName(false), + FunctionName(false), + Lambda(false), + FileName(false), + Line(false), + }}.TestFunc(), + exp: "stack", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + PackagePath(false), + PackageName(false), + // StructName(false), + FunctionName(false), + Lambda(false), + FileName(false), + Line(false), + }}.TestFunc(), + exp: "testStruct", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + PackagePath(false), + PackageName(false), + StructName(false), + // FunctionName(false), + Lambda(false), + FileName(false), + Line(false), + }}.TestFunc(), + exp: "TestFunc", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + PackagePath(false), + PackageName(false), + StructName(false), + FunctionName(false), + // Lambda(false), + FileName(false), + Line(false), + }}.TestFunc(), + exp: "", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + PackagePath(false), + PackageName(false), + StructName(false), + // FunctionName(false), + // Lambda(false), + FileName(false), + Line(false), + }}.TestFunc(), + exp: "TestFunc.func1", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + PackagePath(false), + PackageName(false), + StructName(false), + FunctionName(false), + Lambda(false), + // FileName(false), + Line(false), + }}.TestFunc(), + exp: "record_test.go", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + PackagePath(false), + PackageName(false), + StructName(false), + FunctionName(false), + Lambda(false), + FileName(false), + // Line(false), + }}.TestFunc(), + exp: "", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + PackagePath(false), + PackageName(false), + StructName(false), + FunctionName(false), + Lambda(false), + // FileName(false), + // Line(false), + }}.TestFunc(), + exp: "record_test.go:16", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + // PackagePath(false), + // PackageName(false), + StructName(false), + FunctionName(false), + Lambda(false), + FileName(false), + Line(false), + }}.TestFunc(), + exp: "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + // PackagePath(false), + // PackageName(false), + // StructName(false), + FunctionName(false), + Lambda(false), + FileName(false), + Line(false), + }}.TestFunc(), + exp: "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack.testStruct", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + // PackagePath(false), + // PackageName(false), + // StructName(false), + // FunctionName(false), + Lambda(false), + FileName(false), + Line(false), + }}.TestFunc(), + exp: "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack.testStruct.TestFunc", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + // PackagePath(false), + // PackageName(false), + // StructName(false), + // FunctionName(false), + // Lambda(false), + FileName(false), + Line(false), + }}.TestFunc(), + exp: "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack.testStruct.TestFunc.func1", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + // PackagePath(false), + // PackageName(false), + // StructName(false), + // FunctionName(false), + // Lambda(false), + // FileName(false), + Line(false), + }}.TestFunc(), + exp: "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack.testStruct.TestFunc.func1(record_test.go)", + }, + { + act: testStruct{depth: 0, opts: []recordOption{ + // PackagePath(false), + // PackageName(false), + // StructName(false), + // FunctionName(false), + // Lambda(false), + // FileName(false), + // Line(false), + }}.TestFunc(), + exp: "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack.testStruct.TestFunc.func1(record_test.go:16)", + }, + { + act: (&testStruct{depth: 0, opts: []recordOption{ + // PackagePath(false), + // PackageName(false), + // StructName(false), + // FunctionName(false), + // Lambda(false), + // FileName(false), + // Line(false), + }}).TestPointerFunc(), + exp: "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack.(*testStruct).TestPointerFunc.func1(record_test.go:22)", }, } { t.Run("", func(t *testing.T) { diff --git a/internal/table/client.go b/internal/table/client.go index 63c2b5102..e5d944373 100644 --- a/internal/table/client.go +++ b/internal/table/client.go @@ -219,29 +219,29 @@ func (c *Client) createSession(ctx context.Context, opts ...createSessionOption) } } -func (c *Client) CreateSession(ctx context.Context, opts ...table.Option) (_ table.ClosableSession, err error) { +func (c *Client) CreateSession(ctx context.Context, opts ...table.Option) (_ table.ClosableSession, _ error) { if c == nil { return nil, xerrors.WithStackTrace(errNilClient) } if c.isClosed() { return nil, xerrors.WithStackTrace(errClosedClient) } - var s *session - createSession := func(ctx context.Context) (*session, error) { - s, err = c.createSession(ctx) + createSession := func(ctx context.Context) (_ *session, _ error) { + s, err := c.createSession(ctx) if err != nil { return nil, xerrors.WithStackTrace(err) } return s, nil } if !c.config.AutoRetry() { - s, err = createSession(ctx) + s, err := createSession(ctx) if err != nil { return nil, xerrors.WithStackTrace(err) } return s, nil } - err = retry.Retry(ctx, + var s *session + err := retry.Retry(ctx, func(ctx context.Context) (err error) { s, err = createSession(ctx) if err != nil { @@ -252,7 +252,6 @@ func (c *Client) CreateSession(ctx context.Context, opts ...table.Option) (_ tab append( []retry.Option{ retry.WithIdempotent(true), - retry.WithID("CreateSession"), retry.WithTrace(trace.Retry{ OnRetry: func(info trace.RetryLoopStartInfo) func(trace.RetryLoopIntermediateInfo) func(trace.RetryLoopDoneInfo) { onIntermediate := trace.TableOnCreateSession(c.config.Trace(), info.Context) @@ -267,10 +266,7 @@ func (c *Client) CreateSession(ctx context.Context, opts ...table.Option) (_ tab }, retryOptions(c.config.Trace(), opts...).RetryOptions..., )..., ) - if err != nil { - return nil, xerrors.WithStackTrace(err) - } - return s, nil + return s, err } func (c *Client) isClosed() bool { @@ -623,10 +619,8 @@ func (c *Client) Do(ctx context.Context, op table.Operation, opts ...table.Optio return xerrors.WithStackTrace(errClosedClient) } return do( - ctx, - c, - c.config, - op, + xcontext.WithTraceRetry(ctx, c.config.TraceRetry()), + c, c.config, op, retryOptions(c.config.Trace(), opts...), ) } @@ -639,10 +633,8 @@ func (c *Client) DoTx(ctx context.Context, op table.TxOperation, opts ...table.O return xerrors.WithStackTrace(errClosedClient) } err = doTx( - ctx, - c, - c.config, - op, + xcontext.WithTraceRetry(ctx, c.config.TraceRetry()), + c, c.config, op, retryOptions(c.config.Trace(), opts...), ) if err != nil { diff --git a/internal/table/retry.go b/internal/table/retry.go index f5ad6f93a..4fcde544c 100644 --- a/internal/table/retry.go +++ b/internal/table/retry.go @@ -3,6 +3,7 @@ package table import ( "context" + "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack" "github.com/ydb-platform/ydb-go-sdk/v3/internal/table/config" "github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors" "github.com/ydb-platform/ydb-go-sdk/v3/retry" @@ -161,8 +162,8 @@ func retryBackoff( p SessionProvider, op table.Operation, opts ...retry.Option, -) (err error) { - err = retry.Retry(markRetryCall(ctx), +) error { + return retry.Retry(markRetryCall(ctx), func(ctx context.Context) (err error) { var s *session @@ -185,10 +186,6 @@ func retryBackoff( }, opts..., ) - if err != nil { - return xerrors.WithStackTrace(err) - } - return nil } func retryOptions(trace *trace.Table, opts ...table.Option) *table.Options { @@ -197,6 +194,9 @@ func retryOptions(trace *trace.Table, opts ...table.Option) *table.Options { TxSettings: table.TxSettings( table.WithSerializableReadWrite(), ), + RetryOptions: []retry.Option{ + retry.WithLabel(stack.Record(1, stack.Lambda(false), stack.FileName(false))), + }, } for _, opt := range opts { if opt != nil { diff --git a/internal/table/transaction.go b/internal/table/transaction.go index d16912bbc..71ae8ed94 100644 --- a/internal/table/transaction.go +++ b/internal/table/transaction.go @@ -190,12 +190,7 @@ func (tx *transaction) CommitTx( // Rollback performs a rollback of the specified active transaction. func (tx *transaction) Rollback(ctx context.Context) (err error) { - onDone := trace.TableOnSessionTransactionRollback( - tx.s.config.Trace(), - &ctx, - tx.s, - tx, - ) + onDone := trace.TableOnSessionTransactionRollback(tx.s.config.Trace(), &ctx, tx.s, tx) defer func() { onDone(err) }() diff --git a/internal/xcontext/retry.go b/internal/xcontext/retry.go new file mode 100644 index 000000000..912aa1f13 --- /dev/null +++ b/internal/xcontext/retry.go @@ -0,0 +1,22 @@ +package xcontext + +import ( + "context" + + "github.com/ydb-platform/ydb-go-sdk/v3/trace" +) + +type ( + ctxTraceRetryKey struct{} +) + +func WithTraceRetry(ctx context.Context, t *trace.Retry) context.Context { + return context.WithValue(ctx, ctxTraceRetryKey{}, TraceRetry(ctx).Compose(t)) +} + +func TraceRetry(ctx context.Context) *trace.Retry { + if traceRetry, ok := ctx.Value(ctxTraceRetryKey{}).(*trace.Retry); ok { + return traceRetry + } + return &trace.Retry{} +} diff --git a/internal/xerrors/transport.go b/internal/xerrors/transport.go index 6390c2a32..3adb600cf 100644 --- a/internal/xerrors/transport.go +++ b/internal/xerrors/transport.go @@ -182,5 +182,11 @@ func TransportError(err error) Error { if errors.As(err, &t) { return t } + if s, ok := grpcStatus.FromError(err); ok { + return &transportError{ + status: s, + err: err, + } + } return nil } diff --git a/internal/xsql/badconn/badconn_go1.18_test.go b/internal/xsql/badconn/badconn_go1.18_test.go index d8c2608b6..4557563ab 100644 --- a/internal/xsql/badconn/badconn_go1.18_test.go +++ b/internal/xsql/badconn/badconn_go1.18_test.go @@ -8,6 +8,7 @@ import ( "database/sql/driver" "errors" "fmt" + "io" "testing" "github.com/stretchr/testify/require" @@ -113,20 +114,20 @@ var errsToCheck = []error{ xerrors.Operation( xerrors.WithStatusCode(Ydb.StatusIds_SESSION_BUSY), ), + xerrors.Retryable(errors.New("retryable error")), + xerrors.Retryable(errors.New("retryable error"), xerrors.WithDeleteSession()), + io.EOF, + xerrors.WithStackTrace(io.EOF), } func Test_badConnError_Is(t *testing.T) { for _, err := range errsToCheck { t.Run(err.Error(), func(t *testing.T) { - e := Map(err) - - if xerrors.Is(e, driver.ErrBadConn) { - require.True(t, xerrors.Is(e, err)) - } - - if errors.Is(e, driver.ErrBadConn) { - require.True(t, errors.Is(e, err)) - } + err = Map(err) + require.Equal(t, + xerrors.MustDeleteSession(err), + xerrors.Is(err, driver.ErrBadConn), + ) }) } } @@ -134,12 +135,7 @@ func Test_badConnError_Is(t *testing.T) { func Test_badConnError_As_Error(t *testing.T) { for _, err := range errsToCheck { t.Run(err.Error(), func(t *testing.T) { - var e xerrors.Error - if !xerrors.As(err, &e) { - t.Skip() - } - - require.True(t, xerrors.As(Map(err), &e)) + require.ErrorAs(t, Map(err), &err) //nolint:gosec }) } } diff --git a/internal/xsql/conn.go b/internal/xsql/conn.go index 8007a0c12..fe78d2f73 100644 --- a/internal/xsql/conn.go +++ b/internal/xsql/conn.go @@ -143,10 +143,10 @@ func (c *conn) isReady() bool { return c.session.Status() == table.SessionReady } -func (c *conn) PrepareContext(ctx context.Context, query string) (_ driver.Stmt, err error) { +func (c *conn) PrepareContext(ctx context.Context, query string) (_ driver.Stmt, finalErr error) { onDone := trace.DatabaseSQLOnConnPrepare(c.trace, &ctx, query) defer func() { - onDone(err) + onDone(finalErr) }() if !c.isReady() { return nil, badconn.Map(xerrors.WithStackTrace(errNotReadyConn)) @@ -162,7 +162,9 @@ func (c *conn) sinceLastUsage() time.Duration { return time.Since(time.Unix(c.lastUsage.Load(), 0)) } -func (c *conn) execContext(ctx context.Context, query string, args []driver.NamedValue) (_ driver.Result, err error) { +func (c *conn) execContext(ctx context.Context, query string, args []driver.NamedValue) ( + _ driver.Result, finalErr error, +) { var ( m = queryModeFromContext(ctx, c.defaultQueryMode) onDone = trace.DatabaseSQLOnConnExec(c.trace, &ctx, query, m.String(), xcontext.IsIdempotent(ctx), c.sinceLastUsage()) @@ -170,21 +172,17 @@ func (c *conn) execContext(ctx context.Context, query string, args []driver.Name defer func() { c.lastUsage.Store(time.Now().Unix()) - onDone(err) + onDone(finalErr) }() switch m { case DataQueryMode: - var ( - res result.Result - params *table.QueryParameters - ) - query, params, err = c.normalize(query, args...) + normalizedQuery, params, err := c.normalize(query, args...) if err != nil { return nil, xerrors.WithStackTrace(err) } - _, res, err = c.session.Execute(ctx, + _, res, err := c.session.Execute(ctx, txControl(ctx, c.defaultTxControl), - query, params, c.dataQueryOptions(ctx)..., + normalizedQuery, params, c.dataQueryOptions(ctx)..., ) if err != nil { return nil, badconn.Map(xerrors.WithStackTrace(err)) @@ -200,11 +198,11 @@ func (c *conn) execContext(ctx context.Context, query string, args []driver.Name } return resultNoRows{}, nil case SchemeQueryMode: - query, _, err = c.normalize(query) + normalizedQuery, _, err := c.normalize(query) if err != nil { return nil, xerrors.WithStackTrace(err) } - err = c.session.ExecuteSchemeQuery(ctx, query) + err = c.session.ExecuteSchemeQuery(ctx, normalizedQuery) if err != nil { return nil, badconn.Map(xerrors.WithStackTrace(err)) } @@ -214,11 +212,11 @@ func (c *conn) execContext(ctx context.Context, query string, args []driver.Name res result.StreamResult params *table.QueryParameters ) - query, params, err = c.normalize(query, args...) + normalizedQuery, params, err := c.normalize(query, args...) if err != nil { return nil, xerrors.WithStackTrace(err) } - res, err = c.connector.parent.Scripting().StreamExecute(ctx, query, params) + res, err = c.connector.parent.Scripting().StreamExecute(ctx, normalizedQuery, params) if err != nil { return nil, badconn.Map(xerrors.WithStackTrace(err)) } @@ -237,7 +235,7 @@ func (c *conn) execContext(ctx context.Context, query string, args []driver.Name } } -func (c *conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (_ driver.Result, err error) { +func (c *conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (_ driver.Result, _ error) { if !c.isReady() { return nil, badconn.Map(xerrors.WithStackTrace(errNotReadyConn)) } @@ -247,7 +245,7 @@ func (c *conn) ExecContext(ctx context.Context, query string, args []driver.Name return c.execContext(ctx, query, args) } -func (c *conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (_ driver.Rows, err error) { +func (c *conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (_ driver.Rows, _ error) { if !c.isReady() { return nil, badconn.Map(xerrors.WithStackTrace(errNotReadyConn)) } @@ -257,33 +255,26 @@ func (c *conn) QueryContext(ctx context.Context, query string, args []driver.Nam return c.queryContext(ctx, query, args) } -func (c *conn) queryContext(ctx context.Context, query string, args []driver.NamedValue) (_ driver.Rows, err error) { +func (c *conn) queryContext(ctx context.Context, query string, args []driver.NamedValue) ( + _ driver.Rows, finalErr error, +) { m := queryModeFromContext(ctx, c.defaultQueryMode) onDone := trace.DatabaseSQLOnConnQuery( - c.trace, - &ctx, - query, - m.String(), - xcontext.IsIdempotent(ctx), - c.sinceLastUsage(), + c.trace, &ctx, query, m.String(), xcontext.IsIdempotent(ctx), c.sinceLastUsage(), ) defer func() { c.lastUsage.Store(time.Now().Unix()) - onDone(err) + onDone(finalErr) }() switch m { case DataQueryMode: - var ( - res result.Result - params *table.QueryParameters - ) - query, params, err = c.normalize(query, args...) + normalizedQuery, params, err := c.normalize(query, args...) if err != nil { return nil, xerrors.WithStackTrace(err) } - _, res, err = c.session.Execute(ctx, + _, res, err := c.session.Execute(ctx, txControl(ctx, c.defaultTxControl), - query, params, c.dataQueryOptions(ctx)..., + normalizedQuery, params, c.dataQueryOptions(ctx)..., ) if err != nil { return nil, badconn.Map(xerrors.WithStackTrace(err)) @@ -296,16 +287,12 @@ func (c *conn) queryContext(ctx context.Context, query string, args []driver.Nam result: res, }, nil case ScanQueryMode: - var ( - res result.StreamResult - params *table.QueryParameters - ) - query, params, err = c.normalize(query, args...) + normalizedQuery, params, err := c.normalize(query, args...) if err != nil { return nil, xerrors.WithStackTrace(err) } - res, err = c.session.StreamExecuteScanQuery(ctx, - query, params, c.scanQueryOptions(ctx)..., + res, err := c.session.StreamExecuteScanQuery(ctx, + normalizedQuery, params, c.scanQueryOptions(ctx)..., ) if err != nil { return nil, badconn.Map(xerrors.WithStackTrace(err)) @@ -318,12 +305,11 @@ func (c *conn) queryContext(ctx context.Context, query string, args []driver.Nam result: res, }, nil case ExplainQueryMode: - var exp table.DataQueryExplanation - query, _, err = c.normalize(query, args...) + normalizedQuery, _, err := c.normalize(query, args...) if err != nil { return nil, xerrors.WithStackTrace(err) } - exp, err = c.session.Explain(ctx, query) + exp, err := c.session.Explain(ctx, normalizedQuery) if err != nil { return nil, badconn.Map(xerrors.WithStackTrace(err)) } @@ -334,15 +320,11 @@ func (c *conn) queryContext(ctx context.Context, query string, args []driver.Nam }, }, nil case ScriptingQueryMode: - var ( - res result.StreamResult - params *table.QueryParameters - ) - query, params, err = c.normalize(query, args...) + normalizedQuery, params, err := c.normalize(query, args...) if err != nil { return nil, xerrors.WithStackTrace(err) } - res, err = c.connector.parent.Scripting().StreamExecute(ctx, query, params) + res, err := c.connector.parent.Scripting().StreamExecute(ctx, normalizedQuery, params) if err != nil { return nil, badconn.Map(xerrors.WithStackTrace(err)) } @@ -358,28 +340,31 @@ func (c *conn) queryContext(ctx context.Context, query string, args []driver.Nam } } -func (c *conn) Ping(ctx context.Context) (err error) { +func (c *conn) Ping(ctx context.Context) (finalErr error) { onDone := trace.DatabaseSQLOnConnPing(c.trace, &ctx) defer func() { - onDone(err) + onDone(finalErr) }() if !c.isReady() { return badconn.Map(xerrors.WithStackTrace(errNotReadyConn)) } - if err = c.session.KeepAlive(ctx); err != nil { + if err := c.session.KeepAlive(ctx); err != nil { return badconn.Map(xerrors.WithStackTrace(err)) } return nil } -func (c *conn) Close() (err error) { +func (c *conn) Close() (finalErr error) { if c.closed.CompareAndSwap(false, true) { c.connector.detach(c) onDone := trace.DatabaseSQLOnConnClose(c.trace) defer func() { - onDone(err) + onDone(finalErr) }() - err = c.session.Close(context.Background()) + if c.currentTx != nil { + _ = c.currentTx.Rollback() + } + err := c.session.Close(context.Background()) if err != nil { return badconn.Map(xerrors.WithStackTrace(err)) } @@ -405,26 +390,44 @@ func (c *conn) normalize(q string, args ...driver.NamedValue) (query string, _ * }()...) } -func (c *conn) BeginTx(ctx context.Context, txOptions driver.TxOptions) (_ driver.Tx, err error) { +func (c *conn) ID() string { + return c.session.ID() +} + +func (c *conn) BeginTx(ctx context.Context, txOptions driver.TxOptions) (_ driver.Tx, finalErr error) { var tx currentTx onDone := trace.DatabaseSQLOnConnBegin(c.trace, &ctx) defer func() { - onDone(tx, err) + onDone(tx, finalErr) }() if c.currentTx != nil { - return nil, xerrors.WithStackTrace(&ErrConnAlreadyHaveTx{ - currentTx: c.currentTx.ID(), - }) + return nil, xerrors.WithStackTrace( + xerrors.Retryable( + &ErrConnAlreadyHaveTx{ + currentTx: c.currentTx.ID(), + }, + xerrors.WithDeleteSession(), + ), + ) } m := queryModeFromContext(ctx, c.defaultQueryMode) beginTx, isKnown := c.beginTxFuncs[m] if !isKnown { - return nil, badconn.Map(xerrors.WithStackTrace(fmt.Errorf("wrong query mode: %s", m.String()))) + return nil, badconn.Map( + xerrors.WithStackTrace( + xerrors.Retryable( + fmt.Errorf("wrong query mode: %s", m.String()), + xerrors.WithDeleteSession(), + xerrors.WithName("WRONG_QUERY_MODE"), + ), + ), + ) } + var err error tx, err = beginTx(ctx, txOptions) if err != nil { return nil, xerrors.WithStackTrace(err) @@ -433,14 +436,14 @@ func (c *conn) BeginTx(ctx context.Context, txOptions driver.TxOptions) (_ drive return tx, nil } -func (c *conn) Version(_ context.Context) (_ string, err error) { +func (c *conn) Version(_ context.Context) (_ string, _ error) { const version = "default" return version, nil } -func (c *conn) IsTableExists(ctx context.Context, tableName string) (tableExists bool, err error) { +func (c *conn) IsTableExists(ctx context.Context, tableName string) (tableExists bool, _ error) { tableName = c.normalizePath(tableName) - tableExists, err = helpers.IsEntryExists(ctx, + tableExists, err := helpers.IsEntryExists(ctx, c.connector.parent.Scheme(), tableName, scheme.EntryTable, scheme.EntryColumnTable, ) @@ -450,7 +453,7 @@ func (c *conn) IsTableExists(ctx context.Context, tableName string) (tableExists return tableExists, nil } -func (c *conn) IsColumnExists(ctx context.Context, tableName, columnName string) (columnExists bool, err error) { +func (c *conn) IsColumnExists(ctx context.Context, tableName, columnName string) (columnExists bool, _ error) { tableName = c.normalizePath(tableName) tableExists, err := helpers.IsEntryExists(ctx, c.connector.parent.Scheme(), tableName, @@ -482,7 +485,7 @@ func (c *conn) IsColumnExists(ctx context.Context, tableName, columnName string) return columnExists, nil } -func (c *conn) GetColumns(ctx context.Context, tableName string) (columns []string, err error) { +func (c *conn) GetColumns(ctx context.Context, tableName string) (columns []string, _ error) { tableName = c.normalizePath(tableName) tableExists, err := helpers.IsEntryExists(ctx, c.connector.parent.Scheme(), tableName, @@ -511,7 +514,7 @@ func (c *conn) GetColumns(ctx context.Context, tableName string) (columns []stri return columns, nil } -func (c *conn) GetColumnType(ctx context.Context, tableName, columnName string) (dataType string, err error) { +func (c *conn) GetColumnType(ctx context.Context, tableName, columnName string) (dataType string, _ error) { tableName = c.normalizePath(tableName) tableExists, err := helpers.IsEntryExists(ctx, c.connector.parent.Scheme(), tableName, @@ -551,7 +554,7 @@ func (c *conn) GetColumnType(ctx context.Context, tableName, columnName string) return dataType, nil } -func (c *conn) GetPrimaryKeys(ctx context.Context, tableName string) (pkCols []string, err error) { +func (c *conn) GetPrimaryKeys(ctx context.Context, tableName string) (pkCols []string, _ error) { tableName = c.normalizePath(tableName) tableExists, err := helpers.IsEntryExists(ctx, c.connector.parent.Scheme(), tableName, @@ -578,7 +581,7 @@ func (c *conn) GetPrimaryKeys(ctx context.Context, tableName string) (pkCols []s return pkCols, nil } -func (c *conn) IsPrimaryKey(ctx context.Context, tableName, columnName string) (ok bool, err error) { +func (c *conn) IsPrimaryKey(ctx context.Context, tableName, columnName string) (ok bool, _ error) { tableName = c.normalizePath(tableName) tableExists, err := helpers.IsEntryExists(ctx, c.connector.parent.Scheme(), tableName, @@ -629,14 +632,14 @@ func isSysDir(databaseName, dirAbsPath string) bool { } func (c *conn) getTables(ctx context.Context, absPath string, recursive, excludeSysDirs bool) ( - tables []string, err error, + tables []string, _ error, ) { if excludeSysDirs && isSysDir(c.connector.parent.Name(), absPath) { return nil, nil } var d scheme.Directory - err = retry.Retry(ctx, func(ctx context.Context) (err error) { + err := retry.Retry(ctx, func(ctx context.Context) (err error) { d, err = c.connector.parent.Scheme().ListDirectory(ctx, absPath) return err }, retry.WithIdempotent(true)) @@ -667,12 +670,12 @@ func (c *conn) getTables(ctx context.Context, absPath string, recursive, exclude } func (c *conn) GetTables(ctx context.Context, folder string, recursive, excludeSysDirs bool) ( - tables []string, err error, + tables []string, _ error, ) { absPath := c.normalizePath(folder) var e scheme.Entry - err = retry.Retry(ctx, func(ctx context.Context) (err error) { + err := retry.Retry(ctx, func(ctx context.Context) (err error) { e, err = c.connector.parent.Scheme().DescribePath(ctx, absPath) return err }, retry.WithIdempotent(true)) @@ -700,7 +703,7 @@ func (c *conn) GetTables(ctx context.Context, folder string, recursive, excludeS } } -func (c *conn) GetIndexes(ctx context.Context, tableName string) (indexes []string, err error) { +func (c *conn) GetIndexes(ctx context.Context, tableName string) (indexes []string, _ error) { tableName = c.normalizePath(tableName) tableExists, err := helpers.IsEntryExists(ctx, c.connector.parent.Scheme(), tableName, @@ -730,7 +733,7 @@ func (c *conn) GetIndexes(ctx context.Context, tableName string) (indexes []stri return indexes, nil } -func (c *conn) GetIndexColumns(ctx context.Context, tableName, indexName string) (columns []string, err error) { +func (c *conn) GetIndexColumns(ctx context.Context, tableName, indexName string) (columns []string, _ error) { tableName = c.normalizePath(tableName) tableExists, err := helpers.IsEntryExists(ctx, c.connector.parent.Scheme(), tableName, diff --git a/internal/xsql/connector.go b/internal/xsql/connector.go index 9735d3109..447b6e045 100644 --- a/internal/xsql/connector.go +++ b/internal/xsql/connector.go @@ -312,6 +312,15 @@ type driverWrapper struct { c *Connector } +func (d *driverWrapper) TraceRetry() *trace.Retry { + if tracer, has := d.c.parent.(interface { + TraceRetry() *trace.Retry + }); has { + return tracer.TraceRetry() + } + return &trace.Retry{} +} + func (d *driverWrapper) Open(_ string) (driver.Conn, error) { return nil, ErrUnsupported } diff --git a/internal/xsql/errors.go b/internal/xsql/errors.go index dffb8d7e4..65c36486d 100644 --- a/internal/xsql/errors.go +++ b/internal/xsql/errors.go @@ -12,7 +12,6 @@ var ( errDeprecated = driver.ErrSkip errConnClosedEarly = xerrors.Retryable(errors.New("conn closed early"), xerrors.WithDeleteSession()) errNotReadyConn = xerrors.Retryable(errors.New("conn not ready"), xerrors.WithDeleteSession()) - errTxAlreadyDone = xerrors.Retryable(errors.New("tx already committed or rollbacked"), xerrors.WithDeleteSession()) ) type ErrConnAlreadyHaveTx struct { diff --git a/internal/xsql/rows.go b/internal/xsql/rows.go index a3a9207f4..b3adf339b 100644 --- a/internal/xsql/rows.go +++ b/internal/xsql/rows.go @@ -86,9 +86,9 @@ func (r *rows) ColumnTypeNullable(index int) (nullable, ok bool) { return nullables[index], true } -func (r *rows) NextResultSet() (err error) { +func (r *rows) NextResultSet() (finalErr error) { r.nextSet.Do(func() {}) - err = r.result.NextResultSetErr(context.Background()) + err := r.result.NextResultSetErr(context.Background()) if err != nil { return badconn.Map(xerrors.WithStackTrace(err)) } @@ -99,7 +99,8 @@ func (r *rows) HasNextResultSet() bool { return r.result.HasNextResultSet() } -func (r *rows) Next(dst []driver.Value) (err error) { +func (r *rows) Next(dst []driver.Value) error { + var err error r.nextSet.Do(func() { err = r.result.NextResultSetErr(context.Background()) }) diff --git a/internal/xsql/stmt.go b/internal/xsql/stmt.go index 877cdcd5f..516b4c197 100644 --- a/internal/xsql/stmt.go +++ b/internal/xsql/stmt.go @@ -23,10 +23,10 @@ var ( _ driver.StmtExecContext = &stmt{} ) -func (s *stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (_ driver.Rows, err error) { +func (s *stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (_ driver.Rows, finalErr error) { onDone := trace.DatabaseSQLOnStmtQuery(s.trace, &ctx, s.query) defer func() { - onDone(err) + onDone(finalErr) }() if !s.conn.isReady() { return nil, badconn.Map(xerrors.WithStackTrace(errNotReadyConn)) @@ -39,10 +39,10 @@ func (s *stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (_ dr } } -func (s *stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (_ driver.Result, err error) { +func (s *stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (_ driver.Result, finalErr error) { onDone := trace.DatabaseSQLOnStmtExec(s.trace, &ctx, s.query) defer func() { - onDone(err) + onDone(finalErr) }() if !s.conn.isReady() { return nil, badconn.Map(xerrors.WithStackTrace(errNotReadyConn)) @@ -59,10 +59,10 @@ func (s *stmt) NumInput() int { return -1 } -func (s *stmt) Close() (err error) { +func (s *stmt) Close() (finalErr error) { onDone := trace.DatabaseSQLOnStmtClose(s.trace) defer func() { - onDone(err) + onDone(finalErr) }() return nil } diff --git a/internal/xsql/tx.go b/internal/xsql/tx.go index c6ce43688..d92d66aa3 100644 --- a/internal/xsql/tx.go +++ b/internal/xsql/tx.go @@ -4,13 +4,14 @@ import ( "context" "database/sql/driver" "fmt" + "runtime/debug" + "strings" "github.com/ydb-platform/ydb-go-sdk/v3/internal/xcontext" "github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors" "github.com/ydb-platform/ydb-go-sdk/v3/internal/xsql/badconn" "github.com/ydb-platform/ydb-go-sdk/v3/internal/xsql/isolation" "github.com/ydb-platform/ydb-go-sdk/v3/table" - "github.com/ydb-platform/ydb-go-sdk/v3/table/result" "github.com/ydb-platform/ydb-go-sdk/v3/trace" ) @@ -18,7 +19,12 @@ type tx struct { conn *conn ctx context.Context tx table.Transaction - done bool + + calls []string +} + +func stackTrace() string { + return strings.SplitN(string(debug.Stack()), "\n", 8)[7] } var ( @@ -29,7 +35,15 @@ var ( ) func (c *conn) beginTx(ctx context.Context, txOptions driver.TxOptions) (currentTx, error) { - var txc table.TxOption + if c.currentTx != nil { + return nil, badconn.Map( + xerrors.WithStackTrace( + fmt.Errorf("broken conn state: conn=%q already have current tx=%q", + c.ID(), c.currentTx.ID(), + ), + ), + ) + } txc, err := isolation.ToYDB(txOptions) if err != nil { return nil, xerrors.WithStackTrace(err) @@ -39,10 +53,10 @@ func (c *conn) beginTx(ctx context.Context, txOptions driver.TxOptions) (current return nil, badconn.Map(xerrors.WithStackTrace(err)) } c.currentTx = &tx{ - conn: c, - ctx: ctx, - tx: transaction, - done: false, + conn: c, + ctx: ctx, + tx: transaction, + calls: []string{stackTrace()}, } return c.currentTx, nil } @@ -51,68 +65,89 @@ func (tx *tx) ID() string { return tx.tx.ID() } -func (tx *tx) Commit() (err error) { - if tx.done { - return badconn.Map(xerrors.WithStackTrace(errTxAlreadyDone)) +func (tx *tx) checkTxState() error { + if tx.conn.currentTx == tx { + return nil } + if tx.conn.currentTx == nil { + return fmt.Errorf("broken conn state: tx=%q not related to conn=%q", + tx.ID(), tx.conn.ID(), + ) + } + return fmt.Errorf("broken conn state: tx=%s not related to conn=%q (conn have current tx=%q)", + tx.conn.currentTx.ID(), tx.conn.ID(), tx.ID(), + ) +} + +func (tx *tx) Commit() (finalErr error) { + defer func() { + tx.calls = append(tx.calls, stackTrace()) + }() onDone := trace.DatabaseSQLOnTxCommit(tx.conn.trace, &tx.ctx, tx) defer func() { - onDone(err) + onDone(finalErr) }() + if err := tx.checkTxState(); err != nil { + return badconn.Map(xerrors.WithStackTrace(err)) + } defer func() { tx.conn.currentTx = nil }() - if !tx.conn.isReady() { - return badconn.Map(xerrors.WithStackTrace(errNotReadyConn)) - } - _, err = tx.tx.CommitTx(tx.ctx) + _, err := tx.tx.CommitTx(tx.ctx) if err != nil { return badconn.Map(xerrors.WithStackTrace(err)) } - tx.done = true return nil } -func (tx *tx) Rollback() (err error) { - if tx.done { - return badconn.Map(xerrors.WithStackTrace(errTxAlreadyDone)) - } +func (tx *tx) Rollback() (finalErr error) { + defer func() { + tx.calls = append(tx.calls, stackTrace()) + }() onDone := trace.DatabaseSQLOnTxRollback(tx.conn.trace, &tx.ctx, tx) defer func() { - onDone(err) + onDone(finalErr) }() + if err := tx.checkTxState(); err != nil { + return badconn.Map(xerrors.WithStackTrace(err)) + } defer func() { tx.conn.currentTx = nil }() - if !tx.conn.isReady() { - return badconn.Map(xerrors.WithStackTrace(errNotReadyConn)) - } - err = tx.tx.Rollback(tx.ctx) + err := tx.tx.Rollback(tx.ctx) if err != nil { return badconn.Map(xerrors.WithStackTrace(err)) } - tx.done = true return err } -func (tx *tx) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (_ driver.Rows, err error) { +func (tx *tx) QueryContext(ctx context.Context, query string, args []driver.NamedValue) ( + _ driver.Rows, finalErr error, +) { + defer func() { + tx.calls = append(tx.calls, stackTrace()) + }() onDone := trace.DatabaseSQLOnTxQuery(tx.conn.trace, &ctx, tx.ctx, tx, query, xcontext.IsIdempotent(ctx)) defer func() { - onDone(err) + onDone(finalErr) }() m := queryModeFromContext(ctx, tx.conn.defaultQueryMode) if m != DataQueryMode { - return nil, badconn.Map(xerrors.WithStackTrace(fmt.Errorf("wrong query mode: %s", m.String()))) - } - var ( - res result.Result - params *table.QueryParameters - ) - query, params, err = tx.conn.normalize(query, args...) + return nil, badconn.Map( + xerrors.WithStackTrace( + xerrors.Retryable( + fmt.Errorf("wrong query mode: %s", m.String()), + xerrors.WithDeleteSession(), + xerrors.WithName("WRONG_QUERY_MODE"), + ), + ), + ) + } + query, params, err := tx.conn.normalize(query, args...) if err != nil { return nil, xerrors.WithStackTrace(err) } - res, err = tx.tx.Execute(ctx, + res, err := tx.tx.Execute(ctx, query, params, tx.conn.dataQueryOptions(ctx)..., ) if err != nil { @@ -127,17 +162,29 @@ func (tx *tx) QueryContext(ctx context.Context, query string, args []driver.Name }, nil } -func (tx *tx) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (_ driver.Result, err error) { +func (tx *tx) ExecContext(ctx context.Context, query string, args []driver.NamedValue) ( + _ driver.Result, finalErr error, +) { + defer func() { + tx.calls = append(tx.calls, stackTrace()) + }() onDone := trace.DatabaseSQLOnTxExec(tx.conn.trace, &ctx, tx.ctx, tx, query, xcontext.IsIdempotent(ctx)) defer func() { - onDone(err) + onDone(finalErr) }() m := queryModeFromContext(ctx, tx.conn.defaultQueryMode) if m != DataQueryMode { - return nil, badconn.Map(xerrors.WithStackTrace(fmt.Errorf("wrong query mode: %s", m.String()))) - } - var params *table.QueryParameters - query, params, err = tx.conn.normalize(query, args...) + return nil, badconn.Map( + xerrors.WithStackTrace( + xerrors.Retryable( + fmt.Errorf("wrong query mode: %s", m.String()), + xerrors.WithDeleteSession(), + xerrors.WithName("WRONG_QUERY_MODE"), + ), + ), + ) + } + query, params, err := tx.conn.normalize(query, args...) if err != nil { return nil, xerrors.WithStackTrace(err) } diff --git a/log/retry.go b/log/retry.go index e7ec38f19..4f0c582b6 100644 --- a/log/retry.go +++ b/log/retry.go @@ -25,17 +25,17 @@ func internalRetry(l *wrapper, d trace.Detailer) (t trace.Retry) { return nil } ctx := with(*info.Context, TRACE, "ydb", "retry") - id := info.ID + label := info.Label idempotent := info.Idempotent l.Log(ctx, "start", - String("id", id), + String("label", label), Bool("idempotent", idempotent), ) start := time.Now() return func(info trace.RetryLoopIntermediateInfo) func(trace.RetryLoopDoneInfo) { if info.Error == nil { l.Log(ctx, "attempt done", - String("id", id), + String("label", label), latencyField(start), ) } else { @@ -46,7 +46,7 @@ func internalRetry(l *wrapper, d trace.Detailer) (t trace.Retry) { m := retry.Check(info.Error) l.Log(WithLevel(ctx, lvl), "attempt failed", Error(info.Error), - String("id", id), + String("label", label), latencyField(start), Bool("retryable", m.MustRetry(idempotent)), Int64("code", m.StatusCode()), @@ -57,7 +57,7 @@ func internalRetry(l *wrapper, d trace.Detailer) (t trace.Retry) { return func(info trace.RetryLoopDoneInfo) { if info.Error == nil { l.Log(ctx, "done", - String("id", id), + String("label", label), latencyField(start), Int("attempts", info.Attempts), ) @@ -69,7 +69,7 @@ func internalRetry(l *wrapper, d trace.Detailer) (t trace.Retry) { m := retry.Check(info.Error) l.Log(WithLevel(ctx, lvl), "failed", Error(info.Error), - String("id", id), + String("label", label), latencyField(start), Int("attempts", info.Attempts), Bool("retryable", m.MustRetry(idempotent)), diff --git a/metrics/context.go b/metrics/context.go new file mode 100644 index 000000000..2745a966d --- /dev/null +++ b/metrics/context.go @@ -0,0 +1,16 @@ +package metrics + +import "context" + +type ctxQueryLabel struct{} + +func WithQueryLabel(ctx context.Context, label string) context.Context { + return context.WithValue(ctx, ctxQueryLabel{}, label) +} + +func queryLabel(ctx context.Context) (label string) { + if label, has := ctx.Value(ctxQueryLabel{}).(string); has { + return label + } + return "" +} diff --git a/metrics/driver.go b/metrics/driver.go index fb15b1681..257c2d4e4 100644 --- a/metrics/driver.go +++ b/metrics/driver.go @@ -10,26 +10,34 @@ import ( // driver makes driver with New publishing func driver(config Config) (t trace.Driver) { + config = config.WithSystem("driver") + endpoints := config.WithSystem("balancer").GaugeVec("endpoints", "local_dc", "az") + balancersDiscoveries := config.WithSystem("balancer").CounterVec("discoveries", "status", "cause") + balancerUpdates := config.WithSystem("balancer").CounterVec("updates", "cause") + conns := config.GaugeVec("conns", "endpoint", "node_id") + banned := config.WithSystem("conn").GaugeVec("banned", "endpoint", "node_id", "cause") + requests := config.WithSystem("conn").CounterVec("requests", "status", "method", "endpoint", "node_id") + tli := config.CounterVec("transaction_locks_invalidated") + type endpointKey struct { localDC bool az string } - - config = config.WithSystem("driver") - endpoints := config.WithSystem("balancer").GaugeVec("endpoints", "local_dc", "az") - balancerUpdates := config.WithSystem("balancer").CounterVec("updates", "force") - conns := config.GaugeVec("conns", "address", "node_id") - banned := config.WithSystem("conn").GaugeVec("banned", "address", "node_id", "cause") - requests := config.WithSystem("conn").CounterVec("requests", "status", "method") - tli := config.CounterVec("transaction_locks_invalidated") knownEndpoints := make(map[endpointKey]struct{}) + t.OnConnInvoke = func(info trace.DriverConnInvokeStartInfo) func(trace.DriverConnInvokeDoneInfo) { - method := info.Method + var ( + method = info.Method + endpoint = info.Endpoint.Address() + nodeID = info.Endpoint.NodeID() + ) return func(info trace.DriverConnInvokeDoneInfo) { if config.Details()&trace.DriverConnEvents != 0 { requests.With(map[string]string{ - "status": errorBrief(info.Error), - "method": string(method), + "status": errorBrief(info.Error), + "method": string(method), + "endpoint": endpoint, + "node_id": strconv.FormatUint(uint64(nodeID), 10), }).Inc() if xerrors.IsOperationErrorTransactionLocksInvalidated(info.Error) { tli.With(nil).Inc() @@ -42,13 +50,19 @@ func driver(config Config) (t trace.Driver) { ) func( trace.DriverConnNewStreamDoneInfo, ) { - method := info.Method + var ( + method = info.Method + endpoint = info.Endpoint.Address() + nodeID = info.Endpoint.NodeID() + ) return func(info trace.DriverConnNewStreamRecvInfo) func(trace.DriverConnNewStreamDoneInfo) { return func(info trace.DriverConnNewStreamDoneInfo) { if config.Details()&trace.DriverConnEvents != 0 { requests.With(map[string]string{ - "status": errorBrief(info.Error), - "method": string(method), + "status": errorBrief(info.Error), + "method": string(method), + "endpoint": endpoint, + "node_id": strconv.FormatUint(uint64(nodeID), 10), }).Inc() } } @@ -57,19 +71,30 @@ func driver(config Config) (t trace.Driver) { t.OnConnBan = func(info trace.DriverConnBanStartInfo) func(trace.DriverConnBanDoneInfo) { if config.Details()&trace.DriverConnEvents != 0 { banned.With(map[string]string{ - "address": info.Endpoint.Address(), - "node_id": idToString(info.Endpoint.NodeID()), - "cause": errorBrief(info.Cause), + "endpoint": info.Endpoint.Address(), + "node_id": idToString(info.Endpoint.NodeID()), + "cause": errorBrief(info.Cause), }).Add(1) } return nil } + t.OnBalancerClusterDiscoveryAttempt = func(info trace.DriverBalancerClusterDiscoveryAttemptStartInfo) func( + trace.DriverBalancerClusterDiscoveryAttemptDoneInfo, + ) { + eventType := repeater.EventType(*info.Context) + return func(info trace.DriverBalancerClusterDiscoveryAttemptDoneInfo) { + balancersDiscoveries.With(map[string]string{ + "status": errorBrief(info.Error), + "cause": eventType, + }).Inc() + } + } t.OnBalancerUpdate = func(info trace.DriverBalancerUpdateStartInfo) func(trace.DriverBalancerUpdateDoneInfo) { eventType := repeater.EventType(*info.Context) return func(info trace.DriverBalancerUpdateDoneInfo) { if config.Details()&trace.DriverBalancerEvents != 0 { balancerUpdates.With(map[string]string{ - "force": strconv.FormatBool(eventType == repeater.EventForce), + "cause": eventType, }).Inc() newEndpoints := make(map[endpointKey]int, len(info.Endpoints)) for _, e := range info.Endpoints { @@ -99,14 +124,14 @@ func driver(config Config) (t trace.Driver) { } } t.OnConnDial = func(info trace.DriverConnDialStartInfo) func(trace.DriverConnDialDoneInfo) { - address := info.Endpoint.Address() + endpoint := info.Endpoint.Address() nodeID := info.Endpoint.NodeID() return func(info trace.DriverConnDialDoneInfo) { if config.Details()&trace.DriverConnEvents != 0 { if info.Error == nil { conns.With(map[string]string{ - "address": address, - "node_id": idToString(nodeID), + "endpoint": endpoint, + "node_id": idToString(nodeID), }).Add(1) } } @@ -115,8 +140,8 @@ func driver(config Config) (t trace.Driver) { t.OnConnClose = func(info trace.DriverConnCloseStartInfo) func(trace.DriverConnCloseDoneInfo) { if config.Details()&trace.DriverConnEvents != 0 { conns.With(map[string]string{ - "address": info.Endpoint.Address(), - "node_id": idToString(info.Endpoint.NodeID()), + "endpoint": info.Endpoint.Address(), + "node_id": idToString(info.Endpoint.NodeID()), }).Add(-1) } return nil diff --git a/metrics/error.go b/metrics/error.go index 56ac88e07..e94a45a54 100644 --- a/metrics/error.go +++ b/metrics/error.go @@ -2,11 +2,11 @@ package metrics import ( "context" - "errors" "io" "net" "github.com/ydb-platform/ydb-go-sdk/v3" + "github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors" ) func errorBrief(err error) string { @@ -18,15 +18,19 @@ func errorBrief(err error) string { ydbErr ydb.Error ) switch { - case errors.As(err, &netErr): - return "network/" + netErr.Op + " -> " + netErr.Err.Error() - case errors.Is(err, io.EOF): + case xerrors.Is(err, io.EOF): return "io/EOF" - case errors.Is(err, context.DeadlineExceeded): + case xerrors.As(err, &netErr): + return "network/" + netErr.Op + "[" + netErr.Addr.String() + "](" + errorBrief(netErr.Err) + ")" + case xerrors.Is(err, context.DeadlineExceeded): return "context/DeadlineExceeded" - case errors.Is(err, context.Canceled): + case xerrors.Is(err, context.Canceled): return "context/Canceled" - case errors.As(err, &ydbErr): + case xerrors.IsTransportError(err): + return xerrors.TransportError(err).Name() + case xerrors.IsOperationError(err): + return xerrors.OperationError(err).Name() + case xerrors.As(err, &ydbErr): return ydbErr.Name() default: return "unknown" diff --git a/metrics/error_test.go b/metrics/error_test.go new file mode 100644 index 000000000..1b6f3c3d4 --- /dev/null +++ b/metrics/error_test.go @@ -0,0 +1,251 @@ +package metrics + +import ( + "fmt" + "io" + "net" + "testing" + + "github.com/stretchr/testify/require" + "github.com/ydb-platform/ydb-go-genproto/protos/Ydb" + grpcCodes "google.golang.org/grpc/codes" + grpcStatus "google.golang.org/grpc/status" + + "github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors" +) + +func TestErrorBrief(t *testing.T) { + for _, tt := range []struct { + err error + brief string + }{ + { + err: fmt.Errorf("test"), + brief: "unknown", + }, + { + err: io.EOF, + brief: "io/EOF", + }, + { + err: &net.OpError{ + Op: "write", + Addr: &net.TCPAddr{ + IP: []byte{0, 0, 0, 0}, + Port: 2135, + }, + Err: grpcStatus.Error(grpcCodes.Unavailable, ""), + }, + brief: "network/write[0.0.0.0:2135](transport/Unavailable)", + }, + { + err: xerrors.Retryable(fmt.Errorf("test")), + brief: "retryable/CUSTOM", + }, + { + err: xerrors.Retryable(fmt.Errorf("test"), xerrors.WithName("SomeName")), + brief: "retryable/SomeName", + }, + { + err: xerrors.WithStackTrace(xerrors.Retryable(fmt.Errorf("test"))), + brief: "retryable/CUSTOM", + }, + { + err: xerrors.WithStackTrace( + xerrors.Retryable(fmt.Errorf("test"), xerrors.WithName("SomeName")), + ), + brief: "retryable/SomeName", + }, + { + err: xerrors.WithStackTrace(&net.OpError{ + Op: "write", + Addr: &net.TCPAddr{ + IP: []byte{0, 0, 0, 0}, + Port: 2135, + }, + Err: grpcStatus.Error(grpcCodes.Unavailable, ""), + }), + brief: "network/write[0.0.0.0:2135](transport/Unavailable)", + }, + { + err: grpcStatus.Error(grpcCodes.Unavailable, ""), + brief: "transport/Unavailable", + }, + { + err: xerrors.Transport( + grpcStatus.Error(grpcCodes.Unavailable, ""), + ), + brief: "transport/Unavailable", + }, + { + err: xerrors.Operation( + xerrors.WithStatusCode(Ydb.StatusIds_BAD_REQUEST), + ), + brief: "operation/BAD_REQUEST", + }, + // errors with stack trace + { + err: xerrors.WithStackTrace(fmt.Errorf("test")), + brief: "unknown", + }, + { + err: xerrors.WithStackTrace(io.EOF), + brief: "io/EOF", + }, + { + err: xerrors.WithStackTrace( + grpcStatus.Error(grpcCodes.Unavailable, ""), + ), + brief: "transport/Unavailable", + }, + { + err: xerrors.WithStackTrace(xerrors.Transport( + grpcStatus.Error(grpcCodes.Unavailable, ""), + )), + brief: "transport/Unavailable", + }, + { + err: xerrors.WithStackTrace(xerrors.Operation( + xerrors.WithStatusCode(Ydb.StatusIds_BAD_REQUEST), + )), + brief: "operation/BAD_REQUEST", + }, + // joined errors + { + err: xerrors.Join(fmt.Errorf("test")), + brief: "unknown", + }, + { + err: xerrors.Join( + fmt.Errorf("test"), + xerrors.Retryable(fmt.Errorf("test")), + ), + brief: "retryable/CUSTOM", + }, + { + err: xerrors.Join( + fmt.Errorf("test"), + xerrors.Retryable(fmt.Errorf("test"), xerrors.WithName("SomeName")), + ), + brief: "retryable/SomeName", + }, + { + err: xerrors.Join( + fmt.Errorf("test"), + xerrors.Retryable(fmt.Errorf("test"), xerrors.WithName("SomeName")), + grpcStatus.Error(grpcCodes.Unavailable, "test"), + ), + brief: "transport/Unavailable", + }, + { + err: xerrors.Join(io.EOF), + brief: "io/EOF", + }, + { + err: xerrors.Join( + grpcStatus.Error(grpcCodes.Unavailable, ""), + ), + brief: "transport/Unavailable", + }, + { + err: xerrors.Join(xerrors.Transport( + grpcStatus.Error(grpcCodes.Unavailable, ""), + )), + brief: "transport/Unavailable", + }, + { + err: xerrors.Join(xerrors.Operation( + xerrors.WithStatusCode(Ydb.StatusIds_BAD_REQUEST), + )), + brief: "operation/BAD_REQUEST", + }, + // joined errors with stack trace + { + err: xerrors.Join(xerrors.WithStackTrace(fmt.Errorf("test"))), + brief: "unknown", + }, + { + err: xerrors.Join(xerrors.WithStackTrace(io.EOF)), + brief: "io/EOF", + }, + { + err: xerrors.Join(xerrors.WithStackTrace(xerrors.Transport( + grpcStatus.Error(grpcCodes.Unavailable, ""), + ))), + brief: "transport/Unavailable", + }, + { + err: xerrors.Join(xerrors.WithStackTrace(xerrors.Operation( + xerrors.WithStatusCode(Ydb.StatusIds_BAD_REQUEST), + ))), + brief: "operation/BAD_REQUEST", + }, + // joined errors (mixed types) + { + err: xerrors.Join( + xerrors.WithStackTrace(fmt.Errorf("test")), + xerrors.WithStackTrace(io.EOF), + ), + brief: "io/EOF", + }, + { + err: xerrors.WithStackTrace(xerrors.Join( + xerrors.WithStackTrace(fmt.Errorf("test")), + xerrors.WithStackTrace(io.EOF), + )), + brief: "io/EOF", + }, + { + err: xerrors.Join( + io.EOF, + grpcStatus.Error(grpcCodes.Unavailable, ""), + xerrors.WithStackTrace(xerrors.Operation( + xerrors.WithStatusCode(Ydb.StatusIds_BAD_REQUEST), + )), + ), + brief: "io/EOF", + }, + { + err: xerrors.Join( + &net.OpError{ + Op: "write", + Addr: &net.TCPAddr{ + IP: []byte{0, 0, 0, 0}, + Port: 2135, + }, + Err: grpcStatus.Error(grpcCodes.Unavailable, ""), + }, + io.EOF, + grpcStatus.Error(grpcCodes.Unavailable, ""), + xerrors.WithStackTrace(xerrors.Operation( + xerrors.WithStatusCode(Ydb.StatusIds_BAD_REQUEST), + )), + ), + brief: "io/EOF", + }, + { + err: xerrors.Join( + grpcStatus.Error(grpcCodes.Unavailable, ""), + xerrors.WithStackTrace(xerrors.Operation( + xerrors.WithStatusCode(Ydb.StatusIds_BAD_REQUEST), + )), + ), + brief: "transport/Unavailable", + }, + { + err: xerrors.WithStackTrace(xerrors.Join( + xerrors.WithStackTrace(xerrors.Transport( + grpcStatus.Error(grpcCodes.Unavailable, ""), + )), + xerrors.WithStackTrace(xerrors.Operation( + xerrors.WithStatusCode(Ydb.StatusIds_BAD_REQUEST), + )), + )), + brief: "transport/Unavailable", + }, + } { + t.Run("", func(t *testing.T) { + require.Equal(t, tt.brief, errorBrief(tt.err)) + }) + } +} diff --git a/metrics/retry.go b/metrics/retry.go index a0eaca54f..916081e42 100644 --- a/metrics/retry.go +++ b/metrics/retry.go @@ -1,10 +1,46 @@ package metrics import ( + "time" + "github.com/ydb-platform/ydb-go-sdk/v3/trace" ) -// Retry makes table.RetryTrace with New publishing -func Retry(config Config) (t trace.Retry) { +func retry(config Config) (t trace.Retry) { + config = config.WithSystem("retry") + errs := config.CounterVec("errors", "status", "retry_label", "final") + attempts := config.HistogramVec("attempts", []float64{0, 1, 2, 3, 4, 5, 7, 10}, "retry_label") + latency := config.TimerVec("latency", "status", "retry_label") + t.OnRetry = func(info trace.RetryLoopStartInfo) func(trace.RetryLoopIntermediateInfo) func(trace.RetryLoopDoneInfo) { + var ( + label = info.Label + start = time.Now() + ) + return func(info trace.RetryLoopIntermediateInfo) func(trace.RetryLoopDoneInfo) { + if info.Error != nil && config.Details()&trace.RetryEvents != 0 { + errs.With(map[string]string{ + "status": errorBrief(info.Error), + "retry_label": label, + "final": "false", + }).Inc() + } + return func(info trace.RetryLoopDoneInfo) { + if config.Details()&trace.RetryEvents != 0 { + attempts.With(map[string]string{ + "retry_label": label, + }).Record(float64(info.Attempts)) + errs.With(map[string]string{ + "status": errorBrief(info.Error), + "retry_label": label, + "final": "true", + }).Inc() + latency.With(map[string]string{ + "status": errorBrief(info.Error), + "retry_label": label, + }).Record(time.Since(start)) + } + } + } + } return t } diff --git a/metrics/sql.go b/metrics/sql.go index d6a2a4162..d3ecb8a13 100644 --- a/metrics/sql.go +++ b/metrics/sql.go @@ -1,6 +1,8 @@ package metrics import ( + "time" + "github.com/ydb-platform/ydb-go-sdk/v3/trace" ) @@ -8,7 +10,14 @@ import ( func databaseSQL(config Config) (t trace.DatabaseSQL) { config = config.WithSystem("database").WithSystem("sql") conns := config.GaugeVec("conns") - txs := config.GaugeVec("txs") + inflight := config.WithSystem("conns").GaugeVec("inflight") + query := config.CounterVec("query", "status", "query_label", "query_mode") + queryLatency := config.WithSystem("query").TimerVec("latency", "status", "query_label", "query_mode") + exec := config.CounterVec("exec", "status", "query_label", "query_mode") + execLatency := config.WithSystem("exec").TimerVec("latency", "status", "query_label", "query_mode") + txBegin := config.WithSystem("tx").CounterVec("begin", "status") + txCommit := config.WithSystem("tx").CounterVec("commit", "status") + txRollback := config.WithSystem("tx").CounterVec("rollback", "status") t.OnConnectorConnect = func(info trace.DatabaseSQLConnectorConnectStartInfo) func( trace.DatabaseSQLConnectorConnectDoneInfo, ) { @@ -32,32 +41,86 @@ func databaseSQL(config Config) (t trace.DatabaseSQL) { t.OnConnBegin = func(info trace.DatabaseSQLConnBeginStartInfo) func(trace.DatabaseSQLConnBeginDoneInfo) { if config.Details()&trace.DatabaseSQLTxEvents != 0 { return func(info trace.DatabaseSQLConnBeginDoneInfo) { - if info.Tx != nil { - txs.With(nil).Add(1) - } + txBegin.With(map[string]string{ + "status": errorBrief(info.Error), + }).Inc() } } return nil } t.OnTxCommit = func(info trace.DatabaseSQLTxCommitStartInfo) func(trace.DatabaseSQLTxCommitDoneInfo) { - if config.Details()&trace.DatabaseSQLTxEvents != 0 { - return func(info trace.DatabaseSQLTxCommitDoneInfo) { - if info.Error == nil { - txs.With(nil).Add(-1) - } + return func(info trace.DatabaseSQLTxCommitDoneInfo) { + if config.Details()&trace.DatabaseSQLTxEvents != 0 { + txCommit.With(map[string]string{ + "status": errorBrief(info.Error), + }).Inc() } } - return nil } t.OnTxRollback = func(info trace.DatabaseSQLTxRollbackStartInfo) func(trace.DatabaseSQLTxRollbackDoneInfo) { - if config.Details()&trace.DatabaseSQLTxEvents != 0 { - return func(info trace.DatabaseSQLTxRollbackDoneInfo) { - if info.Error == nil { - txs.With(nil).Add(-1) - } + return func(info trace.DatabaseSQLTxRollbackDoneInfo) { + if config.Details()&trace.DatabaseSQLTxEvents != 0 { + txRollback.With(map[string]string{ + "status": errorBrief(info.Error), + }).Inc() + } + } + } + t.OnConnExec = func(info trace.DatabaseSQLConnExecStartInfo) func(trace.DatabaseSQLConnExecDoneInfo) { + if config.Details()&trace.DatabaseSQLEvents != 0 { + inflight.With(nil).Add(1) + } + var ( + mode = info.Mode + label = queryLabel(*info.Context) + start = time.Now() + ) + return func(info trace.DatabaseSQLConnExecDoneInfo) { + if config.Details()&trace.DatabaseSQLEvents != 0 { + inflight.With(nil).Add(-1) + } + if config.Details()&trace.DatabaseSQLConnEvents != 0 { + status := errorBrief(info.Error) + exec.With(map[string]string{ + "status": status, + "query_label": label, + "query_mode": mode, + }).Inc() + execLatency.With(map[string]string{ + "status": status, + "query_label": label, + "query_mode": mode, + }).Record(time.Since(start)) + } + } + } + t.OnConnQuery = func(info trace.DatabaseSQLConnQueryStartInfo) func(trace.DatabaseSQLConnQueryDoneInfo) { + if config.Details()&trace.DatabaseSQLEvents != 0 { + inflight.With(nil).Add(1) + } + var ( + mode = info.Mode + label = queryLabel(*info.Context) + start = time.Now() + ) + return func(info trace.DatabaseSQLConnQueryDoneInfo) { + if config.Details()&trace.DatabaseSQLEvents != 0 { + inflight.With(nil).Add(-1) + } + if config.Details()&trace.DatabaseSQLConnEvents != 0 { + status := errorBrief(info.Error) + query.With(map[string]string{ + "status": status, + "query_label": label, + "query_mode": mode, + }).Inc() + queryLatency.With(map[string]string{ + "status": status, + "query_label": label, + "query_mode": mode, + }).Record(time.Since(start)) } } - return nil } return t } diff --git a/metrics/table.go b/metrics/table.go index 961bcabcf..bff1f8c42 100644 --- a/metrics/table.go +++ b/metrics/table.go @@ -17,81 +17,11 @@ func table(config Config) (t trace.Table) { wait := config.WithSystem("pool").GaugeVec("wait") waitLatency := config.WithSystem("pool").WithSystem("wait").TimerVec("latency") alive := config.GaugeVec("sessions", "node_id") - doAttempts := config.WithSystem("do").HistogramVec("attempts", []float64{0, 1, 2, 5, 10}, "name") - doErrors := config.WithSystem("do").CounterVec("errors", "status", "name") - doIntermediateErrors := config.WithSystem("do").WithSystem("intermediate").CounterVec("errors", "status", "name") - doLatency := config.WithSystem("do").TimerVec("latency", "status", "name") - doTxAttempts := config.WithSystem("doTx").HistogramVec("attempts", []float64{0, 1, 2, 5, 10}, "name") - doTxIntermediateErrors := config.WithSystem("doTx").WithSystem("intermediate").CounterVec("errors", "status", "name") - doTxErrors := config.WithSystem("doTx").CounterVec("errors", "status", "name") - doTxLatency := config.WithSystem("doTx").TimerVec("latency", "status", "name") t.OnInit = func(info trace.TableInitStartInfo) func(trace.TableInitDoneInfo) { return func(info trace.TableInitDoneInfo) { limit.With(nil).Set(float64(info.Limit)) } } - t.OnDo = func(info trace.TableDoStartInfo) func( - info trace.TableDoIntermediateInfo, - ) func( - trace.TableDoDoneInfo, - ) { - var ( - name = info.ID - start = time.Now() - ) - return func(info trace.TableDoIntermediateInfo) func(trace.TableDoDoneInfo) { - if info.Error != nil && config.Details()&trace.TableEvents != 0 { - doIntermediateErrors.With(map[string]string{ - "status": errorBrief(info.Error), - "name": name, - }).Inc() - } - return func(info trace.TableDoDoneInfo) { - if config.Details()&trace.TableEvents != 0 { - doAttempts.With(nil).Record(float64(info.Attempts)) - doErrors.With(map[string]string{ - "status": errorBrief(info.Error), - "name": name, - }).Inc() - doLatency.With(map[string]string{ - "status": errorBrief(info.Error), - "name": name, - }).Record(time.Since(start)) - } - } - } - } - t.OnDoTx = func(info trace.TableDoTxStartInfo) func( - info trace.TableDoTxIntermediateInfo, - ) func( - trace.TableDoTxDoneInfo, - ) { - var ( - name = info.ID - start = time.Now() - ) - return func(info trace.TableDoTxIntermediateInfo) func(trace.TableDoTxDoneInfo) { - if info.Error != nil && config.Details()&trace.TableEvents != 0 { - doTxIntermediateErrors.With(map[string]string{ - "status": errorBrief(info.Error), - "name": name, - }).Inc() - } - return func(info trace.TableDoTxDoneInfo) { - if config.Details()&trace.TableEvents != 0 { - doTxAttempts.With(nil).Record(float64(info.Attempts)) - doTxErrors.With(map[string]string{ - "status": errorBrief(info.Error), - "name": name, - }).Inc() - doTxLatency.With(map[string]string{ - "status": errorBrief(info.Error), - "name": name, - }).Record(time.Since(start)) - } - } - } - } t.OnSessionNew = func(info trace.TableSessionNewStartInfo) func(trace.TableSessionNewDoneInfo) { return func(info trace.TableSessionNewDoneInfo) { if info.Error == nil && config.Details()&trace.TableSessionEvents != 0 { diff --git a/metrics/traces.go b/metrics/traces.go index a601b5bcc..5fc978606 100644 --- a/metrics/traces.go +++ b/metrics/traces.go @@ -18,5 +18,6 @@ func WithTraces(config Config) ydb.Option { ydb.WithTraceRatelimiter(ratelimiter(config)), ydb.WithTraceDiscovery(discovery(config)), ydb.WithTraceDatabaseSQL(databaseSQL(config)), + ydb.WithTraceRetry(retry(config)), ) } diff --git a/options.go b/options.go index 1f92d4ce0..80fba7603 100644 --- a/options.go +++ b/options.go @@ -249,7 +249,7 @@ func WithDiscoveryInterval(discoveryInterval time.Duration) Option { } } -// WithTraceDriver returns deadline which has associated Driver with it. +// WithTraceDriver appends trace.Driver into driver traces func WithTraceDriver(trace trace.Driver, opts ...trace.DriverComposeOption) Option { //nolint:gocritic return func(ctx context.Context, c *Driver) error { c.options = append(c.options, config.WithTrace(trace, opts...)) @@ -257,6 +257,21 @@ func WithTraceDriver(trace trace.Driver, opts ...trace.DriverComposeOption) Opti } } +// WithTraceRetry appends trace.Retry into retry traces +func WithTraceRetry(t trace.Retry, opts ...trace.RetryComposeOption) Option { + return func(ctx context.Context, c *Driver) error { + c.options = append(c.options, + config.WithTraceRetry(&t, append( + []trace.RetryComposeOption{ + trace.WithRetryPanicCallback(c.panicCallback), + }, + opts..., + )...), + ) + return nil + } +} + // WithCertificate appends certificate to TLS config root certificates func WithCertificate(cert *x509.Certificate) Option { return func(ctx context.Context, c *Driver) error { @@ -394,7 +409,7 @@ func WithPanicCallback(panicCallback func(e interface{})) Option { } } -// WithTraceTable returns table trace option +// WithTraceTable appends trace.Table into table traces func WithTraceTable(t trace.Table, opts ...trace.TableComposeOption) Option { //nolint:gocritic return func(ctx context.Context, c *Driver) error { c.tableOptions = append( diff --git a/retry/retry.go b/retry/retry.go index 2c2589a07..87ea3d5bd 100644 --- a/retry/retry.go +++ b/retry/retry.go @@ -221,7 +221,7 @@ func Retry(ctx context.Context, op retryOperation, opts ...Option) (err error) { options := &retryOptions{ fastBackoff: backoff.Fast, slowBackoff: backoff.Slow, - trace: &trace.Retry{}, + trace: xcontext.TraceRetry(ctx), } for _, opt := range opts { if opt != nil { diff --git a/retry/retry_test.go b/retry/retry_test.go index f467b3dcc..bb9818775 100644 --- a/retry/retry_test.go +++ b/retry/retry_test.go @@ -121,7 +121,7 @@ func TestRetryWithCustomErrors(t *testing.T) { } { t.Run(tt.error.Error(), func(t *testing.T) { i := 0 - err := Retry(ctx, func(ctx context.Context) (err error) { + err := Retry(ctx, func(ctx context.Context) error { i++ if i < limit { return tt.error @@ -149,7 +149,7 @@ func TestRetryTransportDeadlineExceeded(t *testing.T) { } { counter := 0 ctx, cancel := xcontext.WithTimeout(context.Background(), time.Hour) - err := Retry(ctx, func(ctx context.Context) (err error) { + err := Retry(ctx, func(ctx context.Context) error { counter++ if !(counter < cancelCounterValue) { cancel() @@ -169,7 +169,7 @@ func TestRetryTransportCancelled(t *testing.T) { } { counter := 0 ctx, cancel := xcontext.WithCancel(context.Background()) - err := Retry(ctx, func(ctx context.Context) (err error) { + err := Retry(ctx, func(ctx context.Context) error { counter++ if !(counter < cancelCounterValue) { cancel() diff --git a/retry/sql.go b/retry/sql.go index f6e6dd3c9..b248c12bc 100644 --- a/retry/sql.go +++ b/retry/sql.go @@ -6,6 +6,7 @@ import ( "fmt" "github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors" + "github.com/ydb-platform/ydb-go-sdk/v3/trace" ) type doOptions struct { @@ -40,6 +41,13 @@ func Do(ctx context.Context, db *sql.DB, f func(ctx context.Context, cc *sql.Con options = doOptions{} attempts = 0 ) + if tracer, has := db.Driver().(interface { + TraceRetry() *trace.Retry + }); has { + options.retryOptions = append(options.retryOptions, WithTrace( + *tracer.TraceRetry()), + ) + } for _, opt := range opts { if opt != nil { opt.ApplyDoOption(&options) @@ -119,6 +127,13 @@ func DoTx(ctx context.Context, db *sql.DB, f func(context.Context, *sql.Tx) erro } attempts = 0 ) + if tracer, has := db.Driver().(interface { + TraceRetry() *trace.Retry + }); has { + options.retryOptions = append(options.retryOptions, + WithTrace(*tracer.TraceRetry()), + ) + } for _, opt := range opts { if opt != nil { opt.ApplyDoTxOption(&options) diff --git a/table/table.go b/table/table.go index f6eabda65..379a66ba3 100644 --- a/table/table.go +++ b/table/table.go @@ -571,17 +571,17 @@ type Option interface { ApplyTableOption(opts *Options) } -var _ Option = idOption("") +var _ Option = labelOption("") -type idOption string +type labelOption string -func (id idOption) ApplyTableOption(opts *Options) { - opts.ID = string(id) - opts.RetryOptions = append(opts.RetryOptions, retry.WithID(string(id))) +func (label labelOption) ApplyTableOption(opts *Options) { + opts.ID = string(label) + opts.RetryOptions = append(opts.RetryOptions, retry.WithLabel(string(label))) } -func WithID(id string) idOption { - return idOption(id) +func WithLabel(label string) labelOption { + return labelOption(label) } var _ Option = retryOptionsOption{} diff --git a/trace/retry.go b/trace/retry.go index 4daa7e6f5..45f89ea4c 100644 --- a/trace/retry.go +++ b/trace/retry.go @@ -20,7 +20,7 @@ type ( // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context - ID string + Label string Idempotent bool NestedCall bool // flag when Retry called inside head Retry } diff --git a/trace/retry_gtrace.go b/trace/retry_gtrace.go index ee8f7c75a..7c42faf3f 100644 --- a/trace/retry_gtrace.go +++ b/trace/retry_gtrace.go @@ -110,10 +110,10 @@ func (t *Retry) onRetry(r RetryLoopStartInfo) func(RetryLoopIntermediateInfo) fu return res } } -func RetryOnRetry(t *Retry, c *context.Context, iD string, idempotent bool, nestedCall bool) func(error) func(attempts int, _ error) { +func RetryOnRetry(t *Retry, c *context.Context, label string, idempotent bool, nestedCall bool) func(error) func(attempts int, _ error) { var p RetryLoopStartInfo p.Context = c - p.ID = iD + p.Label = label p.Idempotent = idempotent p.NestedCall = nestedCall res := t.onRetry(p) diff --git a/trace/table.go b/trace/table.go index 8fd59d2a1..1794636e8 100644 --- a/trace/table.go +++ b/trace/table.go @@ -379,7 +379,7 @@ type ( // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context - ID string + Label string Idempotent bool NestedCall bool // flag when Retry called inside head Retry } @@ -396,7 +396,7 @@ type ( // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context - ID string + Label string Idempotent bool NestedCall bool // flag when Retry called inside head Retry } diff --git a/trace/table_gtrace.go b/trace/table_gtrace.go index 706859753..6082e2498 100644 --- a/trace/table_gtrace.go +++ b/trace/table_gtrace.go @@ -1420,10 +1420,10 @@ func TableOnClose(t *Table, c *context.Context) func(error) { res(p) } } -func TableOnDo(t *Table, c *context.Context, iD string, idempotent bool, nestedCall bool) func(error) func(attempts int, _ error) { +func TableOnDo(t *Table, c *context.Context, label string, idempotent bool, nestedCall bool) func(error) func(attempts int, _ error) { var p TableDoStartInfo p.Context = c - p.ID = iD + p.Label = label p.Idempotent = idempotent p.NestedCall = nestedCall res := t.onDo(p) @@ -1439,10 +1439,10 @@ func TableOnDo(t *Table, c *context.Context, iD string, idempotent bool, nestedC } } } -func TableOnDoTx(t *Table, c *context.Context, iD string, idempotent bool, nestedCall bool) func(error) func(attempts int, _ error) { +func TableOnDoTx(t *Table, c *context.Context, label string, idempotent bool, nestedCall bool) func(error) func(attempts int, _ error) { var p TableDoTxStartInfo p.Context = c - p.ID = iD + p.Label = label p.Idempotent = idempotent p.NestedCall = nestedCall res := t.onDoTx(p)