diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 000000000..ebc4ad876 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,63 @@ +linters-settings: + govet: + check-shadowing: false + golint: + min-confidence: 0 + gocyclo: + min-complexity: 10 + maligned: + suggest-new: true + dupl: + threshold: 100 + goconst: + min-len: 2 + min-occurrences: 2 + depguard: + list-type: blacklist + packages: + # logging is allowed only by logutils.Log, logrus + # is allowed to use only in logutils package + - github.com/sirupsen/logrus + misspell: + locale: US + lll: + line-length: 140 + goimports: + local-prefixes: github.com/golangci/golangci-lint + gocritic: + enabled-tags: + - performance + - style + - experimental + disabled-checks: + - wrapperFunc + +linters: + disable-all: true + enable:a + - govet + - staticcheck + - ineffassign + - misspell + +run: + skip-dirs: + - test/testdata_etc + - pkg/golinters/goanalysis/(checker|passes) + +issues: + exclude-rules: + - text: "weak cryptographic primitive" + linters: + - gosec + - linters: + - staticcheck + text: "SA1019:" + +# golangci.com configuration +# https://github.com/golangci/golangci/wiki/Configuration +service: + golangci-lint-version: 1.16.x # use the fixed version to not introduce new linters unexpectedly + prepare: + - echo "here I can run custom commands, but no preparation needed for this repo" + diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..13566b81b --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/git_toolbox_prj.xml b/.idea/git_toolbox_prj.xml new file mode 100644 index 000000000..b3820067b --- /dev/null +++ b/.idea/git_toolbox_prj.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 000000000..28159c844 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/seata-go.iml b/.idea/seata-go.iml new file mode 100644 index 000000000..5e764c4f0 --- /dev/null +++ b/.idea/seata-go.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000..94a25f7f4 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.licenserc.yaml b/.licenserc.yaml new file mode 100644 index 000000000..e2dff8ee2 --- /dev/null +++ b/.licenserc.yaml @@ -0,0 +1,93 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +header: # `header` section is configurations for source codes license header. + license: + spdx-id: Apache-2.0 # the spdx id of the license, it's convenient when your license is standard SPDX license. + copyright-owner: Apache Software Foundation # the copyright owner to replace the [owner] in the `spdx-id` template. + content: | # `license` will be used as the content when `fix` command needs to insert a license header. + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + # `pattern` is optional regexp if all the file headers are the same as `license` or the license of `spdx-id` and `copyright-owner`. + pattern: | + Licensed to the Apache Software Foundation under one or more contributor + license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright + ownership. The Apache Software Foundation licenses this file to you under + the Apache License, Version 2.0 \(the "License"\); you may + not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + paths: # `paths` are the path list that will be checked (and fixed) by license-eye, default is ['**']. + - '**' + + paths-ignore: # `paths-ignore` are the path list that will be ignored by license-eye. + - 'dist' + - 'licenses' + - '**/*.md' + - '**/testdata/**' + - '**/go.mod' + - '**/go.sum' + - 'LICENSE' + - 'NOTICE' + - '**/assets/header-templates/**' + - '**/assets/lcs-templates/**' + - '**/assets/languages.yaml' + - '**/assets/assets.gen.go' + - 'docs/**.svg' + - '.travis.yml' + - '.gitignore' + - '.gitmodules' + - 'makefile' + - 'justfile' + - 'docker' + - 'pkg/resolver/mysql/constants.go' # with two license: apache and Vitess + - 'pkg/resolver/mysql/encoding.go' + - 'pkg/resolver/mysql/sql_error.go' + - 'pkg/resolver/mysql/type.go' + - 'VERSION' + - ".errcheck-exclude" + - ".golangci.yml" + - '.pre-commit-config.yaml' + - '.github' + comment: on-failure # on what condition license-eye will comment on the pull request, `on-failure`, `always`, `never`. + + # license-location-threshold specifies the index threshold where the license header can be located, + # after all, a "header" cannot be TOO far from the file start. + license-location-threshold: 80 + +dependency: + files: + - go.mod diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..cb2d7cfa0 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,7 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: http://github.com/golangci/golangci-lint + rev: v1.42.1 + hooks: + - id: golangci-lint diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..8a9ecc2ea --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.0.1 \ No newline at end of file diff --git a/cmd/start.go b/cmd/start.go new file mode 100644 index 000000000..6e5077763 --- /dev/null +++ b/cmd/start.go @@ -0,0 +1,5 @@ +package main + +func main() { + // start the server +} diff --git a/conf/config.yaml b/conf/config.yaml new file mode 100644 index 000000000..23a8f2dc8 --- /dev/null +++ b/conf/config.yaml @@ -0,0 +1,37 @@ +# 配置类;io.seata.spring.boot.autoconfigure.StarterConstants + +seata: + transport: + type: "TCP" + #NIO NATIVE + server: "NIO" + #enable heartbeat + heartbeat: true + # the client batch send request enable + enableClientBatchSendRequest: true + compressor: nome + service: + + + client: + rm: + asyncCommitBufferLimit: 10000 + reportRetryCount: 5 + tableMetaCheckEnable: false + reportSuccessEnable: false + sagaBranchRegisterEnable: 10000 + sagaJsonParser: fastjson + sagaRetryPersistModeUpdate: false + sagaCompensatePersistModeUpdate: false + tm: + commitRetryCount: 5 + rollbackRetryCount: 5 + defaultGlobalTransactionTimeout: 60000 + degradeCheck: false + degradeCheckAllowTimes: 10 + degradeCheckPeriod: 2000 + undo: + dataValidation: true + logSerialization: jackson + logTable: undo_log + onlyCareUpdateColumns: true \ No newline at end of file diff --git a/coverage.txt b/coverage.txt new file mode 100644 index 000000000..1349fa28e --- /dev/null +++ b/coverage.txt @@ -0,0 +1,4 @@ +mode: atomic +github.com/seata/seata-go/pkg/rm/tcc/tcc_resource.go:20.51,22.2 1 0 +github.com/seata/seata-go/pkg/rm/tcc/tcc_resource.go:24.46,26.2 1 0 +github.com/seata/seata-go/pkg/rm/tcc/tcc_resource.go:28.56,30.2 1 0 diff --git a/go.mod b/go.mod new file mode 100644 index 000000000..d3992f7ea --- /dev/null +++ b/go.mod @@ -0,0 +1,18 @@ +module github.com/seata/seata-go + +go 1.16 + +require ( + github.com/BurntSushi/toml v1.1.0 // indirect + github.com/apache/dubbo-getty v1.4.8 + github.com/dubbogo/gost v1.11.23 + github.com/dubbogo/tools v1.0.9 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/natefinch/lumberjack v2.0.0+incompatible + github.com/pkg/errors v0.9.1 + go.uber.org/atomic v1.9.0 + go.uber.org/zap v1.19.1 + gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect + vimagination.zapto.org/byteio v0.0.0-20200222190125-d27cba0f0b10 + vimagination.zapto.org/memio v0.0.0-20200222190306-588ebc67b97d // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 000000000..5c53efa11 --- /dev/null +++ b/go.sum @@ -0,0 +1,1241 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +contrib.go.opencensus.io/exporter/prometheus v0.4.0/go.mod h1:o7cosnyfuPVK0tB8q0QmaQNhGnptITnPQB+z1+qeFB0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +dubbo.apache.org/dubbo-go/v3 v3.0.0-rc4-1/go.mod h1:nk5n161RX1hycUaLsLgZi7Gar41J+4srY4ysp0yW2PI= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/Julusian/godocdown v0.0.0-20170816220326-6d19f8ff2df8/go.mod h1:INZr5t32rG59/5xeltqoCJoNY7e5x/3xoY9WSWVWg74= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/RoaringBitmap/roaring v0.7.1/go.mod h1:jdT9ykXwHFNdJbEtxePexlFYH9LXucApeS0/+/g+p1I= +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/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= +github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +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/alibaba/sentinel-golang v1.0.2/go.mod h1:QsB99f/z35D2AiMrAWwgWE85kDTkBUIkcmPrRt+61NI= +github.com/aliyun/alibaba-cloud-sdk-go v1.61.18/go.mod h1:v8ESoHo4SyHmuB4b1tJqDHxfTGEciD+yhvOU/5s1Rfk= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/dubbo-getty v1.4.5/go.mod h1:mcDyiu7M/TVrYDyL8TxDemQkOdvEqqHSQ4jOuYejY1w= +github.com/apache/dubbo-getty v1.4.8 h1:Q9WKXmVu4Dm16cMJHamegRbxpDiYaGIU+MnPGhJhNyk= +github.com/apache/dubbo-getty v1.4.8/go.mod h1:cPJlbcHUTNTpiboMQjMHhE9XBni11LiBiG8FdrDuVzk= +github.com/apache/dubbo-go-hessian2 v1.9.1/go.mod h1:xQUjE7F8PX49nm80kChFvepA/AvqAZ0oh/UaB6+6pBE= +github.com/apache/dubbo-go-hessian2 v1.9.3/go.mod h1:xQUjE7F8PX49nm80kChFvepA/AvqAZ0oh/UaB6+6pBE= +github.com/apache/dubbo-go-hessian2 v1.9.5/go.mod h1:7rEw9guWABQa6Aqb8HeZcsYPHsOS7XT1qtJvkmI6c5w= +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-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/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/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= +github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= +github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= +github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= +github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= +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/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +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= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.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/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/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/cpuguy83/go-md2man/v2 v2.0.0/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/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creasty/defaults v1.5.2/go.mod h1:FPZ+Y0WNrbqOVw+c6av63eyHUAl6pMHZwqLPvXUZGfY= +github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +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/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/dubbogo/go-zookeeper v1.0.3/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c= +github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c= +github.com/dubbogo/gost v1.9.0/go.mod h1:pPTjVyoJan3aPxBPNUX0ADkXjPibLo+/Ib0/fADXSG8= +github.com/dubbogo/gost v1.11.12/go.mod h1:vIcP9rqz2KsXHPjsAwIUtfJIJjppQLQDcYaZTy/61jI= +github.com/dubbogo/gost v1.11.18/go.mod h1:vIcP9rqz2KsXHPjsAwIUtfJIJjppQLQDcYaZTy/61jI= +github.com/dubbogo/gost v1.11.19/go.mod h1:vIcP9rqz2KsXHPjsAwIUtfJIJjppQLQDcYaZTy/61jI= +github.com/dubbogo/gost v1.11.20/go.mod h1:vIcP9rqz2KsXHPjsAwIUtfJIJjppQLQDcYaZTy/61jI= +github.com/dubbogo/gost v1.11.23 h1:5A7N1jJ5oApcxJwjh4FkhN9iqsx8ddFWTakwCUlNJMw= +github.com/dubbogo/gost v1.11.23/go.mod h1:PhJ8+qZJx+Txjx1KthNPuVkCvUca0jRLgKWj/noGgeI= +github.com/dubbogo/grpc-go v1.42.5-triple/go.mod h1:F1T9hnUvYGW4JLK1QNriavpOkhusU677ovPzLkk6zHM= +github.com/dubbogo/grpc-go v1.42.6-triple/go.mod h1:F1T9hnUvYGW4JLK1QNriavpOkhusU677ovPzLkk6zHM= +github.com/dubbogo/jsonparser v1.0.1/go.mod h1:tYAtpctvSP/tWw4MeelsowSPgXQRVHHWbqL6ynps8jU= +github.com/dubbogo/net v0.0.4/go.mod h1:1CGOnM7X3he+qgGNqjeADuE5vKZQx/eMSeUkpU3ujIc= +github.com/dubbogo/tools v1.0.9 h1:PV9EENZUl/Vfi1GWo9B9Nz3El47SA4Qt7002330yl9o= +github.com/dubbogo/tools v1.0.9/go.mod h1:uQ9KWrik1oQJiO520PJBOLeaoE3ZZqagLlTreUkdCaI= +github.com/dubbogo/triple v1.0.9/go.mod h1:1t9me4j4CTvNDcsMZy6/OGarbRyAUSY0tFXGXHCp7Iw= +github.com/dubbogo/triple v1.1.3/go.mod h1:suMeAfZliq0p/lWIytgEdiuKcRlmeJC9pYeNHVE7FWU= +github.com/dubbogo/triple v1.1.5/go.mod h1:5lGslNo9Tq8KR8+tSSSJkhypNaREYZCKCk0Owx40Cx4= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dvyukov/go-fuzz v0.0.0-20210429054444-fca39067bc72/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= +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/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= +github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.7.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +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= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.0/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.5.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239/go.mod h1:Gdwt2ce0yfBxPvZrHkprdPPTTS3N5rwmLE8T22KBXlw= +github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +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/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= +github.com/go-co-op/gocron v1.9.0/go.mod h1:DbJm9kdgr1sEvWpHCA7dFFs/PGHPMil9/97EXCRPr4k= +github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +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-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-ldap/ldap/v3 v3.1.10/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q= +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-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= +github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.9.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= +github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +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/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +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-20190129154638-5b532d6fd5ef/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= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +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.1/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/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/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/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +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/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= +github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g= +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-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= +github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-secure-stdlib/base62 v0.1.1/go.mod h1:EdWO6czbmthiwZ3/PUsDV+UD1D5IRU4ActiaWGwt0Yw= +github.com/hashicorp/go-secure-stdlib/mlock v0.1.1/go.mod h1:zq93CJChV6L9QTfGKtfBxKqD7BqqXx5O04A/ns2p5+I= +github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= +github.com/hashicorp/go-secure-stdlib/password v0.1.1/go.mod h1:9hH302QllNwu1o2TGYtSk8I8kTAN0ca1EHpwhm5Mmzo= +github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U= +github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.1/go.mod h1:l8slYwnJA26yBz+ErHpp2IRCLr0vuOMGBORIz4rRiAs= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +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-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +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/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +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/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= +github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= +github.com/hashicorp/vault/sdk v0.3.0/go.mod h1:aZ3fNuL5VNydQk8GcLJ2TV8YCRVvyaakYkhZRoVuhj0= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +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/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/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +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/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869/go.mod h1:cJ6Cj7dQo+O6GJNiMx+Pa94qKj+TG8ONdKHgMNIyyag= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jfeliu007/goplantuml v1.6.1 h1:4mRgQ4Lujx11dfw3TyL6xa6w2DGHZar0NktJ6EmZ2dI= +github.com/jfeliu007/goplantuml v1.6.1/go.mod h1:GnvyYGyIXD68akNFe2FBlNBypwfbpeNmVUQ4ZxJw8iI= +github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= +github.com/jinzhu/copier v0.3.2/go.mod h1:24xnZezI2Yqac9J61UC6/dG/k76ttpq0DdJI3QmUvro= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +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.9/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/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/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/k0kubun/pp v3.0.1+incompatible h1:3tqvf7QgUnZ5tXO6pNAZlrvHgl6DvifjDrd9g2S9Z40= +github.com/k0kubun/pp v3.0.1+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3tgzSScAn6HmfYukg= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf v1.3.2/go.mod h1:HZ7HMLIGbrWJUfgtEzfHvzR/rX+eIqQlBNPRr4Vt42s= +github.com/koding/multiconfig v0.0.0-20171124222453-69c27309b2d7/go.mod h1:Y2SaZf2Rzd0pXkLVhLlCiAXFCLSXAIbTKDivVgff/AM= +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.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.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/lestrrat/go-envload v0.0.0-20180220120943-6ed08b54a570/go.mod h1:BLt8L9ld7wVsvEWQbuLrUZnCMnUmLZ+CGDzKtclrTlE= +github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f/go.mod h1:UGmTpUd3rjbtfIpwAPrcfmGf/Z1HS95TATB+m57TPB8= +github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042/go.mod h1:TPpsiPUEh0zFL1Snz4crhMlBe60PYxRHr5oFF3rRYg0= +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/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= +github.com/mattn/go-colorable v0.1.7/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.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +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/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +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/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +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/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= +github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +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/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nacos-group/nacos-sdk-go v1.0.8/go.mod h1:hlAPn3UdzlxIlSILAyOXKxjFSvDJ9oLzTJ9hLAK1KzA= +github.com/nacos-group/nacos-sdk-go v1.0.9/go.mod h1:hlAPn3UdzlxIlSILAyOXKxjFSvDJ9oLzTJ9hLAK1KzA= +github.com/natefinch/lumberjack v2.0.0+incompatible h1:4QJd3OLAMgj7ph+yZTuX13Ld4UpgHp07nNdFX7mqFfM= +github.com/natefinch/lumberjack v2.0.0+incompatible/go.mod h1:Wi9p2TTF5DG5oU+6YfsmYQpsTIOm0B1VNzQg9Mw6nPk= +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/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +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/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0/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/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +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/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +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/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +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 v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +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 v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +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.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +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/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.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.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +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.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +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.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= +github.com/robertkrimen/godocdown v0.0.0-20130622164427-0bfa04905481/go.mod h1:C9WhFzY47SzYBIvzFqSvHIR6ROgDo4TtdTuRaOMjF/s= +github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= +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/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +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/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shirou/gopsutil v3.20.11+incompatible h1:LJr4ZQK4mPpIV5gOa4jCOKOGb4ty4DZO54I4FGqIpto= +github.com/shirou/gopsutil v3.20.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +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/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +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/soheilhy/cmux v0.1.5-0.20210205191134-5ec6847320e5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= +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.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= +github.com/stephens2424/writerset v1.0.2/go.mod h1:aS2JhsMn6eA7e82oNmW4rfsgAOp9COBTTl8mzkwADnc= +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/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tebeka/strftime v0.1.3/go.mod h1:7wJm3dZlpr4l/oVK0t1HYIc4rMzQ2XJlOMIUJUJH6XQ= +github.com/tevid/gohamcrest v1.1.1/go.mod h1:3UvtWlqm8j5JbwYZh80D/PVBt0mJ1eJiYgZMibh0H/k= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/toolkits/concurrent v0.0.0-20150624120057-a4371d70e3e3/go.mod h1:QDlpd3qS71vYtakd2hmdpqhJ9nwv6mD6A30bQ1BPBFE= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0= +github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw= +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/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/zouyx/agollo/v3 v3.4.5/go.mod h1:LJr3kDmm23QSW+F1Ol4TMHDa7HvJvscMdVxJ2IpUTVc= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd/api/v3 v3.5.0-alpha.0/go.mod h1:mPcW6aZJukV6Aa81LSKpBjQXTWlXB5r74ymPoSWa3Sw= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0-alpha.0/go.mod h1:kdV+xzCJ3luEBSIeQyB/OEKkWKd8Zkux4sbDeANrosU= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v3 v3.5.0-alpha.0/go.mod h1:wKt7jgDgf/OfKiYmCq5WFGxOFAkVMLxiiXgLDFhECr8= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/pkg/v3 v3.5.0-alpha.0/go.mod h1:tV31atvwzcybuqejDoY3oaNRTtlD2l/Ot78Pc9w7DMY= +go.etcd.io/etcd/raft/v3 v3.5.0-alpha.0/go.mod h1:FAwse6Zlm5v4tEWZaTjmNhe17Int4Oxbu7+2r0DiD3w= +go.etcd.io/etcd/server/v3 v3.5.0-alpha.0/go.mod h1:tsKetYpt980ZTpzl/gb+UOJj9RkIyCb1u4wjzMg90BQ= +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= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +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-20190211182817-74369b46fc67/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-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-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +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= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +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-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211105192438-b53810dc28af/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/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= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/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= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201223074533-0d417f636930/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= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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-20210603081109-ebe580a85c40/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-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211106132015-ebca88c72f68/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1 h1:kwrAHlwJ0DUBZwQ238v+Uod/3eZ8B2K5rYsUHBQvzmI= +golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +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-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/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-20180525024113-a5b4c53f6e8b/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-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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-20190206041539-40960b6deb8e/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-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20200928182047-19e03678916f/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201014170642-d1624618ad65/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +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= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= +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= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +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= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210106152847-07624b53cd92/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +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.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +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= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= +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-20200227125254-8fa46927fb4f/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/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +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.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/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 h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +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= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +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= +k8s.io/api v0.16.9/go.mod h1:Y7dZNHs1Xy0mSwSlzL9QShi6qkljnN41yR8oWCRTDe8= +k8s.io/apimachinery v0.16.9/go.mod h1:Xk2vD2TRRpuWYLQNM6lT9R7DSFZUYG03SarNkbGrnKE= +k8s.io/client-go v0.16.9/go.mod h1:ThjPlh7Kx+XoBFOCt775vx5J7atwY7F/zaFzTco5gL0= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +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/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= +vimagination.zapto.org/byteio v0.0.0-20200222190125-d27cba0f0b10 h1:pxt6fVJP67Hxo1qk8JalUghLlk3abYByl+3e0JYfUlE= +vimagination.zapto.org/byteio v0.0.0-20200222190125-d27cba0f0b10/go.mod h1:fl9OF22g6MTKgvHA1hqMXe/L7+ULWofVTwbC9loGu7A= +vimagination.zapto.org/memio v0.0.0-20200222190306-588ebc67b97d h1:Mp6WiHHuiwHaknxTdxJ8pvC9/B4pOgW1PamKGexG7Fs= +vimagination.zapto.org/memio v0.0.0-20200222190306-588ebc67b97d/go.mod h1:zHGDKp2tyvF4IAfLti4pKYqCJucXYmmKMb3UMrCHK/4= diff --git a/makefile b/makefile new file mode 100644 index 000000000..90a209346 --- /dev/null +++ b/makefile @@ -0,0 +1,58 @@ +VERSION=$(shell cat "./VERSION" 2> /dev/null) + +GO_FLAGS := -ldflags "-X main.Branch=$(GIT_BRANCH) -X main.Revision=$(GIT_REVISION) -X main.Version=$(VERSION) -extldflags \"-static\" -s -w" -tags netgo +GO = go +GO_PATH = $(shell $(GO) env GOPATH) +GO_OS = $(shell $(GO) env GOOS) +ifeq ($(GO_OS), darwin) + GO_OS = mac +endif + +# License environment +GO_LICENSE_CHECKER_DIR = license-header-checker-$(GO_OS) +GO_LICENSE_CHECKER = $(GO_PATH)/bin/license-header-checker +LICENSE_DIR = /tmp/tools/license + +# format import code +format-import: + go get -d github.com/dubbogo/tools/cmd/imports-formatter + imports-formatter -path . -module github.com/seata/seata-go -bl false + +unit-test: + go test ./pkg/... -coverprofile=coverage.txt -covermode=atomic + +# Generate binaries for a Cortex release +dist dist/seatago-linux-amd64 dist/seatago-darwin-amd64 dist/seatago-linux-amd64-sha-256 dist/seatago-darwin-amd64-sha-256: + rm -fr ./dist + mkdir -p ./dist + GOOS="linux" GOARCH="amd64" CGO_ENABLED=0 go build $(GO_FLAGS) -o ./dist/seatago-linux-amd64 ./cmd + GOOS="darwin" GOARCH="amd64" CGO_ENABLED=0 go build $(GO_FLAGS) -o ./dist/seatago-darwin-amd64 ./cmd + sha256sum ./dist/seatago-darwin-amd64 | cut -d ' ' -f 1 > ./dist/seatago-darwin-amd64-sha-256 + sha256sum ./dist/seatago-linux-amd64 | cut -d ' ' -f 1 > ./dist/seatago-linux-amd64-sha-256 + +# Generate binaries for a Cortex release +build dist/seatago dist/seatago-sha-256: + rm -fr ./dist + mkdir -p ./dist + CGO_ENABLED=0 go build $(GO_FLAGS) -o ./dist/seatago ./cmd + sha256sum ./dist/seatago | cut -d ' ' -f 1 > ./dist/seatago-sha-256 + +#docker-build: +# docker build -t seatago/seatago:latest . + +integration-test: + @go clean -testcache + go test -tags integration -v ./test/... + +clean: + @rm -rf coverage.txt + @rm -rf dist + +prepareLic: + echo 'The makefile is for ci test and has dependencies. Do not run it locally. If you want to run the unit tests, run command `go test ./...` directly.' + $(GO_LICENSE_CHECKER) -version || (wget https://github.com/lsm-dev/license-header-checker/releases/download/v1.2.0/$(GO_LICENSE_CHECKER_DIR).zip -O $(GO_LICENSE_CHECKER_DIR).zip && unzip -o $(GO_LICENSE_CHECKER_DIR).zip && mkdir -p $(GO_PATH)/bin/ && cp $(GO_LICENSE_CHECKER_DIR)/64bit/license-header-checker $(GO_PATH)/bin/) + ls /tmp/tools/license/license.txt || wget -P $(LICENSE_DIR) https://github.com/dubbogo/resources/raw/master/tools/license/license.txt + +.PHONY: license +license: prepareLic + $(GO_LICENSE_CHECKER) -v -a -r -i vendor $(LICENSE_DIR)/license.txt . go && [[ -z `git status -s` ]] \ No newline at end of file diff --git a/pkg/common/constant.go b/pkg/common/constant.go new file mode 100644 index 000000000..ad5aeff89 --- /dev/null +++ b/pkg/common/constant.go @@ -0,0 +1,5 @@ +package common + +const ( + XID = "xid" +) diff --git a/pkg/common/model/branch.go b/pkg/common/model/branch.go new file mode 100644 index 000000000..bdd7372f5 --- /dev/null +++ b/pkg/common/model/branch.go @@ -0,0 +1,112 @@ +package model + +import ( + "fmt" +) + +type BranchType int8 +type BranchStatus int8 + +const ( + BranchTypeAT BranchType = 0 + BranchTypeTCC BranchType = 1 + BranchTypeSAGA BranchType = 2 + BranchTypeXA BranchType = 3 +) + +const ( + /** + * The BranchStatus_Unknown. + * description:BranchStatus_Unknown branch status. + */ + BranchStatusUnknown BranchStatus = iota + + /** + * The BranchStatus_Registered. + * description:BranchStatus_Registered to TC. + */ + BranchStatusRegistered + + /** + * The Phase one done. + * description:Branch logic is successfully done at phase one. + */ + BranchStatusPhaseoneDone + + /** + * The Phase one failed. + * description:Branch logic is failed at phase one. + */ + BranchStatusPhaseoneFailed + + /** + * The Phase one timeout. + * description:Branch logic is NOT reported for a timeout. + */ + BranchStatusPhaseoneTimeout + + /** + * The Phase two committed. + * description:Commit logic is successfully done at phase two. + */ + BranchStatusPhasetwoCommitted + + /** + * The Phase two commit failed retryable. + * description:Commit logic is failed but retryable. + */ + BranchStatusPhasetwoCommitFailedRetryable + + /** + * The Phase two commit failed unretryable. + * description:Commit logic is failed and NOT retryable. + */ + BranchStatusPhasetwoCommitFailedUnretryable + + /** + * The Phase two rollbacked. + * description:Rollback logic is successfully done at phase two. + */ + BranchStatusPhasetwoRollbacked + + /** + * The Phase two rollback failed retryable. + * description:Rollback logic is failed but retryable. + */ + BranchStatusPhasetwoRollbackFailedRetryable + + /** + * The Phase two rollback failed unretryable. + * description:Rollback logic is failed but NOT retryable. + */ + BranchStatusPhasetwoRollbackFailedUnretryable +) + +func (s BranchStatus) String() string { + switch s { + case BranchStatusUnknown: + return "Unknown" + case BranchStatusRegistered: + return "Registered" + case BranchStatusPhaseoneDone: + return "PhaseoneDone" + case BranchStatusPhaseoneFailed: + return "PhaseoneFailed" + case BranchStatusPhaseoneTimeout: + return "PhaseoneTimeout" + case BranchStatusPhasetwoCommitted: + return "PhasetwoCommitted" + case BranchStatusPhasetwoCommitFailedRetryable: + return "PhasetwoCommitFailedRetryable" + case BranchStatusPhasetwoCommitFailedUnretryable: + return "CommitFailedUnretryable" + case BranchStatusPhasetwoRollbacked: + return "PhasetwoRollbacked" + case BranchStatusPhasetwoRollbackFailedRetryable: + return "RollbackFailedRetryable" + case BranchStatusPhasetwoRollbackFailedUnretryable: + return "RollbackFailedUnretryable" + default: + return fmt.Sprintf("%d", s) + } +} diff --git a/pkg/common/model/global_status.go b/pkg/common/model/global_status.go new file mode 100644 index 000000000..8e5385260 --- /dev/null +++ b/pkg/common/model/global_status.go @@ -0,0 +1,102 @@ +package model + +type GlobalStatus int64 + +const ( + + /** + * Un known global status. + */ + // Unknown + UnKnown GlobalStatus = 0 + + /** + * The Begin. + */ + // PHASE 1: can accept new branch registering. + Begin GlobalStatus = 1 + + /** + * PHASE 2: Running Status: may be changed any time. + */ + // Committing. + Committing GlobalStatus = 2 + + /** + * The Commit retrying. + */ + // Retrying commit after a recoverable failure. + CommitRetrying GlobalStatus = 3 + + /** + * Rollbacking global status. + */ + // Rollbacking + Rollbacking GlobalStatus = 4 + + /** + * The Rollback retrying. + */ + // Retrying rollback after a recoverable failure. + RollbackRetrying GlobalStatus = 5 + + /** + * The Timeout rollbacking. + */ + // Rollbacking since timeout + TimeoutRollbacking GlobalStatus = 6 + + /** + * The Timeout rollback retrying. + */ + // Retrying rollback GlobalStatus = since timeout) after a recoverable failure. + TimeoutRollbackRetrying GlobalStatus = 7 + + /** + * All branches can be async committed. The committing is NOT done yet, but it can be seen as committed for TM/RM + * client. + */ + AsyncCommitting GlobalStatus = 8 + + /** + * PHASE 2: Final Status: will NOT change any more. + */ + // Finally: global transaction is successfully committed. + Committed GlobalStatus = 9 + + /** + * The Commit failed. + */ + // Finally: failed to commit + CommitFailed GlobalStatus = 10 + + /** + * The Rollbacked. + */ + // Finally: global transaction is successfully rollbacked. + Rollbacked GlobalStatus = 11 + + /** + * The Rollback failed. + */ + // Finally: failed to rollback + RollbackFailed GlobalStatus = 12 + + /** + * The Timeout rollbacked. + */ + // Finally: global transaction is successfully rollbacked since timeout. + TimeoutRollbacked GlobalStatus = 13 + + /** + * The Timeout rollback failed. + */ + // Finally: failed to rollback since timeout + TimeoutRollbackFailed GlobalStatus = 14 + + /** + * The Finished. + */ + // Not managed in session MAP any more + Finished GlobalStatus = 15 +) diff --git a/pkg/common/model/resource.go b/pkg/common/model/resource.go new file mode 100644 index 000000000..2718261b4 --- /dev/null +++ b/pkg/common/model/resource.go @@ -0,0 +1,8 @@ +package model + +// Resource that can be managed by Resource Manager and involved into global transaction +type Resource interface { + GetResourceGroupId() string + GetResourceId() string + GetBranchType() BranchType +} diff --git a/pkg/common/model/resource_manager.go b/pkg/common/model/resource_manager.go new file mode 100644 index 000000000..8c4a3d80e --- /dev/null +++ b/pkg/common/model/resource_manager.go @@ -0,0 +1,42 @@ +package model + +import ( + "sync" +) + +// Control a branch transaction commit or rollback +type ResourceManagerInbound interface { + // Commit a branch transaction + BranchCommit(branchType BranchType, xid string, branchId int64, resourceId string, applicationData []byte) (BranchStatus, error) + // Rollback a branch transaction + BranchRollback(branchType BranchType, xid string, branchId int64, resourceId string, applicationData []byte) (BranchStatus, error) +} + +// Resource Manager: send outbound request to TC +type ResourceManagerOutbound interface { + // Branch register long + BranchRegister(branchType BranchType, resourceId, clientId, xid, applicationData, lockKeys string) (int64, error) + // Branch report + BranchReport(branchType BranchType, xid string, branchId int64, status BranchStatus, applicationData string) error + // Lock query boolean + LockQuery(branchType BranchType, resourceId, xid, lockKeys string) (bool, error) +} + +// Resource Manager: common behaviors +type ResourceManager interface { + ResourceManagerInbound + ResourceManagerOutbound + + // Register a Resource to be managed by Resource Manager + RegisterResource(resource Resource) error + // Unregister a Resource from the Resource Manager + UnregisterResource(resource Resource) error + // Get all resources managed by this manager + GetManagedResources() sync.Map + // Get the BranchType + GetBranchType() BranchType +} + +type ResourceManagerGetter interface { + GetResourceManager() ResourceManager +} diff --git a/pkg/common/model/transaction_exception_code.go b/pkg/common/model/transaction_exception_code.go new file mode 100644 index 000000000..4884abd60 --- /dev/null +++ b/pkg/common/model/transaction_exception_code.go @@ -0,0 +1,110 @@ +package model + +type TransactionExceptionCode byte + +const ( + /** + * Unknown transaction exception code. + */ + TransactionExceptionCodeUnknown TransactionExceptionCode = iota + + /** + * BeginFailed + */ + TransactionExceptionCodeBeginFailed + + /** + * Lock key conflict transaction exception code. + */ + TransactionExceptionCodeLockKeyConflict + + /** + * Io transaction exception code. + */ + IO + + /** + * Branch rollback failed retriable transaction exception code. + */ + TransactionExceptionCodeBranchRollbackFailedRetriable + + /** + * Branch rollback failed unretriable transaction exception code. + */ + TransactionExceptionCodeBranchRollbackFailedUnretriable + + /** + * Branch register failed transaction exception code. + */ + TransactionExceptionCodeBranchRegisterFailed + + /** + * Branch report failed transaction exception code. + */ + TransactionExceptionCodeBranchReportFailed + + /** + * Lockable check failed transaction exception code. + */ + TransactionExceptionCodeLockableCheckFailed + + /** + * Branch transaction not exist transaction exception code. + */ + TransactionExceptionCodeBranchTransactionNotExist + + /** + * Global transaction not exist transaction exception code. + */ + TransactionExceptionCodeGlobalTransactionNotExist + + /** + * Global transaction not active transaction exception code. + */ + TransactionExceptionCodeGlobalTransactionNotActive + + /** + * Global transaction status invalid transaction exception code. + */ + TransactionExceptionCodeGlobalTransactionStatusInvalid + + /** + * Failed to send branch commit request transaction exception code. + */ + TransactionExceptionCodeFailedToSendBranchCommitRequest + + /** + * Failed to send branch rollback request transaction exception code. + */ + TransactionExceptionCodeFailedToSendBranchRollbackRequest + + /** + * Failed to add branch transaction exception code. + */ + TransactionExceptionCodeFailedToAddBranch + + /** + * Failed to lock global transaction exception code. + */ + TransactionExceptionCodeFailedLockGlobalTranscation + + /** + * FailedWriteSession + */ + TransactionExceptionCodeFailedWriteSession + + /** + * Failed to holder exception code + */ + FailedStore +) + +type TransactionException struct { + Code TransactionExceptionCode + Message string +} + +//Error 隐式继承 builtin.error 接口 +func (e TransactionException) Error() string { + return "TransactionException: " + e.Message +} diff --git a/pkg/common/model/transaction_manager.go b/pkg/common/model/transaction_manager.go new file mode 100644 index 000000000..9bce9f2f2 --- /dev/null +++ b/pkg/common/model/transaction_manager.go @@ -0,0 +1,18 @@ +package model + +type TransactionManager interface { + // Begin a new global transaction. + Begin(applicationId, transactionServiceGroup, name string, timeout int64) (string, error) + + // Global commit. + Commit(xid string) (GlobalStatus, error) + + //Global rollback. + Rollback(xid string) (GlobalStatus, error) + + // Get current status of the give transaction. + GetStatus(xid string) (GlobalStatus, error) + + // Global report. + GlobalReport(xid string, globalStatus GlobalStatus) (GlobalStatus, error) +} diff --git a/pkg/config/client_config.go b/pkg/config/client_config.go new file mode 100644 index 000000000..d1471b7c0 --- /dev/null +++ b/pkg/config/client_config.go @@ -0,0 +1,51 @@ +package config + +import ( + "time" +) + +var clientConfig *ClientConfig + +type ClientConfig struct { + ApplicationID string `yaml:"application_id" json:"application_id,omitempty"` + TransactionServiceGroup string `yaml:"transaction_service_group" json:"transaction_service_group,omitempty"` + EnableClientBatchSendRequest bool `yaml:"enable-rpc_client-batch-send-request" json:"enable-rpc_client-batch-send-request,omitempty"` + SeataVersion string `yaml:"seata_version" json:"seata_version,omitempty"` + GettyConfig GettyConfig `yaml:"getty" json:"getty,omitempty"` + + TMConfig TMConfig `yaml:"tm" json:"tm,omitempty"` + + ATConfig struct { + DSN string `yaml:"dsn" json:"dsn,omitempty"` + ReportRetryCount int `default:"5" yaml:"report_retry_count" json:"report_retry_count,omitempty"` + ReportSuccessEnable bool `default:"false" yaml:"report_success_enable" json:"report_success_enable,omitempty"` + LockRetryInterval time.Duration `default:"10ms" yaml:"lock_retry_interval" json:"lock_retry_interval,omitempty"` + LockRetryTimes int `default:"30" yaml:"lock_retry_times" json:"lock_retry_times,omitempty"` + } `yaml:"at" json:"at,omitempty"` + + RegistryConfig RegistryConfig `yaml:"registry_config" json:"registry_config,omitempty"` //注册中心配置信息 + ConfigCenterConfig ConfigCenterConfig `yaml:"config_center" json:"config_center,omitempty"` //配置中心配置信息 +} + +func GetClientConfig() *ClientConfig { + // todo mock data + //return clientConfig + return &ClientConfig{ + GettyConfig: GetDefaultGettyConfig(), + } +} + +func GetTMConfig() TMConfig { + return clientConfig.TMConfig +} + +func GetDefaultClientConfig(applicationID string) *ClientConfig { + return &ClientConfig{ + ApplicationID: applicationID, + TransactionServiceGroup: "127.0.0.1:8091", + EnableClientBatchSendRequest: false, + SeataVersion: "1.1.0", + GettyConfig: GetDefaultGettyConfig(), + TMConfig: GetDefaultTmConfig(), + } +} diff --git a/pkg/config/config_center_config.go b/pkg/config/config_center_config.go new file mode 100644 index 000000000..fab775f15 --- /dev/null +++ b/pkg/config/config_center_config.go @@ -0,0 +1,31 @@ +package config + +import ( + "time" +) + +// ConfigCenterConfig config center config +type ConfigCenterConfig struct { + Mode string `yaml:"type" json:"type,omitempty"` //类型 + NacosConfig NacosConfigCenter `yaml:"nacos" json:"nacos,omitempty"` + ETCDConfig EtcdConfigCenter `yaml:"etcdv3" json:"etcdv3,omitempty"` +} + +// NacosConfigCenter nacos config center +type NacosConfigCenter struct { + ServerAddr string `yaml:"server_addr" json:"server_addr,omitempty"` + Group string `default:"SEATA_GROUP" yaml:"group" json:"group,omitempty"` + Namespace string `yaml:"namespace" json:"namespace,omitempty"` + Cluster string `yaml:"cluster" json:"cluster,omitempty"` + UserName string `yaml:"username" json:"username,omitempty"` + Password string `yaml:"password" json:"password,omitempty"` + DataID string `default:"seata" yaml:"data_id" json:"data_id,omitempty"` +} + +type EtcdConfigCenter struct { + Name string `default:"seata-config-center" yaml:"name" json:"name"` + ConfigKey string `default:"config-seata" yaml:"config_key" json:"config_key,omitempty"` + Endpoints string `yaml:"endpoints" json:"endpoints,omitempty"` + Heartbeats int `yaml:"heartbeats" json:"heartbeats"` + Timeout time.Duration `yaml:"timeout" json:"timeout"` +} diff --git a/pkg/config/getty_config.go b/pkg/config/getty_config.go new file mode 100644 index 000000000..bca95173b --- /dev/null +++ b/pkg/config/getty_config.go @@ -0,0 +1,56 @@ +package config + +import ( + "time" +) + +// GettyConfig +//Config holds supported types by the multiconfig package +type GettyConfig struct { + ReconnectInterval int `default:"0" yaml:"reconnect_interval" json:"reconnect_interval,omitempty"` + // getty_session pool + ConnectionNum int `default:"16" yaml:"connection_number" json:"connection_number,omitempty"` + + // heartbeat + HeartbeatPeriod time.Duration `default:"15s" yaml:"heartbeat_period" json:"heartbeat_period,omitempty"` + + // getty_session tcp parameters + GettySessionParam GettySessionParam `required:"true" yaml:"getty_session_param" json:"getty_session_param,omitempty"` +} + +// GetDefaultGettyConfig ... +func GetDefaultGettyConfig() GettyConfig { + return GettyConfig{ + ReconnectInterval: 0, + ConnectionNum: 2, + HeartbeatPeriod: 10 * time.Second, + GettySessionParam: GettySessionParam{ + CompressEncoding: false, + TCPNoDelay: true, + TCPKeepAlive: true, + KeepAlivePeriod: 180 * time.Second, + TCPRBufSize: 262144, + TCPWBufSize: 65536, + TCPReadTimeout: time.Second, + TCPWriteTimeout: 5 * time.Second, + WaitTimeout: time.Second, + MaxMsgLen: 4096, + SessionName: "rpc_client", + }, + } +} + +// GettySessionParam getty session param +type GettySessionParam struct { + CompressEncoding bool `default:"false" yaml:"compress_encoding" json:"compress_encoding,omitempty"` + TCPNoDelay bool `default:"true" yaml:"tcp_no_delay" json:"tcp_no_delay,omitempty"` + TCPKeepAlive bool `default:"true" yaml:"tcp_keep_alive" json:"tcp_keep_alive,omitempty"` + KeepAlivePeriod time.Duration `default:"180s" yaml:"keep_alive_period" json:"keep_alive_period,omitempty"` + TCPRBufSize int `default:"262144" yaml:"tcp_r_buf_size" json:"tcp_r_buf_size,omitempty"` + TCPWBufSize int `default:"65536" yaml:"tcp_w_buf_size" json:"tcp_w_buf_size,omitempty"` + TCPReadTimeout time.Duration `default:"1s" yaml:"tcp_read_timeout" json:"tcp_read_timeout,omitempty"` + TCPWriteTimeout time.Duration `default:"5s" yaml:"tcp_write_timeout" json:"tcp_write_timeout,omitempty"` + WaitTimeout time.Duration `default:"7s" yaml:"wait_timeout" json:"wait_timeout,omitempty"` + MaxMsgLen int `default:"4096" yaml:"max_msg_len" json:"max_msg_len,omitempty"` + SessionName string `default:"rpc" yaml:"session_name" json:"session_name,omitempty"` +} diff --git a/pkg/config/registry_config.go b/pkg/config/registry_config.go new file mode 100644 index 000000000..703925283 --- /dev/null +++ b/pkg/config/registry_config.go @@ -0,0 +1,42 @@ +package config + +import ( + "time" +) + +var config *RegistryConfig + +// RegistryConfig registry config +type RegistryConfig struct { + Mode string `yaml:"type" json:"type,omitempty"` //类型 + NacosConfig NacosConfig `yaml:"nacos" json:"nacos,omitempty"` + EtcdConfig EtcdConfig `yaml:"etcdv3" json:"etcdv3"` +} + +// NacosConfig nacos config +type NacosConfig struct { + Application string `yaml:"application" json:"application,omitempty"` + ServerAddr string `yaml:"server_addr" json:"server_addr,omitempty"` + Group string `default:"SEATA_GROUP" yaml:"group" json:"group,omitempty"` + Namespace string `yaml:"namespace" json:"namespace,omitempty"` + Cluster string `yaml:"cluster" json:"cluster,omitempty"` + UserName string `yaml:"username" json:"username,omitempty"` + Password string `yaml:"password" json:"password,omitempty"` +} + +// InitRegistryConfig init registry config +func InitRegistryConfig(registryConfig *RegistryConfig) { + config = registryConfig +} + +// GetRegistryConfig get registry config +func GetRegistryConfig() *RegistryConfig { + return config +} + +type EtcdConfig struct { + ClusterName string `default:"seata-golang-etcdv3" yaml:"cluster_name" json:"cluster_name,omitempty"` + Endpoints string `yaml:"endpoints" json:"endpoints,omitempty"` + Heartbeats int `yaml:"heartbeats" json:"heartbeats"` + Timeout time.Duration `yaml:"timeout" json:"timeout"` +} diff --git a/pkg/config/tm_config.go b/pkg/config/tm_config.go new file mode 100644 index 000000000..41831fc0c --- /dev/null +++ b/pkg/config/tm_config.go @@ -0,0 +1,13 @@ +package config + +type TMConfig struct { + CommitRetryCount int32 `default:"5" yaml:"commit_retry_count" json:"commit_retry_count,omitempty"` + RollbackRetryCount int32 `default:"5" yaml:"rollback_retry_count" json:"rollback_retry_count,omitempty"` +} + +func GetDefaultTmConfig() TMConfig { + return TMConfig{ + CommitRetryCount: 5, + RollbackRetryCount: 5, + } +} diff --git a/pkg/imports/imports.go b/pkg/imports/imports.go new file mode 100644 index 000000000..920467b59 --- /dev/null +++ b/pkg/imports/imports.go @@ -0,0 +1,6 @@ +package imports + +import ( + _ "github.com/seata/seata-go/pkg/rpc/getty" + _ "github.com/seata/seata-go/pkg/rpc/processor/client" +) diff --git a/pkg/protocol/codec/codec.go b/pkg/protocol/codec/codec.go new file mode 100644 index 000000000..303c7d9e8 --- /dev/null +++ b/pkg/protocol/codec/codec.go @@ -0,0 +1,247 @@ +package codec + +import ( + "bytes" +) + +import ( + "vimagination.zapto.org/byteio" +) + +import ( + "github.com/seata/seata-go/pkg/protocol" + "github.com/seata/seata-go/pkg/utils/log" +) + +type SerializerType byte + +const ( + SEATA = byte(0x1) + PROTOBUF = byte(0x2) + KRYO = byte(0x4) + FST = byte(0x8) +) + +type Encoder func(in interface{}) []byte + +type Decoder func(in []byte) (interface{}, int) + +func MessageEncoder(codecType byte, in interface{}) []byte { + switch codecType { + case SEATA: + return SeataEncoder(in) + default: + log.Errorf("not support codecType, %s", codecType) + return nil + } +} + +func MessageDecoder(codecType byte, in []byte) (interface{}, int) { + switch codecType { + case SEATA: + return SeataDecoder(in) + default: + log.Errorf("not support codecType, %s", codecType) + return nil, 0 + } +} + +func SeataEncoder(in interface{}) []byte { + var result = make([]byte, 0) + msg := in.(protocol.MessageTypeAware) + typeCode := msg.GetTypeCode() + encoder := getMessageEncoder(typeCode) + + typeC := uint16(typeCode) + if encoder != nil { + body := encoder(in) + result = append(result, []byte{byte(typeC >> 8), byte(typeC)}...) + result = append(result, body...) + } + return result +} + +func SeataDecoder(in []byte) (interface{}, int) { + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + typeCode, _, _ := r.ReadInt16() + + decoder := getMessageDecoder(protocol.MessageType(typeCode)) + if decoder != nil { + return decoder(in[2:]) + } + return nil, 0 +} + +func getMessageEncoder(typeCode protocol.MessageType) Encoder { + switch typeCode { + case protocol.MessageTypeSeataMerge: + return MergedWarpMessageEncoder + case protocol.MessageTypeSeataMergeResult: + return MergeResultMessageEncoder + case protocol.MessageTypeRegClt: + return RegisterTMRequestEncoder + case protocol.MessageTypeRegCltResult: + return RegisterTMResponseEncoder + case protocol.MessageTypeRegRm: + return RegisterRMRequestEncoder + case protocol.MessageTypeRegRmResult: + return RegisterRMResponseEncoder + case protocol.MessageTypeBranchCommit: + return BranchCommitRequestEncoder + case protocol.MessageTypeBranchRollback: + return BranchRollbackRequestEncoder + case protocol.MessageTypeGlobalReport: + return GlobalReportRequestEncoder + default: + var encoder Encoder + encoder = getMergeRequestMessageEncoder(typeCode) + if encoder != nil { + return encoder + } + encoder = getMergeResponseMessageEncoder(typeCode) + if encoder != nil { + return encoder + } + log.Errorf("not support typeCode, %d", typeCode) + return nil + } +} + +func getMergeRequestMessageEncoder(typeCode protocol.MessageType) Encoder { + switch typeCode { + case protocol.MessageTypeGlobalBegin: + return GlobalBeginRequestEncoder + case protocol.MessageTypeGlobalCommit: + return GlobalCommitRequestEncoder + case protocol.MessageTypeGlobalRollback: + return GlobalRollbackRequestEncoder + case protocol.MessageTypeGlobalStatus: + return GlobalStatusRequestEncoder + case protocol.MessageTypeGlobalLockQuery: + return GlobalLockQueryRequestEncoder + case protocol.MessageTypeBranchRegister: + return BranchRegisterRequestEncoder + case protocol.MessageTypeBranchStatusReport: + return BranchReportRequestEncoder + case protocol.MessageTypeGlobalReport: + return GlobalReportRequestEncoder + default: + break + } + return nil +} + +func getMergeResponseMessageEncoder(typeCode protocol.MessageType) Encoder { + switch typeCode { + case protocol.MessageTypeGlobalBeginResult: + return GlobalBeginResponseEncoder + case protocol.MessageTypeGlobalCommitResult: + return GlobalCommitResponseEncoder + case protocol.MessageTypeGlobalRollbackResult: + return GlobalRollbackResponseEncoder + case protocol.MessageTypeGlobalStatusResult: + return GlobalStatusResponseEncoder + case protocol.MessageTypeGlobalLockQueryResult: + return GlobalLockQueryResponseEncoder + case protocol.MessageTypeBranchRegisterResult: + return BranchRegisterResponseEncoder + case protocol.MessageTypeBranchStatusReportResult: + return BranchReportResponseEncoder + case protocol.MessageTypeBranchCommitResult: + return BranchCommitResponseEncoder + case protocol.MessageTypeBranchRollbackResult: + return BranchRollbackResponseEncoder + case protocol.MessageTypeGlobalReportResult: + return GlobalReportResponseEncoder + default: + break + } + return nil +} + +func getMessageDecoder(typeCode protocol.MessageType) Decoder { + switch typeCode { + case protocol.MessageTypeSeataMerge: + return MergedWarpMessageDecoder + case protocol.MessageTypeSeataMergeResult: + return MergeResultMessageDecoder + case protocol.MessageTypeRegClt: + return RegisterTMRequestDecoder + case protocol.MessageTypeRegCltResult: + return RegisterTMResponseDecoder + case protocol.MessageTypeRegRm: + return RegisterRMRequestDecoder + case protocol.MessageTypeRegRmResult: + return RegisterRMResponseDecoder + case protocol.MessageTypeBranchCommit: + return BranchCommitRequestDecoder + case protocol.MessageTypeBranchRollback: + return BranchRollbackRequestDecoder + case protocol.MessageTypeGlobalReport: + return GlobalReportRequestDecoder + default: + var Decoder Decoder + Decoder = getMergeRequestMessageDecoder(typeCode) + if Decoder != nil { + return Decoder + } + Decoder = getMergeResponseMessageDecoder(typeCode) + if Decoder != nil { + return Decoder + } + log.Errorf("not support typeCode, %d", typeCode) + return nil + } +} + +func getMergeRequestMessageDecoder(typeCode protocol.MessageType) Decoder { + switch typeCode { + case protocol.MessageTypeGlobalBegin: + return GlobalBeginRequestDecoder + case protocol.MessageTypeGlobalCommit: + return GlobalCommitRequestDecoder + case protocol.MessageTypeGlobalRollback: + return GlobalRollbackRequestDecoder + case protocol.MessageTypeGlobalStatus: + return GlobalStatusRequestDecoder + case protocol.MessageTypeGlobalLockQuery: + return GlobalLockQueryRequestDecoder + case protocol.MessageTypeBranchRegister: + return BranchRegisterRequestDecoder + case protocol.MessageTypeBranchStatusReport: + return BranchReportRequestDecoder + case protocol.MessageTypeGlobalReport: + return GlobalReportRequestDecoder + default: + break + } + return nil +} + +func getMergeResponseMessageDecoder(typeCode protocol.MessageType) Decoder { + switch typeCode { + case protocol.MessageTypeGlobalBeginResult: + return GlobalBeginResponseDecoder + case protocol.MessageTypeGlobalCommitResult: + return GlobalCommitResponseDecoder + case protocol.MessageTypeGlobalRollbackResult: + return GlobalRollbackResponseDecoder + case protocol.MessageTypeGlobalStatusResult: + return GlobalStatusResponseDecoder + case protocol.MessageTypeGlobalLockQueryResult: + return GlobalLockQueryResponseDecoder + case protocol.MessageTypeBranchRegisterResult: + return BranchRegisterResponseDecoder + case protocol.MessageTypeBranchStatusReportResult: + return BranchReportResponseDecoder + case protocol.MessageTypeBranchCommitResult: + return BranchCommitResponseDecoder + case protocol.MessageTypeBranchRollbackResult: + return BranchRollbackResponseDecoder + case protocol.MessageTypeGlobalReportResult: + return GlobalReportResponseDecoder + default: + break + } + return nil +} diff --git a/pkg/protocol/codec/seata_decoder.go b/pkg/protocol/codec/seata_decoder.go new file mode 100644 index 000000000..bedafd0d0 --- /dev/null +++ b/pkg/protocol/codec/seata_decoder.go @@ -0,0 +1,780 @@ +package codec + +import ( + "bytes" +) + +import ( + "vimagination.zapto.org/byteio" +) + +import ( + model2 "github.com/seata/seata-go/pkg/common/model" + "github.com/seata/seata-go/pkg/protocol" +) + +func AbstractResultMessageDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.AbstractResultMessage{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + resultCode, _ := r.ReadByte() + msg.ResultCode = protocol.ResultCode(resultCode) + totalReadN += 1 + if msg.ResultCode == protocol.ResultCodeFailed { + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Msg, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + } + + return msg, totalReadN +} + +func MergedWarpMessageDecoder(in []byte) (interface{}, int) { + var ( + size16 int16 = 0 + readN = 0 + totalReadN = 0 + ) + result := protocol.MergedWarpMessage{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + + r.ReadInt32() + totalReadN += 4 + size16, readN, _ = r.ReadInt16() + totalReadN += readN + result.Msgs = make([]protocol.MessageTypeAware, 0) + for index := 0; index < int(size16); index++ { + typeCode, _, _ := r.ReadInt16() + totalReadN += 2 + decoder := getMessageDecoder(protocol.MessageType(typeCode)) + if decoder != nil { + msg, readN := decoder(in[totalReadN:]) + totalReadN += readN + result.Msgs = append(result.Msgs, msg.(protocol.MessageTypeAware)) + } + } + return result, totalReadN +} + +func MergeResultMessageDecoder(in []byte) (interface{}, int) { + var ( + size16 int16 = 0 + readN = 0 + totalReadN = 0 + ) + result := protocol.MergeResultMessage{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + + r.ReadInt32() + totalReadN += 4 + size16, readN, _ = r.ReadInt16() + totalReadN += readN + result.Msgs = make([]protocol.MessageTypeAware, 0) + + for index := 0; index < int(size16); index++ { + typeCode, _, _ := r.ReadInt16() + totalReadN += 2 + decoder := getMessageDecoder(protocol.MessageType(typeCode)) + if decoder != nil { + msg, readN := decoder(in[totalReadN:]) + totalReadN += readN + result.Msgs = append(result.Msgs, msg.(protocol.MessageTypeAware)) + } + } + return result, totalReadN +} + +func AbstractIdentifyRequestDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.AbstractIdentifyRequest{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Version, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.ApplicationId, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.TransactionServiceGroup, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.ExtraData = make([]byte, int(length16)) + readN, _ := r.Read(msg.ExtraData) + totalReadN += readN + } + + return msg, totalReadN +} + +func AbstractIdentifyResponseDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.AbstractIdentifyResponse{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + + identified, _ := r.ReadByte() + totalReadN += 1 + if identified == byte(1) { + msg.Identified = true + } else if identified == byte(0) { + msg.Identified = false + } + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Version, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + return msg, totalReadN +} + +func RegisterRMRequestDecoder(in []byte) (interface{}, int) { + var ( + length32 uint32 = 0 + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.RegisterRMRequest{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Version, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.ApplicationId, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.TransactionServiceGroup, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.ExtraData = make([]byte, int(length16)) + readN, _ := r.Read(msg.ExtraData) + totalReadN += readN + } + + length32, readN, _ = r.ReadUint32() + totalReadN += readN + if length32 > 0 { + msg.ResourceIds, readN, _ = r.ReadString(int(length32)) + totalReadN += readN + } + + return msg, totalReadN +} + +func RegisterRMResponseDecoder(in []byte) (interface{}, int) { + resp, totalReadN := AbstractIdentifyResponseDecoder(in) + abstractIdentifyResponse := resp.(protocol.AbstractIdentifyResponse) + msg := protocol.RegisterRMResponse{AbstractIdentifyResponse: abstractIdentifyResponse} + return msg, totalReadN +} + +func RegisterTMRequestDecoder(in []byte) (interface{}, int) { + req, totalReadN := AbstractIdentifyRequestDecoder(in) + abstractIdentifyRequest := req.(protocol.AbstractIdentifyRequest) + msg := protocol.RegisterTMRequest{AbstractIdentifyRequest: abstractIdentifyRequest} + return msg, totalReadN +} + +func RegisterTMResponseDecoder(in []byte) (interface{}, int) { + resp, totalReadN := AbstractIdentifyResponseDecoder(in) + abstractIdentifyResponse := resp.(protocol.AbstractIdentifyResponse) + msg := protocol.RegisterRMResponse{AbstractIdentifyResponse: abstractIdentifyResponse} + return msg, totalReadN +} + +func AbstractTransactionResponseDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.AbstractTransactionResponse{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + resultCode, _ := r.ReadByte() + totalReadN += 1 + msg.ResultCode = protocol.ResultCode(resultCode) + if msg.ResultCode == protocol.ResultCodeFailed { + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Msg, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + } + + exceptionCode, _ := r.ReadByte() + totalReadN += 1 + msg.TransactionExceptionCode = model2.TransactionExceptionCode(exceptionCode) + + return msg, totalReadN +} + +func AbstractBranchEndRequestDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.AbstractBranchEndRequest{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Xid, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + msg.BranchId, _, _ = r.ReadInt64() + totalReadN += 8 + branchType, _ := r.ReadByte() + totalReadN += 1 + msg.BranchType = model2.BranchType(branchType) + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.ResourceId, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.ApplicationData = make([]byte, int(length16)) + readN, _ := r.Read(msg.ApplicationData) + totalReadN += readN + } + + return msg, totalReadN +} + +func AbstractBranchEndResponseDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.AbstractBranchEndResponse{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + resultCode, _ := r.ReadByte() + totalReadN += 1 + msg.ResultCode = protocol.ResultCode(resultCode) + if msg.ResultCode == protocol.ResultCodeFailed { + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Msg, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + } + + exceptionCode, _ := r.ReadByte() + totalReadN += 1 + msg.TransactionExceptionCode = model2.TransactionExceptionCode(exceptionCode) + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Xid, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + msg.BranchId, _, _ = r.ReadInt64() + totalReadN += 8 + branchStatus, _ := r.ReadByte() + totalReadN += 1 + msg.BranchStatus = model2.BranchStatus(branchStatus) + + return msg, totalReadN +} + +func AbstractGlobalEndRequestDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.AbstractGlobalEndRequest{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Xid, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.ExtraData = make([]byte, int(length16)) + readN, _ := r.Read(msg.ExtraData) + totalReadN += readN + } + + return msg, totalReadN +} + +func AbstractGlobalEndResponseDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.AbstractGlobalEndResponse{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + resultCode, _ := r.ReadByte() + totalReadN += 1 + msg.ResultCode = protocol.ResultCode(resultCode) + if msg.ResultCode == protocol.ResultCodeFailed { + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Msg, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + } + + exceptionCode, _ := r.ReadByte() + totalReadN += 1 + msg.TransactionExceptionCode = model2.TransactionExceptionCode(exceptionCode) + + globalStatus, _ := r.ReadByte() + totalReadN += 1 + msg.GlobalStatus = model2.GlobalStatus(globalStatus) + + return msg, totalReadN +} + +func BranchCommitRequestDecoder(in []byte) (interface{}, int) { + req, totalReadN := AbstractBranchEndRequestDecoder(in) + abstractBranchEndRequest := req.(protocol.AbstractBranchEndRequest) + msg := protocol.BranchCommitRequest{AbstractBranchEndRequest: abstractBranchEndRequest} + return msg, totalReadN +} + +func BranchCommitResponseDecoder(in []byte) (interface{}, int) { + resp, totalReadN := AbstractBranchEndResponseDecoder(in) + abstractBranchEndResponse := resp.(protocol.AbstractBranchEndResponse) + msg := protocol.BranchCommitResponse{AbstractBranchEndResponse: abstractBranchEndResponse} + return msg, totalReadN +} + +func BranchRegisterRequestDecoder(in []byte) (interface{}, int) { + var ( + length32 uint32 = 0 + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.BranchRegisterRequest{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Xid, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + branchType, _ := r.ReadByte() + totalReadN += 1 + msg.BranchType = model2.BranchType(branchType) + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.ResourceId, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + length32, readN, _ = r.ReadUint32() + totalReadN += readN + if length32 > 0 { + msg.LockKey, readN, _ = r.ReadString(int(length32)) + totalReadN += readN + } + + length32, readN, _ = r.ReadUint32() + totalReadN += readN + if length32 > 0 { + msg.ApplicationData = make([]byte, int(length32)) + readN, _ := r.Read(msg.ApplicationData) + totalReadN += readN + } + + return msg, totalReadN +} + +func BranchRegisterResponseDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.BranchRegisterResponse{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + resultCode, _ := r.ReadByte() + totalReadN += 1 + msg.ResultCode = protocol.ResultCode(resultCode) + if msg.ResultCode == protocol.ResultCodeFailed { + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Msg, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + } + + exceptionCode, _ := r.ReadByte() + totalReadN += 1 + msg.TransactionExceptionCode = model2.TransactionExceptionCode(exceptionCode) + + msg.BranchId, readN, _ = r.ReadInt64() + totalReadN += readN + + return msg, totalReadN +} + +func BranchReportRequestDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.BranchReportRequest{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Xid, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + msg.BranchId, _, _ = r.ReadInt64() + branchStatus, _ := r.ReadByte() + msg.Status = model2.BranchStatus(branchStatus) + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.ResourceId, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.ApplicationData = make([]byte, int(length16)) + readN, _ := r.Read(msg.ApplicationData) + totalReadN += readN + } + + branchType, _ := r.ReadByte() + totalReadN += 1 + msg.BranchType = model2.BranchType(branchType) + + return msg, totalReadN +} + +func BranchReportResponseDecoder(in []byte) (interface{}, int) { + resp, totalReadN := AbstractTransactionResponseDecoder(in) + abstractTransactionResponse := resp.(protocol.AbstractTransactionResponse) + msg := protocol.BranchReportResponse{AbstractTransactionResponse: abstractTransactionResponse} + return msg, totalReadN +} + +func BranchRollbackRequestDecoder(in []byte) (interface{}, int) { + req, totalReadN := AbstractBranchEndRequestDecoder(in) + abstractBranchEndRequest := req.(protocol.AbstractBranchEndRequest) + msg := protocol.BranchRollbackRequest{AbstractBranchEndRequest: abstractBranchEndRequest} + return msg, totalReadN +} + +func BranchRollbackResponseDecoder(in []byte) (interface{}, int) { + resp, totalReadN := AbstractBranchEndResponseDecoder(in) + abstractBranchEndResponse := resp.(protocol.AbstractBranchEndResponse) + msg := protocol.BranchRollbackResponse{AbstractBranchEndResponse: abstractBranchEndResponse} + return msg, totalReadN +} + +func GlobalBeginRequestDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.GlobalBeginRequest{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + + timeout, readN, _ := r.ReadInt32() + totalReadN += readN + msg.Timeout = timeout + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.TransactionName, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + return msg, totalReadN +} + +func GlobalBeginResponseDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.GlobalBeginResponse{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + resultCode, _ := r.ReadByte() + totalReadN += 1 + msg.ResultCode = protocol.ResultCode(resultCode) + if msg.ResultCode == protocol.ResultCodeFailed { + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Msg, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + } + + exceptionCode, _ := r.ReadByte() + totalReadN += 1 + msg.TransactionExceptionCode = model2.TransactionExceptionCode(exceptionCode) + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Xid, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.ExtraData = make([]byte, int(length16)) + readN, _ := r.Read(msg.ExtraData) + totalReadN += readN + } + + return msg, totalReadN +} + +func GlobalCommitRequestDecoder(in []byte) (interface{}, int) { + req, totalReadN := AbstractGlobalEndRequestDecoder(in) + abstractGlobalEndRequest := req.(protocol.AbstractGlobalEndRequest) + msg := protocol.GlobalCommitRequest{AbstractGlobalEndRequest: abstractGlobalEndRequest} + return msg, totalReadN +} + +func GlobalCommitResponseDecoder(in []byte) (interface{}, int) { + resp, totalReadN := AbstractGlobalEndResponseDecoder(in) + abstractGlobalEndResponse := resp.(protocol.AbstractGlobalEndResponse) + msg := protocol.GlobalCommitResponse{AbstractGlobalEndResponse: abstractGlobalEndResponse} + return msg, totalReadN +} + +func GlobalLockQueryRequestDecoder(in []byte) (interface{}, int) { + req, totalReadN := BranchRegisterRequestDecoder(in) + branchRegisterRequest := req.(protocol.BranchRegisterRequest) + msg := protocol.GlobalLockQueryRequest{BranchRegisterRequest: branchRegisterRequest} + return msg, totalReadN +} + +func GlobalLockQueryResponseDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.GlobalLockQueryResponse{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + resultCode, _ := r.ReadByte() + totalReadN += 1 + msg.ResultCode = protocol.ResultCode(resultCode) + if msg.ResultCode == protocol.ResultCodeFailed { + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Msg, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + } + + exceptionCode, _ := r.ReadByte() + totalReadN += 1 + msg.TransactionExceptionCode = model2.TransactionExceptionCode(exceptionCode) + + lockable, readN, _ := r.ReadUint16() + totalReadN += readN + if lockable == uint16(1) { + msg.Lockable = true + } else if lockable == uint16(0) { + msg.Lockable = false + } + + return msg, totalReadN +} + +func GlobalReportRequestDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.GlobalReportRequest{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.Xid, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.ExtraData = make([]byte, int(length16)) + readN, _ := r.Read(msg.ExtraData) + totalReadN += readN + } + + globalStatus, _ := r.ReadByte() + totalReadN += 1 + msg.GlobalStatus = model2.GlobalStatus(globalStatus) + + return msg, totalReadN +} + +func GlobalReportResponseDecoder(in []byte) (interface{}, int) { + resp, totalReadN := AbstractGlobalEndResponseDecoder(in) + abstractGlobalEndResponse := resp.(protocol.AbstractGlobalEndResponse) + msg := protocol.GlobalReportResponse{AbstractGlobalEndResponse: abstractGlobalEndResponse} + return msg, totalReadN +} + +func GlobalRollbackRequestDecoder(in []byte) (interface{}, int) { + req, totalReadN := AbstractGlobalEndRequestDecoder(in) + abstractGlobalEndRequest := req.(protocol.AbstractGlobalEndRequest) + msg := protocol.GlobalRollbackRequest{AbstractGlobalEndRequest: abstractGlobalEndRequest} + return msg, totalReadN +} + +func GlobalRollbackResponseDecoder(in []byte) (interface{}, int) { + resp, totalReadN := AbstractGlobalEndResponseDecoder(in) + abstractGlobalEndResponse := resp.(protocol.AbstractGlobalEndResponse) + msg := protocol.GlobalRollbackResponse{AbstractGlobalEndResponse: abstractGlobalEndResponse} + return msg, totalReadN +} + +func GlobalStatusRequestDecoder(in []byte) (interface{}, int) { + req, totalReadN := AbstractGlobalEndRequestDecoder(in) + abstractGlobalEndRequest := req.(protocol.AbstractGlobalEndRequest) + msg := protocol.GlobalStatusRequest{AbstractGlobalEndRequest: abstractGlobalEndRequest} + return msg, totalReadN +} + +func GlobalStatusResponseDecoder(in []byte) (interface{}, int) { + resp, totalReadN := AbstractGlobalEndResponseDecoder(in) + abstractGlobalEndResponse := resp.(protocol.AbstractGlobalEndResponse) + msg := protocol.GlobalStatusResponse{AbstractGlobalEndResponse: abstractGlobalEndResponse} + return msg, totalReadN +} + +func UndoLogDeleteRequestDecoder(in []byte) (interface{}, int) { + var ( + length16 uint16 = 0 + readN = 0 + totalReadN = 0 + ) + msg := protocol.UndoLogDeleteRequest{} + + r := byteio.BigEndianReader{Reader: bytes.NewReader(in)} + branchType, _ := r.ReadByte() + totalReadN += 1 + msg.BranchType = model2.BranchType(branchType) + + length16, readN, _ = r.ReadUint16() + totalReadN += readN + if length16 > 0 { + msg.ResourceId, readN, _ = r.ReadString(int(length16)) + totalReadN += readN + } + + day, readN, _ := r.ReadInt16() + msg.SaveDays = protocol.MessageType(day) + totalReadN += readN + + return msg, totalReadN +} diff --git a/pkg/protocol/codec/seata_encoder.go b/pkg/protocol/codec/seata_encoder.go new file mode 100644 index 000000000..1059603b1 --- /dev/null +++ b/pkg/protocol/codec/seata_encoder.go @@ -0,0 +1,565 @@ +package codec + +import ( + "bytes" +) + +import ( + "vimagination.zapto.org/byteio" +) + +import ( + "github.com/seata/seata-go/pkg/protocol" + "github.com/seata/seata-go/pkg/utils/log" +) + +func AbstractResultMessageEncoder(in interface{}) []byte { + var ( + zero16 int16 = 0 + b bytes.Buffer + ) + w := byteio.BigEndianWriter{Writer: &b} + + message := in.(protocol.AbstractResultMessage) + + w.WriteByte(byte(message.ResultCode)) + if message.ResultCode == protocol.ResultCodeFailed { + var msg string + if message.Msg != "" { + if len(message.Msg) > 128 { + msg = message.Msg[:128] + } else { + msg = message.Msg + } + // 暂时不考虑 message.Msg 包含中文的情况,这样字符串的长度就是 byte 数组的长度 + + w.WriteInt16(int16(len(msg))) + w.WriteString(msg) + } else { + w.WriteInt16(zero16) + } + } + + return b.Bytes() +} + +func MergedWarpMessageEncoder(in interface{}) []byte { + var ( + b bytes.Buffer + result = make([]byte, 0) + ) + w := byteio.BigEndianWriter{Writer: &b} + + req, _ := in.(protocol.MergedWarpMessage) + w.WriteInt16(int16(len(req.Msgs))) + + for _, msg := range req.Msgs { + encoder := getMessageEncoder(msg.GetTypeCode()) + if encoder != nil { + data := encoder(msg) + w.WriteInt16(int16(msg.GetTypeCode())) + w.Write(data) + } + } + + size := uint32(b.Len()) + result = append(result, []byte{byte(size >> 24), byte(size >> 16), byte(size >> 8), byte(size)}...) + result = append(result, b.Bytes()...) + + if len(req.Msgs) > 20 { + log.Debugf("msg in one packet: %s ,buffer size: %s", len(req.Msgs), size) + } + return result +} + +func MergeResultMessageEncoder(in interface{}) []byte { + var ( + b bytes.Buffer + result = make([]byte, 0) + ) + w := byteio.BigEndianWriter{Writer: &b} + + req, _ := in.(protocol.MergeResultMessage) + w.WriteInt16(int16(len(req.Msgs))) + + for _, msg := range req.Msgs { + encoder := getMessageEncoder(msg.GetTypeCode()) + if encoder != nil { + data := encoder(msg) + w.WriteInt16(int16(msg.GetTypeCode())) + w.Write(data) + } + } + + size := uint32(b.Len()) + result = append(result, []byte{byte(size >> 24), byte(size >> 16), byte(size >> 8), byte(size)}...) + result = append(result, b.Bytes()...) + + if len(req.Msgs) > 20 { + log.Debugf("msg in one packet: %s ,buffer size: %s", len(req.Msgs), size) + } + return result +} + +func AbstractIdentifyRequestEncoder(in interface{}) []byte { + var ( + zero16 int16 = 0 + b bytes.Buffer + ) + w := byteio.BigEndianWriter{Writer: &b} + + req := in.(protocol.AbstractIdentifyRequest) + + if req.Version != "" { + w.WriteInt16(int16(len(req.Version))) + w.WriteString(req.Version) + } else { + w.WriteInt16(zero16) + } + + if req.ApplicationId != "" { + w.WriteInt16(int16(len(req.ApplicationId))) + w.WriteString(req.ApplicationId) + } else { + w.WriteInt16(zero16) + } + + if req.TransactionServiceGroup != "" { + w.WriteInt16(int16(len(req.TransactionServiceGroup))) + w.WriteString(req.TransactionServiceGroup) + } else { + w.WriteInt16(zero16) + } + + if req.ExtraData != nil { + w.WriteUint16(uint16(len(req.ExtraData))) + w.Write(req.ExtraData) + } else { + w.WriteInt16(zero16) + } + + return b.Bytes() +} + +func AbstractIdentifyResponseEncoder(in interface{}) []byte { + resp := in.(protocol.AbstractIdentifyResponse) + + var ( + zero16 int16 = 0 + b bytes.Buffer + ) + w := byteio.BigEndianWriter{Writer: &b} + + if resp.Identified { + w.WriteByte(byte(1)) + } else { + w.WriteByte(byte(0)) + } + + if resp.Version != "" { + w.WriteInt16(int16(len(resp.Version))) + w.WriteString(resp.Version) + } else { + w.WriteInt16(zero16) + } + + return b.Bytes() +} + +func RegisterRMRequestEncoder(in interface{}) []byte { + req := in.(protocol.RegisterRMRequest) + data := AbstractIdentifyRequestEncoder(req.AbstractIdentifyRequest) + + var ( + zero32 int32 = 0 + b bytes.Buffer + ) + w := byteio.BigEndianWriter{Writer: &b} + + if req.ResourceIds != "" { + w.WriteInt32(int32(len(req.ResourceIds))) + w.WriteString(req.ResourceIds) + } else { + w.WriteInt32(zero32) + } + + result := append(data, b.Bytes()...) + return result +} + +func RegisterRMResponseEncoder(in interface{}) []byte { + resp := in.(protocol.RegisterRMResponse) + return AbstractIdentifyResponseEncoder(resp.AbstractIdentifyResponse) +} + +func RegisterTMRequestEncoder(in interface{}) []byte { + req := in.(protocol.RegisterTMRequest) + return AbstractIdentifyRequestEncoder(req.AbstractIdentifyRequest) +} + +func RegisterTMResponseEncoder(in interface{}) []byte { + resp := in.(protocol.RegisterTMResponse) + return AbstractIdentifyResponseEncoder(resp.AbstractIdentifyResponse) +} + +func AbstractTransactionResponseEncoder(in interface{}) []byte { + resp := in.(protocol.AbstractTransactionResponse) + data := AbstractResultMessageEncoder(resp.AbstractResultMessage) + + result := append(data, byte(resp.TransactionExceptionCode)) + + return result +} + +func AbstractBranchEndRequestEncoder(in interface{}) []byte { + var ( + zero32 int32 = 0 + zero16 int16 = 0 + b bytes.Buffer + ) + w := byteio.BigEndianWriter{Writer: &b} + + req, _ := in.(protocol.AbstractBranchEndRequest) + + if req.Xid != "" { + w.WriteInt16(int16(len(req.Xid))) + w.WriteString(req.Xid) + } else { + w.WriteInt16(zero16) + } + + w.WriteInt64(req.BranchId) + w.WriteByte(byte(req.BranchType)) + + if req.ResourceId != "" { + w.WriteInt16(int16(len(req.ResourceId))) + w.WriteString(req.ResourceId) + } else { + w.WriteInt16(zero16) + } + + if req.ApplicationData != nil { + w.WriteUint32(uint32(len(req.ApplicationData))) + w.Write(req.ApplicationData) + } else { + w.WriteInt32(zero32) + } + + return b.Bytes() +} + +func AbstractBranchEndResponseEncoder(in interface{}) []byte { + resp, _ := in.(protocol.AbstractBranchEndResponse) + data := AbstractTransactionResponseEncoder(resp.AbstractTransactionResponse) + + var ( + zero16 int16 = 0 + b bytes.Buffer + ) + w := byteio.BigEndianWriter{Writer: &b} + + if resp.Xid != "" { + w.WriteInt16(int16(len(resp.Xid))) + w.WriteString(resp.Xid) + } else { + w.WriteInt16(zero16) + } + + w.WriteInt64(resp.BranchId) + w.WriteByte(byte(resp.BranchStatus)) + + result := append(data, b.Bytes()...) + + return result +} + +func AbstractGlobalEndRequestEncoder(in interface{}) []byte { + var ( + zero16 int16 = 0 + b bytes.Buffer + ) + w := byteio.BigEndianWriter{Writer: &b} + + req, _ := in.(protocol.AbstractGlobalEndRequest) + + if req.Xid != "" { + w.WriteInt16(int16(len(req.Xid))) + w.WriteString(req.Xid) + } else { + w.WriteInt16(zero16) + } + if req.ExtraData != nil { + w.WriteUint16(uint16(len(req.ExtraData))) + w.Write(req.ExtraData) + } else { + w.WriteInt16(zero16) + } + + return b.Bytes() +} + +func AbstractGlobalEndResponseEncoder(in interface{}) []byte { + resp := in.(protocol.AbstractGlobalEndResponse) + data := AbstractTransactionResponseEncoder(resp.AbstractTransactionResponse) + + result := append(data, byte(resp.GlobalStatus)) + + return result +} + +func BranchCommitRequestEncoder(in interface{}) []byte { + req := in.(protocol.BranchCommitRequest) + return AbstractBranchEndRequestEncoder(req.AbstractBranchEndRequest) +} + +func BranchCommitResponseEncoder(in interface{}) []byte { + resp := in.(protocol.BranchCommitResponse) + return AbstractBranchEndResponseEncoder(resp.AbstractBranchEndResponse) +} + +func BranchRegisterRequestEncoder(in interface{}) []byte { + var ( + zero32 int32 = 0 + zero16 int16 = 0 + b bytes.Buffer + ) + w := byteio.BigEndianWriter{Writer: &b} + + req, _ := in.(protocol.BranchRegisterRequest) + + if req.Xid != "" { + w.WriteInt16(int16(len(req.Xid))) + w.WriteString(req.Xid) + } else { + w.WriteInt16(zero16) + } + + w.WriteByte(byte(req.BranchType)) + + if req.ResourceId != "" { + w.WriteInt16(int16(len(req.ResourceId))) + w.WriteString(req.ResourceId) + } else { + w.WriteInt16(zero16) + } + + if req.LockKey != "" { + w.WriteInt32(int32(len(req.LockKey))) + w.WriteString(req.LockKey) + } else { + w.WriteInt32(zero32) + } + + if req.ApplicationData != nil { + w.WriteUint32(uint32(len(req.ApplicationData))) + w.Write(req.ApplicationData) + } else { + w.WriteInt32(zero32) + } + + return b.Bytes() +} + +func BranchRegisterResponseEncoder(in interface{}) []byte { + resp := in.(protocol.BranchRegisterResponse) + data := AbstractTransactionResponseEncoder(resp.AbstractTransactionResponse) + + c := uint64(resp.BranchId) + branchIdBytes := []byte{ + byte(c >> 56), + byte(c >> 48), + byte(c >> 40), + byte(c >> 32), + byte(c >> 24), + byte(c >> 16), + byte(c >> 8), + byte(c), + } + result := append(data, branchIdBytes...) + + return result +} + +func BranchReportRequestEncoder(in interface{}) []byte { + var ( + zero32 int32 = 0 + zero16 int16 = 0 + b bytes.Buffer + ) + w := byteio.BigEndianWriter{Writer: &b} + + req, _ := in.(protocol.BranchReportRequest) + + if req.Xid != "" { + w.WriteInt16(int16(len(req.Xid))) + w.WriteString(req.Xid) + } else { + w.WriteInt16(zero16) + } + + w.WriteInt64(req.BranchId) + w.WriteByte(byte(req.Status)) + + if req.ResourceId != "" { + w.WriteInt16(int16(len(req.ResourceId))) + w.WriteString(req.ResourceId) + } else { + w.WriteInt16(zero16) + } + + if req.ApplicationData != nil { + w.WriteUint32(uint32(len(req.ApplicationData))) + w.Write(req.ApplicationData) + } else { + w.WriteInt32(zero32) + } + + w.WriteByte(byte(req.BranchType)) + + return b.Bytes() +} + +func BranchReportResponseEncoder(in interface{}) []byte { + resp := in.(protocol.BranchReportResponse) + return AbstractTransactionResponseEncoder(resp.AbstractTransactionResponse) +} + +func BranchRollbackRequestEncoder(in interface{}) []byte { + req := in.(protocol.BranchRollbackRequest) + return AbstractBranchEndRequestEncoder(req.AbstractBranchEndRequest) +} + +func BranchRollbackResponseEncoder(in interface{}) []byte { + resp := in.(protocol.BranchRollbackResponse) + return AbstractBranchEndResponseEncoder(resp.AbstractBranchEndResponse) +} + +func GlobalBeginRequestEncoder(in interface{}) []byte { + var ( + zero16 int16 = 0 + b bytes.Buffer + ) + w := byteio.BigEndianWriter{Writer: &b} + + req, _ := in.(protocol.GlobalBeginRequest) + + w.WriteInt32(req.Timeout) + if req.TransactionName != "" { + w.WriteInt16(int16(len(req.TransactionName))) + w.WriteString(req.TransactionName) + } else { + w.WriteInt16(zero16) + } + + return b.Bytes() +} + +func GlobalBeginResponseEncoder(in interface{}) []byte { + resp := in.(protocol.GlobalBeginResponse) + data := AbstractTransactionResponseEncoder(resp.AbstractTransactionResponse) + + var ( + zero16 int16 = 0 + b bytes.Buffer + ) + w := byteio.BigEndianWriter{Writer: &b} + + if resp.Xid != "" { + w.WriteInt16(int16(len(resp.Xid))) + w.WriteString(resp.Xid) + } else { + w.WriteInt16(zero16) + } + if resp.ExtraData != nil { + w.WriteUint16(uint16(len(resp.ExtraData))) + w.Write(resp.ExtraData) + } else { + w.WriteInt16(zero16) + } + + result := append(data, b.Bytes()...) + + return result +} + +func GlobalCommitRequestEncoder(in interface{}) []byte { + req := in.(protocol.GlobalCommitRequest) + return AbstractGlobalEndRequestEncoder(req.AbstractGlobalEndRequest) +} + +func GlobalCommitResponseEncoder(in interface{}) []byte { + resp := in.(protocol.GlobalCommitResponse) + return AbstractGlobalEndResponseEncoder(resp.AbstractGlobalEndResponse) +} + +func GlobalLockQueryRequestEncoder(in interface{}) []byte { + return BranchRegisterRequestEncoder(in) +} + +func GlobalLockQueryResponseEncoder(in interface{}) []byte { + resp, _ := in.(protocol.GlobalLockQueryResponse) + data := AbstractTransactionResponseEncoder(resp.AbstractTransactionResponse) + + var result []byte + if resp.Lockable { + result = append(data, byte(0), byte(1)) + } else { + result = append(data, byte(0), byte(0)) + } + + return result +} + +func GlobalReportRequestEncoder(in interface{}) []byte { + req, _ := in.(protocol.GlobalReportRequest) + data := AbstractGlobalEndRequestEncoder(req.AbstractGlobalEndRequest) + + result := append(data, byte(req.GlobalStatus)) + return result +} + +func GlobalReportResponseEncoder(in interface{}) []byte { + resp := in.(protocol.GlobalReportResponse) + return AbstractGlobalEndResponseEncoder(resp.AbstractGlobalEndResponse) +} + +func GlobalRollbackRequestEncoder(in interface{}) []byte { + req := in.(protocol.GlobalRollbackRequest) + return AbstractGlobalEndRequestEncoder(req.AbstractGlobalEndRequest) +} + +func GlobalRollbackResponseEncoder(in interface{}) []byte { + resp := in.(protocol.GlobalRollbackResponse) + return AbstractGlobalEndResponseEncoder(resp.AbstractGlobalEndResponse) +} + +func GlobalStatusRequestEncoder(in interface{}) []byte { + req := in.(protocol.GlobalStatusRequest) + return AbstractGlobalEndRequestEncoder(req.AbstractGlobalEndRequest) +} + +func GlobalStatusResponseEncoder(in interface{}) []byte { + resp := in.(protocol.GlobalStatusResponse) + return AbstractGlobalEndResponseEncoder(resp.AbstractGlobalEndResponse) +} + +func UndoLogDeleteRequestEncoder(in interface{}) []byte { + var ( + zero16 int16 = 0 + b bytes.Buffer + ) + w := byteio.BigEndianWriter{Writer: &b} + + req, _ := in.(protocol.UndoLogDeleteRequest) + + w.WriteByte(byte(req.BranchType)) + if req.ResourceId != "" { + w.WriteInt16(int16(len(req.ResourceId))) + w.WriteString(req.ResourceId) + } else { + w.WriteInt16(zero16) + } + w.WriteInt16(int16(req.SaveDays)) + + return b.Bytes() +} diff --git a/pkg/protocol/constant.go b/pkg/protocol/constant.go new file mode 100644 index 000000000..63a774557 --- /dev/null +++ b/pkg/protocol/constant.go @@ -0,0 +1,30 @@ +package protocol + +var MAGIC_CODE_BYTES = [2]byte{0xda, 0xda} + +type RequestType byte + +const ( + VERSION = 1 + + // MaxFrameLength max frame length + MaxFrameLength = 8 * 1024 * 1024 + + // V1HeadLength v1 head length + V1HeadLength = 16 + + // MSGTypeRequestSync request message type + MSGTypeRequestSync RequestType = 0 + + // MSGTypeResponse response message type + MSGTypeResponse RequestType = 1 + + // MSGTypeRequestOneway request one way + MSGTypeRequestOneway RequestType = 2 + + // MSGTypeHeartbeatRequest heart beat request + MSGTypeHeartbeatRequest RequestType = 3 + + // MSGTypeHeartbeatResponse heart beat response + MSGTypeHeartbeatResponse RequestType = 4 +) diff --git a/pkg/protocol/heart_beat_message.go b/pkg/protocol/heart_beat_message.go new file mode 100644 index 000000000..a2d86c91a --- /dev/null +++ b/pkg/protocol/heart_beat_message.go @@ -0,0 +1,16 @@ +package protocol + +type HeartBeatMessage struct { + Ping bool +} + +var HeartBeatMessagePing = HeartBeatMessage{true} +var HeartBeatMessagePong = HeartBeatMessage{false} + +func (msg HeartBeatMessage) ToString() string { + if msg.Ping { + return "services ping" + } else { + return "services pong" + } +} diff --git a/pkg/protocol/identify.go b/pkg/protocol/identify.go new file mode 100644 index 000000000..bea76fb7a --- /dev/null +++ b/pkg/protocol/identify.go @@ -0,0 +1,26 @@ +package protocol + +type AbstractResultMessage struct { + ResultCode ResultCode + Msg string +} + +type AbstractIdentifyRequest struct { + Version string + + ApplicationId string `json:"applicationId"` + + TransactionServiceGroup string + + ExtraData []byte +} + +type AbstractIdentifyResponse struct { + AbstractResultMessage + + Version string + + ExtraData []byte + + Identified bool +} diff --git a/pkg/protocol/merged_message.go b/pkg/protocol/merged_message.go new file mode 100644 index 000000000..6741490f2 --- /dev/null +++ b/pkg/protocol/merged_message.go @@ -0,0 +1,18 @@ +package protocol + +type MergedWarpMessage struct { + Msgs []MessageTypeAware + MsgIds []int32 +} + +func (req MergedWarpMessage) GetTypeCode() MessageType { + return MessageTypeSeataMerge +} + +type MergeResultMessage struct { + Msgs []MessageTypeAware +} + +func (resp MergeResultMessage) GetTypeCode() MessageType { + return MessageTypeSeataMergeResult +} diff --git a/pkg/protocol/message_future.go b/pkg/protocol/message_future.go new file mode 100644 index 000000000..22ff77bbf --- /dev/null +++ b/pkg/protocol/message_future.go @@ -0,0 +1,17 @@ +package protocol + +// MessageFuture ... +type MessageFuture struct { + ID int32 + Err error + Response interface{} + Done chan bool +} + +// NewMessageFuture ... +func NewMessageFuture(message RpcMessage) *MessageFuture { + return &MessageFuture{ + ID: message.ID, + Done: make(chan bool), + } +} diff --git a/pkg/protocol/message_type.go b/pkg/protocol/message_type.go new file mode 100644 index 000000000..e567f0124 --- /dev/null +++ b/pkg/protocol/message_type.go @@ -0,0 +1,121 @@ +package protocol + +type MessageType int + +const ( + /** + * The constant TYPE_GLOBAL_BEGIN. + */ + MessageTypeGlobalBegin MessageType = 1 + /** + * The constant TYPE_GLOBAL_BEGIN_RESULT. + */ + MessageTypeGlobalBeginResult MessageType = 2 + /** + * The constant TYPE_GLOBAL_COMMIT. + */ + MessageTypeGlobalCommit MessageType = 7 + /** + * The constant TYPE_GLOBAL_COMMIT_RESULT. + */ + MessageTypeGlobalCommitResult MessageType = 8 + /** + * The constant TYPE_GLOBAL_ROLLBACK. + */ + MessageTypeGlobalRollback MessageType = 9 + /** + * The constant TYPE_GLOBAL_ROLLBACK_RESULT. + */ + MessageTypeGlobalRollbackResult MessageType = 10 + /** + * The constant TYPE_GLOBAL_STATUS. + */ + MessageTypeGlobalStatus MessageType = 15 + /** + * The constant TYPE_GLOBAL_STATUS_RESULT. + */ + MessageTypeGlobalStatusResult MessageType = 16 + /** + * The constant TYPE_GLOBAL_REPORT. + */ + MessageTypeGlobalReport MessageType = 17 + /** + * The constant TYPE_GLOBAL_REPORT_RESULT. + */ + MessageTypeGlobalReportResult MessageType = 18 + /** + * The constant TYPE_GLOBAL_LOCK_QUERY. + */ + MessageTypeGlobalLockQuery MessageType = 21 + /** + * The constant TYPE_GLOBAL_LOCK_QUERY_RESULT. + */ + MessageTypeGlobalLockQueryResult MessageType = 22 + + /** + * The constant TYPE_BRANCH_COMMIT. + */ + MessageTypeBranchCommit MessageType = 3 + /** + * The constant TYPE_BRANCH_COMMIT_RESULT. + */ + MessageTypeBranchCommitResult MessageType = 4 + /** + * The constant TYPE_BRANCH_ROLLBACK. + */ + MessageTypeBranchRollback MessageType = 5 + /** + * The constant TYPE_BRANCH_ROLLBACK_RESULT. + */ + MessageTypeBranchRollbackResult MessageType = 6 + /** + * The constant TYPE_BRANCH_REGISTER. + */ + MessageTypeBranchRegister MessageType = 11 + /** + * The constant TYPE_BRANCH_REGISTER_RESULT. + */ + MessageTypeBranchRegisterResult MessageType = 12 + /** + * The constant TYPE_BRANCH_STATUS_REPORT. + */ + MessageTypeBranchStatusReport MessageType = 13 + /** + * The constant TYPE_BRANCH_STATUS_REPORT_RESULT. + */ + MessageTypeBranchStatusReportResult MessageType = 14 + + /** + * The constant TYPE_SEATA_MERGE. + */ + MessageTypeSeataMerge MessageType = 59 + /** + * The constant TYPE_SEATA_MERGE_RESULT. + */ + MessageTypeSeataMergeResult MessageType = 60 + + /** + * The constant TYPE_REG_CLT. + */ + MessageTypeRegClt MessageType = 101 + /** + * The constant TYPE_REG_CLT_RESULT. + */ + MessageTypeRegCltResult MessageType = 102 + /** + * The constant TYPE_REG_RM. + */ + MessageTypeRegRm MessageType = 103 + /** + * The constant TYPE_REG_RM_RESULT. + */ + MessageTypeRegRmResult MessageType = 104 + /** + * The constant TYPE_RM_DELETE_UNDOLOG. + */ + MessageTypeRmDeleteUndolog MessageType = 111 + /** + * the constant TYPE_HEARTBEAT_MSG + */ + MessageTypeHeartbeatMsg MessageType = 120 +) diff --git a/pkg/protocol/message_type_aware.go b/pkg/protocol/message_type_aware.go new file mode 100644 index 000000000..bd5733e0d --- /dev/null +++ b/pkg/protocol/message_type_aware.go @@ -0,0 +1,5 @@ +package protocol + +type MessageTypeAware interface { + GetTypeCode() MessageType +} diff --git a/pkg/protocol/request_response.go b/pkg/protocol/request_response.go new file mode 100644 index 000000000..e6643cdb3 --- /dev/null +++ b/pkg/protocol/request_response.go @@ -0,0 +1,226 @@ +package protocol + +import ( + model2 "github.com/seata/seata-go/pkg/common/model" +) + +type AbstractTransactionResponse struct { + AbstractResultMessage + TransactionExceptionCode model2.TransactionExceptionCode +} + +type AbstractBranchEndRequest struct { + Xid string + BranchId int64 + BranchType model2.BranchType + ResourceId string + ApplicationData []byte +} + +type AbstractBranchEndResponse struct { + AbstractTransactionResponse + + Xid string + BranchId int64 + BranchStatus model2.BranchStatus +} + +type AbstractGlobalEndRequest struct { + Xid string + ExtraData []byte +} + +type AbstractGlobalEndResponse struct { + AbstractTransactionResponse + + GlobalStatus model2.GlobalStatus +} + +type BranchRegisterRequest struct { + Xid string + BranchType model2.BranchType + ResourceId string + LockKey string + ApplicationData []byte +} + +func (req BranchRegisterRequest) GetTypeCode() MessageType { + return MessageTypeBranchRegister +} + +type BranchRegisterResponse struct { + AbstractTransactionResponse + + BranchId int64 +} + +func (resp BranchRegisterResponse) GetTypeCode() MessageType { + return MessageTypeBranchRegisterResult +} + +type BranchReportRequest struct { + Xid string + BranchId int64 + ResourceId string + Status model2.BranchStatus + ApplicationData []byte + BranchType model2.BranchType +} + +func (req BranchReportRequest) GetTypeCode() MessageType { + return MessageTypeBranchStatusReport +} + +type BranchReportResponse struct { + AbstractTransactionResponse +} + +func (resp BranchReportResponse) GetTypeCode() MessageType { + return MessageTypeBranchStatusReportResult +} + +type BranchCommitRequest struct { + AbstractBranchEndRequest +} + +func (req BranchCommitRequest) GetTypeCode() MessageType { + return MessageTypeBranchCommit +} + +type BranchCommitResponse struct { + AbstractBranchEndResponse +} + +func (resp BranchCommitResponse) GetTypeCode() MessageType { + return MessageTypeBranchCommitResult +} + +type BranchRollbackRequest struct { + AbstractBranchEndRequest +} + +func (req BranchRollbackRequest) GetTypeCode() MessageType { + return MessageTypeBranchRollback +} + +type BranchRollbackResponse struct { + AbstractBranchEndResponse +} + +func (resp BranchRollbackResponse) GetTypeCode() MessageType { + return MessageTypeGlobalRollbackResult +} + +type GlobalBeginRequest struct { + Timeout int32 + TransactionName string +} + +func (req GlobalBeginRequest) GetTypeCode() MessageType { + return MessageTypeGlobalBegin +} + +type GlobalBeginResponse struct { + AbstractTransactionResponse + + Xid string + ExtraData []byte +} + +func (resp GlobalBeginResponse) GetTypeCode() MessageType { + return MessageTypeGlobalBeginResult +} + +type GlobalStatusRequest struct { + AbstractGlobalEndRequest +} + +func (req GlobalStatusRequest) GetTypeCode() MessageType { + return MessageTypeGlobalStatus +} + +type GlobalStatusResponse struct { + AbstractGlobalEndResponse +} + +func (resp GlobalStatusResponse) GetTypeCode() MessageType { + return MessageTypeGlobalStatusResult +} + +type GlobalLockQueryRequest struct { + BranchRegisterRequest +} + +func (req GlobalLockQueryRequest) GetTypeCode() MessageType { + return MessageTypeGlobalLockQuery +} + +type GlobalLockQueryResponse struct { + AbstractTransactionResponse + + Lockable bool +} + +func (resp GlobalLockQueryResponse) GetTypeCode() MessageType { + return MessageTypeGlobalLockQueryResult +} + +type GlobalReportRequest struct { + AbstractGlobalEndRequest + + GlobalStatus model2.GlobalStatus +} + +func (req GlobalReportRequest) GetTypeCode() MessageType { + return MessageTypeGlobalStatus +} + +type GlobalReportResponse struct { + AbstractGlobalEndResponse +} + +func (resp GlobalReportResponse) GetTypeCode() MessageType { + return MessageTypeGlobalStatusResult +} + +type GlobalCommitRequest struct { + AbstractGlobalEndRequest +} + +func (req GlobalCommitRequest) GetTypeCode() MessageType { + return MessageTypeGlobalCommit +} + +type GlobalCommitResponse struct { + AbstractGlobalEndResponse +} + +func (resp GlobalCommitResponse) GetTypeCode() MessageType { + return MessageTypeGlobalCommitResult +} + +type GlobalRollbackRequest struct { + AbstractGlobalEndRequest +} + +func (req GlobalRollbackRequest) GetTypeCode() MessageType { + return MessageTypeGlobalRollback +} + +type GlobalRollbackResponse struct { + AbstractGlobalEndResponse +} + +func (resp GlobalRollbackResponse) GetTypeCode() MessageType { + return MessageTypeGlobalRollbackResult +} + +type UndoLogDeleteRequest struct { + ResourceId string + SaveDays MessageType + BranchType model2.BranchType +} + +func (req UndoLogDeleteRequest) GetTypeCode() MessageType { + return MessageTypeRmDeleteUndolog +} diff --git a/pkg/protocol/result_code.go b/pkg/protocol/result_code.go new file mode 100644 index 000000000..2c6d9b0d8 --- /dev/null +++ b/pkg/protocol/result_code.go @@ -0,0 +1,18 @@ +package protocol + +type ResultCode byte + +const ( + + /** + * ResultCodeFailed result code. + */ + // ResultCodeFailed + ResultCodeFailed ResultCode = iota + + /** + * Success result code. + */ + // Success + ResultCodeSuccess +) diff --git a/pkg/protocol/rm.go b/pkg/protocol/rm.go new file mode 100644 index 000000000..187170cbc --- /dev/null +++ b/pkg/protocol/rm.go @@ -0,0 +1,18 @@ +package protocol + +type RegisterRMRequest struct { + AbstractIdentifyRequest + ResourceIds string +} + +func (req RegisterRMRequest) GetTypeCode() MessageType { + return MessageTypeRegRm +} + +type RegisterRMResponse struct { + AbstractIdentifyResponse +} + +func (resp RegisterRMResponse) GetTypeCode() MessageType { + return MessageTypeRegRmResult +} diff --git a/pkg/protocol/rpc_message.go b/pkg/protocol/rpc_message.go new file mode 100644 index 000000000..65aacc54d --- /dev/null +++ b/pkg/protocol/rpc_message.go @@ -0,0 +1,10 @@ +package protocol + +type RpcMessage struct { + ID int32 + Type RequestType + Codec byte + Compressor byte + HeadMap map[string]string + Body interface{} +} diff --git a/pkg/protocol/tm.go b/pkg/protocol/tm.go new file mode 100644 index 000000000..43d973089 --- /dev/null +++ b/pkg/protocol/tm.go @@ -0,0 +1,17 @@ +package protocol + +type RegisterTMRequest struct { + AbstractIdentifyRequest +} + +func (req RegisterTMRequest) GetTypeCode() MessageType { + return MessageTypeRegClt +} + +type RegisterTMResponse struct { + AbstractIdentifyResponse +} + +func (resp RegisterTMResponse) GetTypeCode() MessageType { + return MessageTypeRegCltResult +} diff --git a/pkg/protocol/transaction/rm_handler.go b/pkg/protocol/transaction/rm_handler.go new file mode 100644 index 000000000..906b67597 --- /dev/null +++ b/pkg/protocol/transaction/rm_handler.go @@ -0,0 +1,32 @@ +package transaction + +import ( + "github.com/seata/seata-go/pkg/protocol" +) + +type RMInboundHandler interface { + + /** + * Handle branch commit response. + * + * @param request the request + * @return the branch commit response + */ + HandleBranchCommitRequest(request protocol.BranchCommitRequest) (*protocol.BranchCommitResponse, error) + + /** + * Handle branch rollback response. + * + * @param request the request + * @return the branch rollback response + */ + + HandleBranchRollbackRequest(request protocol.BranchRollbackRequest) (*protocol.BranchRollbackResponse, error) + + /** + * Handle delete undo log . + * + * @param request the request + */ + HandleUndoLogDeleteRequest(request protocol.UndoLogDeleteRequest) error +} diff --git a/pkg/rm/api/business_action_context.go b/pkg/rm/api/business_action_context.go new file mode 100644 index 000000000..d207754ed --- /dev/null +++ b/pkg/rm/api/business_action_context.go @@ -0,0 +1,8 @@ +package api + +type BusinessActionContext struct { + Xid string + BranchId string + ActionName string + ActionContext map[string]interface{} +} diff --git a/pkg/rm/common_resource_manager.go b/pkg/rm/common_resource_manager.go new file mode 100644 index 000000000..4001b8ebe --- /dev/null +++ b/pkg/rm/common_resource_manager.go @@ -0,0 +1,28 @@ +package rm + +import ( + "github.com/seata/seata-go/pkg/common/model" +) + +// TODO +type RMRemoting struct { +} + +// Branch register long +func (RMRemoting) BranchRegister(branchType model.BranchType, resourceId, clientId, xid, applicationData, lockKeys string) (int64, error) { + return 0, nil +} + +// Branch report +func (RMRemoting) BranchReport(branchType model.BranchType, xid string, branchId int64, status model.BranchStatus, applicationData string) error { + return nil +} + +// Lock query boolean +func (RMRemoting) LockQuery(branchType model.BranchType, resourceId, xid, lockKeys string) (bool, error) { + return false, nil +} + +func (RMRemoting) RegisterResource(resource model.Resource) error { + return nil +} diff --git a/pkg/rm/common_rm_handler.go b/pkg/rm/common_rm_handler.go new file mode 100644 index 000000000..1fb6fcba1 --- /dev/null +++ b/pkg/rm/common_rm_handler.go @@ -0,0 +1,51 @@ +package rm + +import ( + "github.com/seata/seata-go/pkg/common/model" + "github.com/seata/seata-go/pkg/protocol" +) + +type CommonRMHandler struct { + rmGetter model.ResourceManagerGetter +} + +func (h *CommonRMHandler) SetRMGetter(rmGetter model.ResourceManagerGetter) { + h.rmGetter = rmGetter +} + +// Handle branch commit response. +func (h *CommonRMHandler) HandleBranchCommitRequest(request protocol.BranchCommitRequest) (*protocol.BranchCommitResponse, error) { + xid := request.Xid + branchID := request.BranchId + resourceID := request.ResourceId + applicationData := request.ApplicationData + + status, err := h.rmGetter.GetResourceManager().BranchCommit(request.BranchType, xid, branchID, resourceID, applicationData) + if err != nil { + // TODO: handle error + return nil, err + } + return &protocol.BranchCommitResponse{ + AbstractBranchEndResponse: protocol.AbstractBranchEndResponse{ + Xid: xid, + BranchId: branchID, + BranchStatus: status, + }, + }, nil +} + +// Handle branch rollback response. +// TODO +func (h *CommonRMHandler) HandleBranchRollbackRequest(request protocol.BranchRollbackRequest) (*protocol.BranchRollbackResponse, error) { + return nil, nil +} + +// Handle delete undo log . +// TODO +func (h *CommonRMHandler) HandleUndoLogDeleteRequest(request protocol.UndoLogDeleteRequest) error { + return nil +} + +func (h *CommonRMHandler) GetBranchType() model.BranchType { + return h.rmGetter.GetResourceManager().GetBranchType() +} diff --git a/pkg/rm/resource_manager_facade.go b/pkg/rm/resource_manager_facade.go new file mode 100644 index 000000000..f367e4386 --- /dev/null +++ b/pkg/rm/resource_manager_facade.go @@ -0,0 +1,88 @@ +package rm + +import ( + "fmt" + "sync" +) + +import ( + model2 "github.com/seata/seata-go/pkg/common/model" +) + +var ( + // BranchType -> ResourceManager + resourceManagerMap sync.Map + // singletone ResourceManagerFacade + rmFacadeInstance *ResourceManagerFacade + onceRMFacade = &sync.Once{} +) + +func GetResourceManagerFacadeInstance() *ResourceManagerFacade { + if rmFacadeInstance == nil { + onceRMFacade.Do(func() { + rmFacadeInstance = &ResourceManagerFacade{} + }) + } + return rmFacadeInstance +} + +type ResourceManagerFacade struct { +} + +// 将事务管理器注册到这里 +func RegisterResource(resourceManager model2.ResourceManager) { + resourceManagerMap.Store(resourceManager.GetBranchType(), resourceManager) +} + +func (*ResourceManagerFacade) GetResourceManager(branchType model2.BranchType) model2.ResourceManager { + rm, ok := resourceManagerMap.Load(branchType) + if !ok { + panic(fmt.Sprintf("No ResourceManager for BranchType: %v", branchType)) + } + return rm.(model2.ResourceManager) +} + +// Commit a branch transaction +func (d *ResourceManagerFacade) BranchCommit(branchType model2.BranchType, xid string, branchId int64, resourceId string, applicationData []byte) (model2.BranchStatus, error) { + return d.GetResourceManager(branchType).BranchCommit(branchType, xid, branchId, resourceId, applicationData) +} + +// Rollback a branch transaction +func (d *ResourceManagerFacade) BranchRollback(branchType model2.BranchType, xid string, branchId int64, resourceId string, applicationData []byte) (model2.BranchStatus, error) { + return d.GetResourceManager(branchType).BranchRollback(branchType, xid, branchId, resourceId, applicationData) +} + +// Branch register long +func (d *ResourceManagerFacade) BranchRegister(branchType model2.BranchType, resourceId, clientId, xid, applicationData, lockKeys string) (int64, error) { + return d.GetResourceManager(branchType).BranchRegister(branchType, resourceId, clientId, xid, applicationData, lockKeys) +} + +// Branch report +func (d *ResourceManagerFacade) BranchReport(branchType model2.BranchType, xid string, branchId int64, status model2.BranchStatus, applicationData string) error { + return d.GetResourceManager(branchType).BranchReport(branchType, xid, branchId, status, applicationData) +} + +// Lock query boolean +func (d *ResourceManagerFacade) LockQuery(branchType model2.BranchType, resourceId, xid, lockKeys string) (bool, error) { + return d.GetResourceManager(branchType).LockQuery(branchType, resourceId, xid, lockKeys) +} + +// Register a model.Resource to be managed by model.Resource Manager +func (d *ResourceManagerFacade) RegisterResource(resource model2.Resource) error { + return d.GetResourceManager(resource.GetBranchType()).RegisterResource(resource) +} + +// Unregister a model.Resource from the model.Resource Manager +func (d *ResourceManagerFacade) UnregisterResource(resource model2.Resource) error { + return d.GetResourceManager(resource.GetBranchType()).UnregisterResource(resource) +} + +// Get all resources managed by this manager +func (d *ResourceManagerFacade) GetManagedResources() sync.Map { + return resourceManagerMap +} + +// Get the model.BranchType +func (d *ResourceManagerFacade) GetBranchType() model2.BranchType { + panic("DefaultResourceManager isn't a real ResourceManager") +} diff --git a/pkg/rm/rm_handler_facade.go b/pkg/rm/rm_handler_facade.go new file mode 100644 index 000000000..c60f36fec --- /dev/null +++ b/pkg/rm/rm_handler_facade.go @@ -0,0 +1,59 @@ +package rm + +import ( + "sync" +) + +import ( + "github.com/seata/seata-go/pkg/common/model" + "github.com/seata/seata-go/pkg/protocol" +) + +var ( + onceRMHandlerFacade = &sync.Once{} + rmHandler *RMHandlerFacade +) + +type RMHandlerFacade struct { + rmHandlerMap sync.Map +} + +func GetRMHandlerFacadeInstance() *RMHandlerFacade { + if rmHandler == nil { + onceRMFacade.Do(func() { + rmHandler = &RMHandlerFacade{} + }) + } + return rmHandler +} + +// Handle branch commit response. +func (h *RMHandlerFacade) HandleBranchCommitRequest(request protocol.BranchCommitRequest) (*protocol.BranchCommitResponse, error) { + return h.getRMHandler(request.BranchType).HandleBranchCommitRequest(request) +} + +// Handle branch rollback response. +// TODO +func (h *RMHandlerFacade) HandleBranchRollbackRequest(request protocol.BranchRollbackRequest) (*protocol.BranchRollbackResponse, error) { + return h.getRMHandler(request.BranchType).HandleBranchRollbackRequest(request) +} + +// Handle delete undo log . +// TODO +func (h *RMHandlerFacade) HandleUndoLogDeleteRequest(request protocol.UndoLogDeleteRequest) error { + return h.getRMHandler(request.BranchType).HandleUndoLogDeleteRequest(request) +} + +func (h *RMHandlerFacade) RegisteRMHandler(handler *CommonRMHandler) { + if handler == nil { + return + } + h.rmHandlerMap.Store(handler.GetBranchType(), handler) +} + +func (h *RMHandlerFacade) getRMHandler(branchType model.BranchType) *CommonRMHandler { + if handler, ok := h.rmHandlerMap.Load(branchType); ok { + return handler.(*CommonRMHandler) + } + return nil +} diff --git a/pkg/rm/tcc/remoting/remoting.go b/pkg/rm/tcc/remoting/remoting.go new file mode 100644 index 000000000..0b765cead --- /dev/null +++ b/pkg/rm/tcc/remoting/remoting.go @@ -0,0 +1,80 @@ +package remoting + +import ( + "reflect" +) + +type RemoteType byte +type ServiceType byte + +const ( + RemoteTypeSofaRpc RemoteType = 2 + RemoteTypeDubbo RemoteType = 3 + RemoteTypeRestful RemoteType = 4 + RemoteTypeLocalService RemoteType = 5 + RemoteTypeHsf RemoteType = 8 + + ServiceTypeReference ServiceType = 1 + ServiceTypeProvider ServiceType = 2 +) + +type RemotingDesc struct { + /** + * is referenc bean ? + */ + isReference bool + + /** + * rpc target bean, the service bean has this property + */ + targetBean interface{} + + /** + * the tcc interface tyep + */ + interfaceClass reflect.Type + + /** + * interface class name + */ + interfaceClassName string + + /** + * rpc uniqueId: hsf, dubbo's version, sofa-rpc's uniqueId + */ + uniqueId string + + /** + * dubbo/hsf 's group + */ + group string + + /** + * protocol: sofa-rpc, dubbo, injvm etc. + */ + protocol RemoteType +} + +type RemotingParser interface { + isRemoting(bean interface{}, beanName string) (bool, error) + + /** + * if it is reference bean ? + */ + isReference(bean interface{}, beanName string) (bool, error) + + /** + * if it is service bean ? + */ + isService(bean interface{}, beanName string) (bool, error) + + /** + * get the remoting bean info + */ + getServiceDesc(bean interface{}, beanName string) (RemotingDesc, error) + + /** + * the remoting protocol + */ + getProtocol() RemoteType +} diff --git a/pkg/rm/tcc/tcc_resource.go b/pkg/rm/tcc/tcc_resource.go new file mode 100644 index 000000000..f5d7e82a1 --- /dev/null +++ b/pkg/rm/tcc/tcc_resource.go @@ -0,0 +1,33 @@ +package tcc + +import ( + "reflect" +) + +import ( + "github.com/seata/seata-go/pkg/common/model" +) + +type TCCResource struct { + ResourceGroupId string `default:"DEFAULT"` + AppName string + ActionName string + TargetBean interface{} + PrepareMethod reflect.Method + CommitMethodName string + CommitMethod reflect.Method + RollbackMethodName string + RollbackMethod reflect.Method +} + +func (t *TCCResource) GetResourceGroupId() string { + return t.ResourceGroupId +} + +func (t *TCCResource) GetResourceId() string { + return t.ActionName +} + +func (t *TCCResource) GetBranchType() model.BranchType { + return model.BranchTypeTCC +} diff --git a/pkg/rm/tcc/tcc_rm.go b/pkg/rm/tcc/tcc_rm.go new file mode 100644 index 000000000..4b8fc30a7 --- /dev/null +++ b/pkg/rm/tcc/tcc_rm.go @@ -0,0 +1,42 @@ +package tcc + +import ( + "sync" +) + +import ( + "github.com/seata/seata-go/pkg/common/model" + "github.com/seata/seata-go/pkg/rm" +) + +type TCCRm struct { + rmRemoting rm.RMRemoting + // resourceID -> resource + resourceManagerMap sync.Map +} + +func (t *TCCRm) RegisterResource(resource model.Resource) error { + t.resourceManagerMap.Store(resource.GetResourceId(), resource) + t.rmRemoting.RegisterResource(resource) + return nil +} + +func (t *TCCRm) GetManagedResources() sync.Map { + return t.resourceManagerMap +} + +// Commit a branch transaction +func (t *TCCRm) BranchCommit(branchType model.BranchType, xid, branchId int64, resourceId, applicationData string) (model.BranchStatus, error) { + // TODO + return 0, nil +} + +// Rollback a branch transaction +func (t *TCCRm) BranchRollback(branchType model.BranchType, xid string, branchId int64, resourceId, applicationData string) (model.BranchStatus, error) { + // TODO + return 0, nil +} + +func (t *TCCRm) GetBranchType() model.BranchType { + return model.BranchTypeTCC +} diff --git a/pkg/rm/tcc/tcc_rm_handler.go b/pkg/rm/tcc/tcc_rm_handler.go new file mode 100644 index 000000000..7f00a686b --- /dev/null +++ b/pkg/rm/tcc/tcc_rm_handler.go @@ -0,0 +1,20 @@ +package tcc + +import ( + "github.com/seata/seata-go/pkg/common/model" + "github.com/seata/seata-go/pkg/rm" +) + +type TCCRMHandler struct { + rm.CommonRMHandler +} + +func NewTCCRMHandler() TCCRMHandler { + handler := TCCRMHandler{} + handler.CommonRMHandler.SetRMGetter(handler) + return handler +} + +func (TCCRMHandler) GetResourceManager() model.ResourceManager { + return rm.GetResourceManagerFacadeInstance().GetResourceManager(model.BranchTypeTCC) +} diff --git a/pkg/rm/tcc/tcc_runner.go b/pkg/rm/tcc/tcc_runner.go new file mode 100644 index 000000000..3b741f53d --- /dev/null +++ b/pkg/rm/tcc/tcc_runner.go @@ -0,0 +1,22 @@ +package tcc + +import ( + "context" +) + +var ( + tccRunnerSingleton = &TccRunner{} +) + +type TccRunner struct { +} + +func (c *TccRunner) run(ctx context.Context, tccService TCCService, params []interface{}) { + // step1: register rm service + + // step2: open global transaction + + // step3: do prepare Method + + // step4: commit prepare transaction +} diff --git a/pkg/rm/tcc/tcc_service.go b/pkg/rm/tcc/tcc_service.go new file mode 100644 index 000000000..6f4d1edb8 --- /dev/null +++ b/pkg/rm/tcc/tcc_service.go @@ -0,0 +1,20 @@ +package tcc + +import ( + "context" +) + +import ( + "github.com/seata/seata-go/pkg/rm/api" + "github.com/seata/seata-go/pkg/rm/tcc/remoting" +) + +type TCCService interface { + Prepare(ctx context.Context, params interface{}) error + Commit(ctx context.Context, businessActionContext api.BusinessActionContext) error + Rollback(ctx context.Context, businessActionContext api.BusinessActionContext) error + + GetActionName() string + GetRemoteType() remoting.RemoteType + GetServiceType() remoting.ServiceType +} diff --git a/pkg/rpc/getty/getty_client.go b/pkg/rpc/getty/getty_client.go new file mode 100644 index 000000000..ecc6ace94 --- /dev/null +++ b/pkg/rpc/getty/getty_client.go @@ -0,0 +1,151 @@ +package getty + +import ( + "sync" + "time" +) + +import ( + "go.uber.org/atomic" +) + +import ( + "github.com/seata/seata-go/pkg/protocol" + "github.com/seata/seata-go/pkg/protocol/codec" +) + +var ( + gettyRemotingClient *GettyRemotingClient + onceGettyRemotingClient = &sync.Once{} +) + +type GettyRemotingClient struct { + //conf *config.ClientConfig + idGenerator *atomic.Uint32 + //futures *sync.Map + //mergeMsgMap *sync.Map + //rpcMessageChannel chan protocol.RpcMessage + //BranchCommitRequestChannel chan RpcRMMessage + //BranchRollbackRequestChannel chan RpcRMMessage + //GettySessionOnOpenChannel chan string +} + +func GetGettyRemotingClient() *GettyRemotingClient { + if gettyRemotingClient == nil { + onceGettyRemotingClient.Do(func() { + gettyRemotingClient = &GettyRemotingClient{ + idGenerator: &atomic.Uint32{}, + } + }) + } + return gettyRemotingClient +} + +func (client *GettyRemotingClient) SendAsyncRequest(msg interface{}) error { + var msgType protocol.RequestType + if _, ok := msg.(protocol.HeartBeatMessage); ok { + msgType = protocol.MSGTypeHeartbeatRequest + } else { + msgType = protocol.MSGTypeRequestOneway + } + rpcMessage := protocol.RpcMessage{ + ID: int32(client.idGenerator.Inc()), + Type: msgType, + Codec: codec.SEATA, + Compressor: 0, + Body: msg, + } + return GetGettyRemotingInstance().SendASync(rpcMessage) +} + +func (client *GettyRemotingClient) SendSyncRequest(msg interface{}) (interface{}, error) { + rpcMessage := protocol.RpcMessage{ + ID: int32(client.idGenerator.Inc()), + Type: protocol.MSGTypeRequestSync, + Codec: codec.SEATA, + Compressor: 0, + Body: msg, + } + return GetGettyRemotingInstance().SendSync(rpcMessage) +} + +func (client *GettyRemotingClient) SendSyncRequestWithTimeout(msg interface{}, timeout time.Duration) (interface{}, error) { + rpcMessage := protocol.RpcMessage{ + ID: int32(client.idGenerator.Inc()), + Type: protocol.MSGTypeRequestSync, + Codec: codec.SEATA, + Compressor: 0, + Body: msg, + } + return GetGettyRemotingInstance().SendSyncWithTimeout(rpcMessage, timeout) +} + +// +//func (client *GettyRemotingClient) RegisterResource(serverAddress string, request protocol.RegisterRMRequest) { +// session := clientSessionManager.AcquireGettySessionByServerAddress(serverAddress) +// if session != nil { +// err := client.sendAsyncRequestWithoutResponse(session, request) +// if err != nil { +// log.Errorf("register resource failed, session:{},resourceID:{}", session, request.ResourceIds) +// } +// } +//} +// +//func loadBalance(transactionServiceGroup string) string { +// addressList := getAddressList(transactionServiceGroup) +// if len(addressList) == 1 { +// return addressList[0] +// } +// return addressList[rand.Intn(len(addressList))] +//} +// +//func getAddressList(transactionServiceGroup string) []string { +// addressList := strings.Split(transactionServiceGroup, ",") +// return addressList +//} +// +//func (client *GettyRemotingClient) processMergedMessage() { +// ticker := time.NewTicker(5 * time.Millisecond) +// mergedMessage := protocol.MergedWarpMessage{ +// Msgs: make([]protocol.MessageTypeAware, 0), +// MsgIds: make([]int32, 0), +// } +// for { +// select { +// case rpcMessage := <-client.rpcMessageChannel: +// message := rpcMessage.Body.(protocol.MessageTypeAware) +// mergedMessage.Msgs = append(mergedMessage.Msgs, message) +// mergedMessage.MsgIds = append(mergedMessage.MsgIds, rpcMessage.ID) +// if len(mergedMessage.Msgs) == 20 { +// client.sendMergedMessage(mergedMessage) +// mergedMessage = protocol.MergedWarpMessage{ +// Msgs: make([]protocol.MessageTypeAware, 0), +// MsgIds: make([]int32, 0), +// } +// } +// case <-ticker.C: +// if len(mergedMessage.Msgs) > 0 { +// client.sendMergedMessage(mergedMessage) +// mergedMessage = protocol.MergedWarpMessage{ +// Msgs: make([]protocol.MessageTypeAware, 0), +// MsgIds: make([]int32, 0), +// } +// } +// } +// } +//} +// +//func (client *GettyRemotingClient) sendMergedMessage(mergedMessage protocol.MergedWarpMessage) { +// ss := clientSessionManager.AcquireGettySession() +// err := client.sendAsync(ss, mergedMessage) +// if err != nil { +// for _, id := range mergedMessage.MsgIds { +// resp, loaded := client.futures.Load(id) +// if loaded { +// response := resp.(*protocol.MessageFuture) +// response.Done <- true +// client.futures.Delete(id) +// } +// } +// } +//} diff --git a/pkg/rpc/getty/getty_client_session_manager.go b/pkg/rpc/getty/getty_client_session_manager.go new file mode 100644 index 000000000..73bc17949 --- /dev/null +++ b/pkg/rpc/getty/getty_client_session_manager.go @@ -0,0 +1,101 @@ +package getty + +import ( + "sync" + "sync/atomic" + "time" +) + +import ( + getty "github.com/apache/dubbo-getty" +) + +var ( + MAX_CHECK_ALIVE_RETRY = 600 + + CHECK_ALIVE_INTERNAL = 100 + + allSessions = sync.Map{} + + // serverAddress -> rpc_client.Session -> bool + serverSessions = sync.Map{} + + sessionSize int32 = 0 + + clientSessionManager = &GettyClientSessionManager{} +) + +type GettyClientSessionManager struct{} + +func (sessionManager *GettyClientSessionManager) AcquireGettySession() getty.Session { + // map 遍历是随机的 + var session getty.Session + allSessions.Range(func(key, value interface{}) bool { + session = key.(getty.Session) + if session.IsClosed() { + sessionManager.ReleaseGettySession(session) + } else { + return false + } + return true + }) + if session != nil { + return session + } + if sessionSize == 0 { + ticker := time.NewTicker(time.Duration(CHECK_ALIVE_INTERNAL) * time.Millisecond) + defer ticker.Stop() + for i := 0; i < MAX_CHECK_ALIVE_RETRY; i++ { + <-ticker.C + allSessions.Range(func(key, value interface{}) bool { + session = key.(getty.Session) + if session.IsClosed() { + sessionManager.ReleaseGettySession(session) + } else { + return false + } + return true + }) + if session != nil { + return session + } + } + } + return nil +} + +func (sessionManager *GettyClientSessionManager) AcquireGettySessionByServerAddress(serverAddress string) getty.Session { + m, _ := serverSessions.LoadOrStore(serverAddress, &sync.Map{}) + sMap := m.(*sync.Map) + + var session getty.Session + sMap.Range(func(key, value interface{}) bool { + session = key.(getty.Session) + if session.IsClosed() { + sessionManager.ReleaseGettySession(session) + } else { + return false + } + return true + }) + return session +} + +func (sessionManager *GettyClientSessionManager) ReleaseGettySession(session getty.Session) { + allSessions.Delete(session) + if !session.IsClosed() { + m, _ := serverSessions.LoadOrStore(session.RemoteAddr(), &sync.Map{}) + sMap := m.(*sync.Map) + sMap.Delete(session) + session.Close() + } + atomic.AddInt32(&sessionSize, -1) +} + +func (sessionManager *GettyClientSessionManager) RegisterGettySession(session getty.Session) { + allSessions.Store(session, true) + m, _ := serverSessions.LoadOrStore(session.RemoteAddr(), &sync.Map{}) + sMap := m.(*sync.Map) + sMap.Store(session, true) + atomic.AddInt32(&sessionSize, 1) +} diff --git a/pkg/rpc/getty/getty_remoting.go b/pkg/rpc/getty/getty_remoting.go new file mode 100644 index 000000000..26c042325 --- /dev/null +++ b/pkg/rpc/getty/getty_remoting.go @@ -0,0 +1,130 @@ +package getty + +import ( + "sync" + "time" +) + +import ( + getty "github.com/apache/dubbo-getty" + + gxtime "github.com/dubbogo/gost/time" + + "github.com/pkg/errors" +) + +import ( + "github.com/seata/seata-go/pkg/protocol" + "github.com/seata/seata-go/pkg/utils/log" +) + +const ( + RPC_REQUEST_TIMEOUT = 30 * time.Second +) + +var ( + gettyRemoting *GettyRemoting + onceGettyRemoting = &sync.Once{} +) + +type GettyRemoting struct { + futures *sync.Map + mergeMsgMap *sync.Map +} + +func GetGettyRemotingInstance() *GettyRemoting { + if gettyRemoting == nil { + onceGettyRemoting.Do(func() { + gettyRemoting = &GettyRemoting{ + futures: &sync.Map{}, + mergeMsgMap: &sync.Map{}, + } + }) + } + return gettyRemoting +} + +func (client *GettyRemoting) SendSync(msg protocol.RpcMessage) (interface{}, error) { + ss := clientSessionManager.AcquireGettySession() + return client.sendAsync(ss, msg, RPC_REQUEST_TIMEOUT) +} + +func (client *GettyRemoting) SendSyncWithTimeout(msg protocol.RpcMessage, timeout time.Duration) (interface{}, error) { + ss := clientSessionManager.AcquireGettySession() + return client.sendAsync(ss, msg, timeout) +} + +func (client *GettyRemoting) SendASync(msg protocol.RpcMessage) error { + ss := clientSessionManager.AcquireGettySession() + _, err := client.sendAsync(ss, msg, 0*time.Second) + return err +} + +func (client *GettyRemoting) sendAsync(session getty.Session, msg protocol.RpcMessage, timeout time.Duration) (interface{}, error) { + var err error + if session == nil || session.IsClosed() { + log.Warn("sendAsyncRequestWithResponse nothing, caused by null channel.") + } + resp := protocol.NewMessageFuture(msg) + client.futures.Store(msg.ID, resp) + _, _, err = session.WritePkg(msg, time.Duration(0)) + if err != nil { + client.futures.Delete(msg.ID) + log.Errorf("send message: %#v, session: %s", msg, session.Stat()) + return nil, err + } + + log.Debugf("send message: %#v, session: %s", msg, session.Stat()) + + if timeout > time.Duration(0) { + select { + case <-gxtime.GetDefaultTimerWheel().After(timeout): + client.futures.Delete(msg.ID) + if session != nil { + return nil, errors.Errorf("wait response timeout, ip: %s, request: %#v", session.RemoteAddr(), msg) + } else { + return nil, errors.Errorf("wait response timeout and session is nil, request: %#v", msg) + } + case <-resp.Done: + err = resp.Err + return resp.Response, err + } + } + + return nil, err +} + +func (client *GettyRemoting) GetMessageFuture(msgID int32) *protocol.MessageFuture { + if msg, ok := client.futures.Load(msgID); ok { + return msg.(*protocol.MessageFuture) + } + return nil +} + +func (client *GettyRemoting) RemoveMessageFuture(msgID int32) { + client.futures.Delete(msgID) +} + +func (client *GettyRemoting) RemoveMergedMessageFuture(msgID int32) { + client.mergeMsgMap.Delete(msgID) +} + +func (client *GettyRemoting) GetMergedMessage(msgID int32) *protocol.MergedWarpMessage { + if msg, ok := client.mergeMsgMap.Load(msgID); ok { + return msg.(*protocol.MergedWarpMessage) + } + return nil +} + +func (client *GettyRemoting) NotifytRpcMessageResponse(rpcMessage protocol.RpcMessage) { + messageFuture := client.GetMessageFuture(rpcMessage.ID) + if messageFuture != nil { + messageFuture.Response = rpcMessage.Body + // todo messageFuture.Err怎么配置呢? + //messageFuture.Err = rpcMessage.Err + messageFuture.Done <- true + //client.futures.Delete(rpcMessage.ID) + } else { + log.Infof("msg: {} is not found in futures.", rpcMessage.ID) + } +} diff --git a/pkg/rpc/getty/listener.go b/pkg/rpc/getty/listener.go new file mode 100644 index 000000000..be4e6c946 --- /dev/null +++ b/pkg/rpc/getty/listener.go @@ -0,0 +1,116 @@ +package getty + +import ( + "context" + "sync" +) + +import ( + getty "github.com/apache/dubbo-getty" + + "go.uber.org/atomic" +) + +import ( + "github.com/seata/seata-go/pkg/config" + "github.com/seata/seata-go/pkg/protocol" + "github.com/seata/seata-go/pkg/rpc/processor" + "github.com/seata/seata-go/pkg/utils/log" +) + +var ( + clientHandler *gettyClientHandler + onceClientHandler = &sync.Once{} +) + +type gettyClientHandler struct { + conf *config.ClientConfig + idGenerator *atomic.Uint32 + futures *sync.Map + mergeMsgMap *sync.Map + processorTable map[protocol.MessageType]processor.RemotingProcessor +} + +func GetGettyClientHandlerInstance() *gettyClientHandler { + if clientHandler == nil { + onceClientHandler.Do(func() { + clientHandler = &gettyClientHandler{ + conf: config.GetDefaultClientConfig("seata-go"), + idGenerator: &atomic.Uint32{}, + futures: &sync.Map{}, + mergeMsgMap: &sync.Map{}, + processorTable: make(map[protocol.MessageType]processor.RemotingProcessor, 0), + } + }) + } + return clientHandler +} + +// OnOpen ... +func (client *gettyClientHandler) OnOpen(session getty.Session) error { + clientSessionManager.RegisterGettySession(session) + go func() { + request := protocol.RegisterTMRequest{AbstractIdentifyRequest: protocol.AbstractIdentifyRequest{ + Version: client.conf.SeataVersion, + ApplicationId: client.conf.ApplicationID, + TransactionServiceGroup: client.conf.TransactionServiceGroup, + }} + err := GetGettyRemotingClient().SendAsyncRequest(request) + //client.sendAsyncRequestWithResponse(session, request, RPC_REQUEST_TIMEOUT) + if err != nil { + log.Error("OnOpen error: {%#v}", err.Error()) + clientSessionManager.ReleaseGettySession(session) + return + } + + //todo + //client.GettySessionOnOpenChannel <- session.RemoteAddr() + }() + + return nil +} + +// OnError ... +func (client *gettyClientHandler) OnError(session getty.Session, err error) { + clientSessionManager.ReleaseGettySession(session) +} + +// OnClose ... +func (client *gettyClientHandler) OnClose(session getty.Session) { + clientSessionManager.ReleaseGettySession(session) +} + +// OnMessage ... +func (client *gettyClientHandler) OnMessage(session getty.Session, pkg interface{}) { + // TODO 需要把session里面的关键信息存储到context中,以方便在后面流程中获取使用。比如,XID等等 + ctx := context.Background() + log.Debugf("received message: {%#v}", pkg) + + rpcMessage, ok := pkg.(protocol.RpcMessage) + if !ok { + log.Errorf("received message is not protocol.RpcMessage. pkg: %#v", pkg) + return + } + + if mm, ok := rpcMessage.Body.(protocol.MessageTypeAware); ok { + processor := client.processorTable[mm.GetTypeCode()] + if processor != nil { + processor.Process(ctx, rpcMessage) + } else { + log.Errorf("This message type [%v] has no processor.", mm.GetTypeCode()) + } + } else { + log.Errorf("This rpcMessage body[%v] is not MessageTypeAware type.", rpcMessage.Body) + } +} + +// OnCron ... +func (client *gettyClientHandler) OnCron(session getty.Session) { + //GetGettyRemotingClient().SendAsyncRequest(protocol.HeartBeatMessagePing) +} + +func (client *gettyClientHandler) RegisterProcessor(msgType protocol.MessageType, processor processor.RemotingProcessor) { + if nil != processor { + client.processorTable[msgType] = processor + } +} diff --git a/pkg/rpc/getty/readwriter.go b/pkg/rpc/getty/readwriter.go new file mode 100644 index 000000000..0ca3a2a15 --- /dev/null +++ b/pkg/rpc/getty/readwriter.go @@ -0,0 +1,279 @@ +package getty + +import ( + "bytes" + "encoding/binary" +) + +import ( + getty "github.com/apache/dubbo-getty" + + "github.com/pkg/errors" + + "vimagination.zapto.org/byteio" +) + +import ( + "github.com/seata/seata-go/pkg/protocol" + "github.com/seata/seata-go/pkg/protocol/codec" +) + +/** + *
+ * 0     1     2     3     4     5     6     7     8     9    10     11    12    13    14    15    16
+ * +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
+ * |   magic   |Proto |     Full length      |    Head   | Msg |Seria|Compr|     RequestID         |
+ * |   code    |clVer |    (head+body)       |   Length  |Type |lizer|ess  |                       |
+ * +-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
+ * |                                                                                               |
+ * |                                   Head Map [Optional]                                         |
+ * +-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
+ * |                                                                                               |
+ * |                                         body                                                  |
+ * |                                                                                               |
+ * |                                        ... ...                                                |
+ * +-----------------------------------------------------------------------------------------------+
+ * 
+ *

+ *

  • Full Length: include all data
  • + *
  • Head Length: include head data from magic code to head map.
  • + *
  • Body Length: Full Length - Head Length
  • + *

    + * https://github.com/seata/seata/issues/893 + */ +const ( + SeataV1PackageHeaderReservedLength = 16 +) + +var ( + // RpcPkgHandler + rpcPkgHandler = &RpcPackageHandler{} +) + +var ( + ErrNotEnoughStream = errors.New("packet stream is not enough") + ErrTooLargePackage = errors.New("package length is exceed the getty package's legal maximum length.") + ErrInvalidPackage = errors.New("invalid rpc package") + ErrIllegalMagic = errors.New("package magic is not right.") +) + +type RpcPackageHandler struct{} + +type SeataV1PackageHeader struct { + Magic0 byte + Magic1 byte + Version byte + TotalLength uint32 + HeadLength uint16 + MessageType protocol.RequestType + CodecType byte + CompressType byte + ID uint32 + Meta map[string]string + BodyLength uint32 +} + +func (h *SeataV1PackageHeader) Unmarshal(buf *bytes.Buffer) (int, error) { + bufLen := buf.Len() + if bufLen < SeataV1PackageHeaderReservedLength { + return 0, ErrNotEnoughStream + } + + // magic + if err := binary.Read(buf, binary.BigEndian, &(h.Magic0)); err != nil { + return 0, err + } + if err := binary.Read(buf, binary.BigEndian, &(h.Magic1)); err != nil { + return 0, err + } + if h.Magic0 != protocol.MAGIC_CODE_BYTES[0] || h.Magic1 != protocol.MAGIC_CODE_BYTES[1] { + return 0, ErrIllegalMagic + } + // version + if err := binary.Read(buf, binary.BigEndian, &(h.Version)); err != nil { + return 0, err + } + // TODO check version compatible here + + // total length + if err := binary.Read(buf, binary.BigEndian, &(h.TotalLength)); err != nil { + return 0, err + } + // head length + if err := binary.Read(buf, binary.BigEndian, &(h.HeadLength)); err != nil { + return 0, err + } + // message type + if err := binary.Read(buf, binary.BigEndian, &(h.MessageType)); err != nil { + return 0, err + } + // codec type + if err := binary.Read(buf, binary.BigEndian, &(h.CodecType)); err != nil { + return 0, err + } + // compress type + if err := binary.Read(buf, binary.BigEndian, &(h.CompressType)); err != nil { + return 0, err + } + // id + if err := binary.Read(buf, binary.BigEndian, &(h.ID)); err != nil { + return 0, err + } + // todo meta map + if h.HeadLength > SeataV1PackageHeaderReservedLength { + headMapLength := h.HeadLength - SeataV1PackageHeaderReservedLength + h.Meta = headMapDecode(buf.Bytes()[:headMapLength]) + } + h.BodyLength = h.TotalLength - uint32(h.HeadLength) + + return int(h.TotalLength), nil +} + +// Read read binary data from to rpc message +func (p *RpcPackageHandler) Read(ss getty.Session, data []byte) (interface{}, int, error) { + var header SeataV1PackageHeader + + buf := bytes.NewBuffer(data) + _, err := header.Unmarshal(buf) + if err != nil { + if err == ErrNotEnoughStream { + // getty case2 + return nil, 0, nil + } + // getty case1 + return nil, 0, err + } + if uint32(len(data)) < header.TotalLength { + // get case3 + return nil, int(header.TotalLength), nil + } + + //r := byteio.BigEndianReader{Reader: bytes.NewReader(data)} + rpcMessage := protocol.RpcMessage{ + Codec: header.CodecType, + ID: int32(header.ID), + Compressor: header.CompressType, + Type: header.MessageType, + HeadMap: header.Meta, + } + + if header.MessageType == protocol.MSGTypeHeartbeatRequest { + rpcMessage.Body = protocol.HeartBeatMessagePing + } else if header.MessageType == protocol.MSGTypeHeartbeatResponse { + rpcMessage.Body = protocol.HeartBeatMessagePong + } else { + if header.BodyLength > 0 { + //todo compress + msg, _ := codec.MessageDecoder(header.CodecType, data[header.HeadLength:]) + rpcMessage.Body = msg + } + } + + return rpcMessage, int(header.TotalLength), nil +} + +// Write write rpc message to binary data +func (p *RpcPackageHandler) Write(ss getty.Session, pkg interface{}) ([]byte, error) { + msg, ok := pkg.(protocol.RpcMessage) + if !ok { + return nil, ErrInvalidPackage + } + + fullLength := protocol.V1HeadLength + headLength := protocol.V1HeadLength + var result = make([]byte, 0, fullLength) + + var b bytes.Buffer + w := byteio.BigEndianWriter{Writer: &b} + + result = append(result, protocol.MAGIC_CODE_BYTES[:2]...) + result = append(result, protocol.VERSION) + + w.WriteByte(byte(msg.Type)) + w.WriteByte(msg.Codec) + w.WriteByte(msg.Compressor) + w.WriteInt32(msg.ID) + + if msg.HeadMap != nil && len(msg.HeadMap) > 0 { + headMapBytes, headMapLength := headMapEncode(msg.HeadMap) + headLength += headMapLength + fullLength += headMapLength + w.Write(headMapBytes) + } + + if msg.Type != protocol.MSGTypeHeartbeatRequest && + msg.Type != protocol.MSGTypeHeartbeatResponse { + + bodyBytes := codec.MessageEncoder(msg.Codec, msg.Body) + fullLength += len(bodyBytes) + w.Write(bodyBytes) + } + + fullLen := int32(fullLength) + headLen := int16(headLength) + result = append(result, []byte{byte(fullLen >> 24), byte(fullLen >> 16), byte(fullLen >> 8), byte(fullLen)}...) + result = append(result, []byte{byte(headLen >> 8), byte(headLen)}...) + result = append(result, b.Bytes()...) + + return result, nil +} + +func headMapDecode(data []byte) map[string]string { + size := len(data) + if size == 0 { + return nil + } + + mp := make(map[string]string) + r := byteio.BigEndianReader{Reader: bytes.NewReader(data)} + + readLength := 0 + for readLength < size { + var key, value string + lengthK, _, _ := r.ReadUint16() + if lengthK < 0 { + break + } else if lengthK == 0 { + key = "" + } else { + key, _, _ = r.ReadString(int(lengthK)) + } + + lengthV, _, _ := r.ReadUint16() + if lengthV < 0 { + break + } else if lengthV == 0 { + value = "" + } else { + value, _, _ = r.ReadString(int(lengthV)) + } + + mp[key] = value + readLength += int(lengthK + lengthV) + } + + return mp +} + +func headMapEncode(data map[string]string) ([]byte, int) { + var b bytes.Buffer + + w := byteio.BigEndianWriter{Writer: &b} + for k, v := range data { + if k == "" { + w.WriteUint16(0) + } else { + w.WriteUint16(uint16(len(k))) + w.WriteString(k) + } + + if v == "" { + w.WriteUint16(0) + } else { + w.WriteUint16(uint16(len(v))) + w.WriteString(v) + } + } + + return b.Bytes(), b.Len() +} diff --git a/pkg/rpc/getty/rpc_client.go b/pkg/rpc/getty/rpc_client.go new file mode 100644 index 000000000..5b947fc25 --- /dev/null +++ b/pkg/rpc/getty/rpc_client.go @@ -0,0 +1,107 @@ +package getty + +import ( + "fmt" + "net" + "sync" +) + +import ( + getty "github.com/apache/dubbo-getty" + + gxsync "github.com/dubbogo/gost/sync" +) + +import ( + "github.com/seata/seata-go/pkg/config" + "github.com/seata/seata-go/pkg/utils/log" +) + +type RpcClient struct { + conf *config.ClientConfig + gettyClients []getty.Client + //rpcHandler RpcRemoteClient + futures *sync.Map +} + +func init() { + newRpcClient() +} + +func newRpcClient() *RpcClient { + rpcClient := &RpcClient{ + conf: config.GetClientConfig(), + gettyClients: make([]getty.Client, 0), + //rpcHandler: *InitRpcRemoteClient(), + } + rpcClient.init() + return rpcClient +} + +func (c *RpcClient) init() { + addressList := getAvailServerList(c.conf) + if len(addressList) == 0 { + log.Warn("no have valid seata server list") + } + for _, address := range addressList { + gettyClient := getty.NewTCPClient( + getty.WithServerAddress(address), + getty.WithConnectionNumber((int)(c.conf.GettyConfig.ConnectionNum)), + getty.WithReconnectInterval(c.conf.GettyConfig.ReconnectInterval), + getty.WithClientTaskPool(gxsync.NewTaskPoolSimple(0)), + ) + go gettyClient.RunEventLoop(c.newSession) + // c.gettyClients = append(c.gettyClients, gettyClient) + } +} + +// todo mock +func getAvailServerList(config *config.ClientConfig) []string { + //reg, err := extension.GetRegistry(config.RegistryConfig.Mode) + //if err != nil { + // logger.Errorf("Registry can not connect success, program is going to panic.Error message is %s", err.Error()) + // panic(err.Error()) + //} + //addrs, err := reg.Lookup() + //if err != nil { + // logger.Errorf("no hava valid server list", err.Error()) + // return nil + //} + //return addrs + return []string{"127.0.0.1:8091"} +} + +func (c *RpcClient) newSession(session getty.Session) error { + var ( + ok bool + tcpConn *net.TCPConn + ) + + if c.conf.GettyConfig.GettySessionParam.CompressEncoding { + session.SetCompressType(getty.CompressZip) + } + + if tcpConn, ok = session.Conn().(*net.TCPConn); !ok { + panic(fmt.Sprintf("%s, session.conn{%#v} is not tcp connection\n", session.Stat(), session.Conn())) + } + + tcpConn.SetNoDelay(c.conf.GettyConfig.GettySessionParam.TCPNoDelay) + tcpConn.SetKeepAlive(c.conf.GettyConfig.GettySessionParam.TCPKeepAlive) + if c.conf.GettyConfig.GettySessionParam.TCPKeepAlive { + tcpConn.SetKeepAlivePeriod(c.conf.GettyConfig.GettySessionParam.KeepAlivePeriod) + } + tcpConn.SetReadBuffer(c.conf.GettyConfig.GettySessionParam.TCPRBufSize) + tcpConn.SetWriteBuffer(c.conf.GettyConfig.GettySessionParam.TCPWBufSize) + + session.SetName(c.conf.GettyConfig.GettySessionParam.SessionName) + session.SetMaxMsgLen(c.conf.GettyConfig.GettySessionParam.MaxMsgLen) + session.SetPkgHandler(rpcPkgHandler) + session.SetEventListener(GetGettyClientHandlerInstance()) + session.SetReadTimeout(c.conf.GettyConfig.GettySessionParam.TCPReadTimeout) + session.SetWriteTimeout(c.conf.GettyConfig.GettySessionParam.TCPWriteTimeout) + session.SetCronPeriod((int)(c.conf.GettyConfig.HeartbeatPeriod.Nanoseconds() / 1e6)) + session.SetWaitTime(c.conf.GettyConfig.GettySessionParam.WaitTimeout) + log.Debugf("rpc_client new session:%s\n", session.Stat()) + + return nil +} diff --git a/pkg/rpc/getty/rpc_rm_message.go b/pkg/rpc/getty/rpc_rm_message.go new file mode 100644 index 000000000..2f5f77bc7 --- /dev/null +++ b/pkg/rpc/getty/rpc_rm_message.go @@ -0,0 +1,10 @@ +package getty + +import ( + "github.com/seata/seata-go/pkg/protocol" +) + +type RpcRMMessage struct { + RpcMessage protocol.RpcMessage + ServerAddress string +} diff --git a/pkg/rpc/processor/client/client_heart_beat_processon.go b/pkg/rpc/processor/client/client_heart_beat_processon.go new file mode 100644 index 000000000..d1ed0e4c9 --- /dev/null +++ b/pkg/rpc/processor/client/client_heart_beat_processon.go @@ -0,0 +1,26 @@ +package client + +import ( + "context" +) + +import ( + "github.com/seata/seata-go/pkg/protocol" + "github.com/seata/seata-go/pkg/rpc/getty" + "github.com/seata/seata-go/pkg/utils/log" +) + +func init() { + getty.GetGettyClientHandlerInstance().RegisterProcessor(protocol.MessageTypeHeartbeatMsg, &clientHeartBeatProcesson{}) +} + +type clientHeartBeatProcesson struct{} + +func (f *clientHeartBeatProcesson) Process(ctx context.Context, rpcMessage protocol.RpcMessage) error { + if _, ok := rpcMessage.Body.(protocol.HeartBeatMessage); ok { + // TODO 如何从context中获取远程服务的信息? + //log.Infof("received PONG from {}", ctx.channel().remoteAddress()) + log.Infof("received PONG from {}", ctx) + } + return nil +} diff --git a/pkg/rpc/processor/client/client_on_response_processor.go b/pkg/rpc/processor/client/client_on_response_processor.go new file mode 100644 index 000000000..b84772d5c --- /dev/null +++ b/pkg/rpc/processor/client/client_on_response_processor.go @@ -0,0 +1,56 @@ +package client + +import ( + "context" +) + +import ( + "github.com/seata/seata-go/pkg/protocol" + "github.com/seata/seata-go/pkg/rpc/getty" + "github.com/seata/seata-go/pkg/utils/log" +) + +func init() { + clientOnResponseProcessor := &clientOnResponseProcessor{} + getty.GetGettyClientHandlerInstance().RegisterProcessor(protocol.MessageTypeSeataMergeResult, clientOnResponseProcessor) + getty.GetGettyClientHandlerInstance().RegisterProcessor(protocol.MessageTypeBranchRegisterResult, clientOnResponseProcessor) + getty.GetGettyClientHandlerInstance().RegisterProcessor(protocol.MessageTypeBranchStatusReportResult, clientOnResponseProcessor) + getty.GetGettyClientHandlerInstance().RegisterProcessor(protocol.MessageTypeGlobalLockQueryResult, clientOnResponseProcessor) + getty.GetGettyClientHandlerInstance().RegisterProcessor(protocol.MessageTypeRegRmResult, clientOnResponseProcessor) +} + +type clientOnResponseProcessor struct { +} + +func (f *clientOnResponseProcessor) Process(ctx context.Context, rpcMessage protocol.RpcMessage) error { + // 如果是合并的结果消息,直接通知已经处理完成 + if mergedResult, ok := rpcMessage.Body.(protocol.MergeResultMessage); ok { + + mergedMessage := getty.GetGettyRemotingInstance().GetMergedMessage(rpcMessage.ID) + if mergedMessage != nil { + for i := 0; i < len(mergedMessage.Msgs); i++ { + msgID := mergedMessage.MsgIds[i] + response := getty.GetGettyRemotingInstance().GetMessageFuture(msgID) + if response != nil { + response.Response = mergedResult.Msgs[i] + response.Done <- true + getty.GetGettyRemotingInstance().RemoveMessageFuture(msgID) + } + } + getty.GetGettyRemotingInstance().RemoveMergedMessageFuture(rpcMessage.ID) + } + return nil + } else { + // 如果是请求消息,做处理逻辑 + msgFuture := getty.GetGettyRemotingInstance().GetMessageFuture(rpcMessage.ID) + if msgFuture != nil { + getty.GetGettyRemotingInstance().NotifytRpcMessageResponse(rpcMessage) + getty.GetGettyRemotingInstance().RemoveMessageFuture(rpcMessage.ID) + } else { + if _, ok := rpcMessage.Body.(protocol.AbstractResultMessage); ok { + log.Infof("the rm client received response msg [{}] from tc server.", msgFuture) + } + } + } + return nil +} diff --git a/pkg/rpc/processor/remoting_processor.go b/pkg/rpc/processor/remoting_processor.go new file mode 100644 index 000000000..2dd13f409 --- /dev/null +++ b/pkg/rpc/processor/remoting_processor.go @@ -0,0 +1,13 @@ +package processor + +import ( + "context" +) + +import ( + "github.com/seata/seata-go/pkg/protocol" +) + +type RemotingProcessor interface { + Process(ctx context.Context, rpcMessage protocol.RpcMessage) error +} diff --git a/pkg/tm/api/global_transaction.go b/pkg/tm/api/global_transaction.go new file mode 100644 index 000000000..c9a6320fc --- /dev/null +++ b/pkg/tm/api/global_transaction.go @@ -0,0 +1,45 @@ +package api + +import ( + "github.com/seata/seata-go/pkg/common/model" +) + +type GlobalTransactionRole int8 + +const ( + LAUNCHER GlobalTransactionRole = 0 + PARTICIPANT GlobalTransactionRole = 1 +) + +type GlobalTransaction interface { + + // Begin a new global transaction with given timeout and given name. + begin(timeout int64, name string) error + + // Commit the global transaction. + commit() error + + // Rollback the global transaction. + rollback() error + + // Suspend the global transaction. + suspend() (SuspendedResourcesHolder, error) + + // Resume the global transaction. + resume(suspendedResourcesHolder SuspendedResourcesHolder) error + + // Ask TC for current status of the corresponding global transaction. + getStatus() (model.GlobalStatus, error) + + // Get XID. + getXid() string + + // report the global transaction status. + globalReport(globalStatus model.GlobalStatus) error + + // local status of the global transaction. + getLocalStatus() model.GlobalStatus + + // get global transaction role. + getGlobalTransactionRole() GlobalTransactionRole +} diff --git a/pkg/tm/api/suspended_resources_holder.go b/pkg/tm/api/suspended_resources_holder.go new file mode 100644 index 000000000..84586aabf --- /dev/null +++ b/pkg/tm/api/suspended_resources_holder.go @@ -0,0 +1,11 @@ +package api + +type SuspendedResourcesHolder struct { + Xid string +} + +func NewSuspendedResourcesHolder(xid string) SuspendedResourcesHolder { + return SuspendedResourcesHolder{ + Xid: xid, + } +} diff --git a/pkg/utils/log/logging.go b/pkg/utils/log/logging.go new file mode 100644 index 000000000..f0f1ee7ac --- /dev/null +++ b/pkg/utils/log/logging.go @@ -0,0 +1,218 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package log + +import ( + "bytes" + "errors" + "fmt" +) + +import ( + "github.com/natefinch/lumberjack" + + "go.uber.org/zap" + "go.uber.org/zap/zapcore" +) + +// Level represents the level of logging. +type LogLevel int8 + +const ( + // DebugLevel logs are typically voluminous, and are usually disabled in + // production. + DebugLevel = LogLevel(zapcore.DebugLevel) + // InfoLevel is the default logging priority. + InfoLevel = LogLevel(zapcore.InfoLevel) + // WarnLevel logs are more important than Info, but don't need individual + // human review. + WarnLevel = LogLevel(zapcore.WarnLevel) + // ErrorLevel logs are high-priority. If an application is running smoothly, + // it shouldn't generate any error-level logs. + ErrorLevel = LogLevel(zapcore.ErrorLevel) + // PanicLevel logs a message, then panics. + PanicLevel = LogLevel(zapcore.PanicLevel) + // FatalLevel logs a message, then calls os.Exit(1). + FatalLevel = LogLevel(zapcore.FatalLevel) +) + +func (l *LogLevel) UnmarshalText(text []byte) error { + if l == nil { + return errors.New("can't unmarshal a nil *Level") + } + if !l.unmarshalText(text) && !l.unmarshalText(bytes.ToLower(text)) { + return fmt.Errorf("unrecognized level: %q", text) + } + return nil +} + +func (l *LogLevel) unmarshalText(text []byte) bool { + switch string(text) { + case "debug", "DEBUG": + *l = DebugLevel + case "info", "INFO", "": // make the zero value useful + *l = InfoLevel + case "warn", "WARN": + *l = WarnLevel + case "error", "ERROR": + *l = ErrorLevel + case "panic", "PANIC": + *l = PanicLevel + case "fatal", "FATAL": + *l = FatalLevel + default: + return false + } + return true +} + +type Logger interface { + Debug(v ...interface{}) + Debugf(format string, v ...interface{}) + + Info(v ...interface{}) + Infof(format string, v ...interface{}) + + Warn(v ...interface{}) + Warnf(format string, v ...interface{}) + + Error(v ...interface{}) + Errorf(format string, v ...interface{}) + + Panic(v ...interface{}) + Panicf(format string, v ...interface{}) + + Fatal(v ...interface{}) + Fatalf(format string, v ...interface{}) +} + +var ( + log Logger + zapLogger *zap.Logger + + zapLoggerConfig = zap.NewDevelopmentConfig() + zapLoggerEncoderConfig = zapcore.EncoderConfig{ + TimeKey: "time", + LevelKey: "level", + NameKey: "logger", + CallerKey: "caller", + MessageKey: "message", + StacktraceKey: "stacktrace", + EncodeLevel: zapcore.CapitalColorLevelEncoder, + EncodeTime: zapcore.ISO8601TimeEncoder, + EncodeDuration: zapcore.SecondsDurationEncoder, + EncodeCaller: zapcore.ShortCallerEncoder, + } +) + +func init() { + zapLoggerConfig.EncoderConfig = zapLoggerEncoderConfig + zapLogger, _ = zapLoggerConfig.Build(zap.AddCallerSkip(1)) + log = zapLogger.Sugar() +} + +func Init(logPath string, level LogLevel) { + lumberJackLogger := &lumberjack.Logger{ + Filename: logPath, + MaxSize: 10, + MaxBackups: 5, + MaxAge: 30, + Compress: false, + } + syncer := zapcore.AddSync(lumberJackLogger) + + encoderConfig := zap.NewProductionEncoderConfig() + encoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder + encoderConfig.EncodeLevel = zapcore.CapitalLevelEncoder + + encoder := zapcore.NewConsoleEncoder(encoderConfig) + core := zapcore.NewCore(encoder, syncer, zap.NewAtomicLevelAt(zapcore.Level(level))) + zapLogger = zap.New(core, zap.AddCaller()) + + log = zapLogger.Sugar() +} + +// SetLogger: customize yourself logger. +func SetLogger(logger Logger) { + log = logger +} + +// GetLogger get logger +func GetLogger() Logger { + return log +} + +// Debug ... +func Debug(v ...interface{}) { + log.Debug(v...) +} + +// Debugf ... +func Debugf(format string, v ...interface{}) { + log.Debugf(format, v...) +} + +// Info ... +func Info(v ...interface{}) { + log.Info(v...) +} + +// Infof ... +func Infof(format string, v ...interface{}) { + log.Infof(format, v...) +} + +// Warn ... +func Warn(v ...interface{}) { + log.Warn(v...) +} + +// Warnf ... +func Warnf(format string, v ...interface{}) { + log.Warnf(format, v...) +} + +// Error ... +func Error(v ...interface{}) { + log.Error(v...) +} + +// Errorf ... +func Errorf(format string, v ...interface{}) { + log.Errorf(format, v...) +} + +// Panic ... +func Panic(v ...interface{}) { + log.Panic(v...) +} + +// Panicf ... +func Panicf(format string, v ...interface{}) { + log.Panicf(format, v...) +} + +// Fatal ... +func Fatal(v ...interface{}) { + log.Fatal(v...) +} + +// Fatalf ... +func Fatalf(format string, v ...interface{}) { + log.Fatalf(format, v...) +} diff --git a/pkg/utils/runtime/goroutine.go b/pkg/utils/runtime/goroutine.go new file mode 100644 index 000000000..fab26e6e1 --- /dev/null +++ b/pkg/utils/runtime/goroutine.go @@ -0,0 +1,38 @@ +package runtime + +import ( + "fmt" + "os" + "runtime/debug" + "time" +) + +var debugIgnoreStdout = false + +// GoWithRecover wraps a `go func()` with recover() +func GoWithRecover(handler func(), recoverHandler func(r interface{})) { + go func() { + defer func() { + if r := recover(); r != nil { + // TODO: log + if !debugIgnoreStdout { + fmt.Fprintf(os.Stderr, "%s goroutine panic: %v\n%s\n", + time.Now(), r, string(debug.Stack())) + } + if recoverHandler != nil { + go func() { + defer func() { + if p := recover(); p != nil { + if !debugIgnoreStdout { + fmt.Fprintf(os.Stderr, "recover goroutine panic:%v\n%s\n", p, string(debug.Stack())) + } + } + }() + recoverHandler(r) + }() + } + } + }() + handler() + }() +} diff --git a/pkg/utils/xid/xid_utils.go b/pkg/utils/xid/xid_utils.go new file mode 100644 index 000000000..de6a3162a --- /dev/null +++ b/pkg/utils/xid/xid_utils.go @@ -0,0 +1,25 @@ +package xid_utils + +import ( + "context" +) + +import ( + "github.com/seata/seata-go/pkg/common" +) + +func GetXID(ctx context.Context) string { + xid := ctx.Value(common.XID) + if xid == nil { + return "" + } + return xid.(string) +} + +func HasXID(ctx context.Context) bool { + return GetXID(ctx) != "" +} + +func SetXID(ctx context.Context, xid string) context.Context { + return context.WithValue(ctx, common.XID, xid) +} diff --git a/test/integration_test.go b/test/integration_test.go new file mode 100644 index 000000000..8ccd305a7 --- /dev/null +++ b/test/integration_test.go @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package test + +import ( + "testing" +) + +func Test1(t *testing.T) { + +} diff --git a/test/rpc_remoting_client_test.go b/test/rpc_remoting_client_test.go new file mode 100644 index 000000000..e46d7b114 --- /dev/null +++ b/test/rpc_remoting_client_test.go @@ -0,0 +1,24 @@ +package test + +import ( + _ "github.com/seata/seata-go/pkg/imports" + "testing" + "time" +) + +func TestSendMsgWithResponse(test *testing.T) { + //request := protocol.RegisterRMRequest{ + // ResourceIds: "1111", + // AbstractIdentifyRequest: protocol.AbstractIdentifyRequest{ + // ApplicationId: "ApplicationID", + // TransactionServiceGroup: "TransactionServiceGroup", + // }, + //} + //mergedMessage := protocol.MergedWarpMessage{ + // Msgs: []protocol.MessageTypeAware{request}, + // MsgIds: []int32{1212}, + //} + //handler := GetGettyClientHandlerInstance() + //handler.sendMergedMessage(mergedMessage) + time.Sleep(100000 * time.Second) +} diff --git a/testdata/mock/mock_tcc_service.go b/testdata/mock/mock_tcc_service.go new file mode 100644 index 000000000..938066dd1 --- /dev/null +++ b/testdata/mock/mock_tcc_service.go @@ -0,0 +1,51 @@ +package mock + +import ( + "context" + "fmt" +) + +import ( + "github.com/seata/seata-go/pkg/rm/api" + "github.com/seata/seata-go/pkg/rm/tcc/remoting" + _ "github.com/seata/seata-go/pkg/utils/xid" + xid_utils "github.com/seata/seata-go/pkg/utils/xid" +) + +// 注册RM资源 +func init() { + +} + +type MockTccService struct { +} + +func (*MockTccService) Prepare(ctx context.Context, params interface{}) error { + xid := xid_utils.GetXID(ctx) + fmt.Printf("TccActionOne prepare, xid:" + xid) + return nil +} + +func (*MockTccService) Commit(ctx context.Context, businessActionContext api.BusinessActionContext) error { + xid := xid_utils.GetXID(ctx) + fmt.Printf("TccActionOne commit, xid:" + xid) + return nil +} + +func (*MockTccService) Rollback(ctx context.Context, businessActionContext api.BusinessActionContext) error { + xid := xid_utils.GetXID(ctx) + fmt.Printf("TccActionOne rollback, xid:" + xid) + return nil +} + +func (*MockTccService) GetRemoteType() remoting.RemoteType { + return remoting.RemoteTypeLocalService +} + +func (*MockTccService) GetActionName() string { + return "MockTccService" +} + +func (*MockTccService) GetServiceType() remoting.ServiceType { + return remoting.ServiceTypeProvider +} diff --git a/testdata/sql/all_in_one.sql b/testdata/sql/all_in_one.sql new file mode 100644 index 000000000..d1cfb5d29 --- /dev/null +++ b/testdata/sql/all_in_one.sql @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS `stock_tbl`; +CREATE TABLE `stock_tbl` +( + `id` int(11) NOT NULL AUTO_INCREMENT, + `commodity_code` varchar(255) DEFAULT NULL, + `count` int(11) DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY (`commodity_code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `order_tbl`; +CREATE TABLE `order_tbl` +( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` varchar(255) DEFAULT NULL, + `commodity_code` varchar(255) DEFAULT NULL, + `count` int(11) DEFAULT 0, + `money` int(11) DEFAULT 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `account_tbl`; +CREATE TABLE `account_tbl` +( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` varchar(255) DEFAULT NULL, + `money` int(11) DEFAULT 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file