diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ca87659..1ae4d50 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -8,7 +8,7 @@ on: jobs: - test-ubuntu-with-redis-62: + test-ubuntu-with-redis-7: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -17,7 +17,7 @@ jobs: sudo apt-get install git git clone https://github.com/redis/redis cd redis - git checkout 6.2.0 + git checkout 7.2.5 make -j - name: clone and make tairhash @@ -76,8 +76,8 @@ jobs: - name: Test run: | - go test -v ./... -run TestTairStringTestSuite/TestTairStringTestSuite - go test -v ./... -run TestTairStringTestSuite/TestTairHashTestSuite - go test -v ./... -run TestTairStringTestSuite/TestTairZsetTestSuite + go test -v ./... -run TestTairStringTestSuite + go test -v ./... -run TestTairHashTestSuite + go test -v ./... -run TestTairZsetTestSuite go test -v ./... -run TestTairPipelineTestSuite diff --git a/README-CN.md b/README-CN.md index 2ec6d66..487d830 100644 --- a/README-CN.md +++ b/README-CN.md @@ -39,7 +39,7 @@ test.go import ( "context" "fmt" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" "github.com/alibaba/tair-go/tair" ) diff --git a/README.md b/README.md index 5a1bbd6..1c19461 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ test.go import ( "context" "fmt" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" "github.com/alibaba/tair-go/tair" ) diff --git a/example/BargainRush/BargainRush.go b/example/BargainRush/BargainRush.go index 69fc95f..37890d4 100644 --- a/example/BargainRush/BargainRush.go +++ b/example/BargainRush/BargainRush.go @@ -3,8 +3,9 @@ package main import ( "context" "fmt" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/BitCount/BitCount.go b/example/BitCount/BitCount.go index 556311a..0dd44d6 100644 --- a/example/BitCount/BitCount.go +++ b/example/BitCount/BitCount.go @@ -3,8 +3,9 @@ package main import ( "context" "fmt" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/BloomFilter/BloomFilter.go b/example/BloomFilter/BloomFilter.go index 8779038..ad0e740 100644 --- a/example/BloomFilter/BloomFilter.go +++ b/example/BloomFilter/BloomFilter.go @@ -2,10 +2,11 @@ package main import ( "context" - "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" "math/rand" "time" + + "github.com/alibaba/tair-go/tair" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/BoundedCounter/BoundedCounter.go b/example/BoundedCounter/BoundedCounter.go index 2dc030d..130516c 100644 --- a/example/BoundedCounter/BoundedCounter.go +++ b/example/BoundedCounter/BoundedCounter.go @@ -3,8 +3,9 @@ package main import ( "context" "fmt" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/CarTrack/CarTrack.go b/example/CarTrack/CarTrack.go index fca8bd9..8d35655 100644 --- a/example/CarTrack/CarTrack.go +++ b/example/CarTrack/CarTrack.go @@ -3,10 +3,11 @@ package main import ( "context" "fmt" - "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" "strconv" "time" + + "github.com/alibaba/tair-go/tair" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/CpuCurve/CpuCurve.go b/example/CpuCurve/CpuCurve.go index 1b8b6b5..91102b6 100644 --- a/example/CpuCurve/CpuCurve.go +++ b/example/CpuCurve/CpuCurve.go @@ -2,8 +2,9 @@ package main import ( "context" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/CrawlerSystem/CrawlerSystem.go b/example/CrawlerSystem/CrawlerSystem.go index 352838a..2670bab 100644 --- a/example/CrawlerSystem/CrawlerSystem.go +++ b/example/CrawlerSystem/CrawlerSystem.go @@ -3,8 +3,9 @@ package main import ( "context" "fmt" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/DeviceLogin/DeviceLogin.go b/example/DeviceLogin/DeviceLogin.go index bc1c8dd..0f65487 100644 --- a/example/DeviceLogin/DeviceLogin.go +++ b/example/DeviceLogin/DeviceLogin.go @@ -3,10 +3,11 @@ package main import ( "context" "fmt" - "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" "strconv" "time" + + "github.com/alibaba/tair-go/tair" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/FraudPrevention/FraudPrevention.go b/example/FraudPrevention/FraudPrevention.go index 02a9f5c..34108e3 100644 --- a/example/FraudPrevention/FraudPrevention.go +++ b/example/FraudPrevention/FraudPrevention.go @@ -3,8 +3,9 @@ package main import ( "context" "fmt" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/FullTextSearch/FullTextSearch.go b/example/FullTextSearch/FullTextSearch.go index 0f2a485..a91e982 100644 --- a/example/FullTextSearch/FullTextSearch.go +++ b/example/FullTextSearch/FullTextSearch.go @@ -3,8 +3,9 @@ package main import ( "context" "fmt" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/GamePackage/GamePackage.go b/example/GamePackage/GamePackage.go index 70b17ec..0abb3b8 100644 --- a/example/GamePackage/GamePackage.go +++ b/example/GamePackage/GamePackage.go @@ -3,8 +3,9 @@ package main import ( "context" "fmt" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/JSONDocument/JSONDocument.go b/example/JSONDocument/JSONDocument.go index 99c48ea..96438a7 100644 --- a/example/JSONDocument/JSONDocument.go +++ b/example/JSONDocument/JSONDocument.go @@ -3,8 +3,9 @@ package main import ( "context" "fmt" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/LbsBuy/LbsBuy.go b/example/LbsBuy/LbsBuy.go index c3ed262..b468510 100644 --- a/example/LbsBuy/LbsBuy.go +++ b/example/LbsBuy/LbsBuy.go @@ -3,8 +3,9 @@ package main import ( "context" "fmt" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/LeaderBoard/LeaderBoard.go b/example/LeaderBoard/LeaderBoard.go index 35ad3ae..fb87b0e 100644 --- a/example/LeaderBoard/LeaderBoard.go +++ b/example/LeaderBoard/LeaderBoard.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/MultiIndexSearch/MultiIndexSearch.go b/example/MultiIndexSearch/MultiIndexSearch.go index 0b22bb1..0c10ad7 100644 --- a/example/MultiIndexSearch/MultiIndexSearch.go +++ b/example/MultiIndexSearch/MultiIndexSearch.go @@ -3,8 +3,9 @@ package main import ( "context" "fmt" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/PasswordExpire/PasswordExpire.go b/example/PasswordExpire/PasswordExpire.go index c3466ba..4a85fe2 100644 --- a/example/PasswordExpire/PasswordExpire.go +++ b/example/PasswordExpire/PasswordExpire.go @@ -3,9 +3,10 @@ package main import ( "context" "fmt" - "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" "time" + + "github.com/alibaba/tair-go/tair" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/example.go b/example/example.go index 62646a1..4da9320 100644 --- a/example/example.go +++ b/example/example.go @@ -3,8 +3,9 @@ package main import ( "context" "fmt" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/taircluster/example_taircluster.go b/example/taircluster/example_taircluster.go index c8052c2..77b9e18 100644 --- a/example/taircluster/example_taircluster.go +++ b/example/taircluster/example_taircluster.go @@ -3,9 +3,10 @@ package main import ( "context" "fmt" - "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" "reflect" + + "github.com/alibaba/tair-go/tair" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/tairhash/example_hash.go b/example/tairhash/example_hash.go index 8cc7d41..c314c14 100644 --- a/example/tairhash/example_hash.go +++ b/example/tairhash/example_hash.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/tairstring/distribute_lock.go b/example/tairstring/distribute_lock.go index d16fd0a..303ae4f 100644 --- a/example/tairstring/distribute_lock.go +++ b/example/tairstring/distribute_lock.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" "math/rand" "sync" "time" + + "github.com/alibaba/tair-go/tair" + "github.com/redis/go-redis/v9" ) var ctx = context.Background() diff --git a/example/tairvector/example_vector.go b/example/tairvector/example_vector.go index e83a024..16a6676 100644 --- a/example/tairvector/example_vector.go +++ b/example/tairvector/example_vector.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" "math/rand" ) diff --git a/go.mod b/go.mod index 16f9bbf..21a5e9c 100644 --- a/go.mod +++ b/go.mod @@ -1,25 +1,18 @@ module github.com/alibaba/tair-go -go 1.17 +go 1.18 require ( - github.com/go-redis/redis/v8 v8.11.5 github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.18.1 - github.com/stretchr/testify v1.8.0 + github.com/redis/go-redis/v9 v9.5.3 + github.com/stretchr/testify v1.9.0 ) require ( - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/fsnotify/fsnotify v1.4.9 // indirect - github.com/nxadm/tail v1.4.8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect - golang.org/x/text v0.3.7 // indirect - gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index b524045..c0e25dc 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -9,10 +11,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= -github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= @@ -22,7 +21,6 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 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= @@ -32,14 +30,12 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -48,12 +44,12 @@ github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= 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/redis/go-redis/v9 v9.5.3 h1:fOAp1/uJG+ZtcITgZOfYFmTKPE7n4Vclj1wZFgRciUU= +github.com/redis/go-redis/v9 v9.5.3/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -65,8 +61,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -82,16 +76,11 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/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/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -106,18 +95,14 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/tair/main_test.go b/tair/main_test.go index 1d38428..af588aa 100644 --- a/tair/main_test.go +++ b/tair/main_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) const ( @@ -57,16 +57,15 @@ type redisProcess struct { func redisOptions() *redis.Options { return &redis.Options{ - Addr: redisAddr, - DB: 15, - DialTimeout: 10 * time.Second, - ReadTimeout: 30 * time.Second, - WriteTimeout: 30 * time.Second, - MaxRetries: -1, - PoolSize: 10, - PoolTimeout: 30 * time.Second, - IdleTimeout: time.Minute, - IdleCheckFrequency: 100 * time.Millisecond, + Addr: redisAddr, + DB: 15, + DialTimeout: 10 * time.Second, + ReadTimeout: 30 * time.Second, + WriteTimeout: 30 * time.Second, + MaxRetries: -1, + PoolSize: 10, + PoolTimeout: 30 * time.Second, + ConnMaxIdleTime: time.Minute, } } @@ -78,10 +77,9 @@ func redisClusterOptions() *redis.ClusterOptions { MaxRedirects: 8, - PoolSize: 10, - PoolTimeout: 30 * time.Second, - IdleTimeout: time.Minute, - IdleCheckFrequency: 100 * time.Millisecond, + PoolSize: 10, + PoolTimeout: 30 * time.Second, + ConnMaxIdleTime: time.Minute, } } diff --git a/tair/tair.go b/tair/tair.go index 836fa72..68089d3 100644 --- a/tair/tair.go +++ b/tair/tair.go @@ -3,7 +3,7 @@ package tair import ( "context" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var _ TairCmdable = (*TairClient)(nil) diff --git a/tair/tairbloom.go b/tair/tairbloom.go index f250192..60b48d7 100644 --- a/tair/tairbloom.go +++ b/tair/tairbloom.go @@ -3,7 +3,7 @@ package tair import ( "context" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) type BfInsertArgs struct { diff --git a/tair/taircluster.go b/tair/taircluster.go index 78d4c6e..a1bb05c 100644 --- a/tair/taircluster.go +++ b/tair/taircluster.go @@ -3,7 +3,7 @@ package tair import ( "context" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var _ TairCmdable = (*TairClusterClient)(nil) diff --git a/tair/taircluster_test.go b/tair/taircluster_test.go index 93775af..017da3e 100644 --- a/tair/taircluster_test.go +++ b/tair/taircluster_test.go @@ -2,14 +2,15 @@ package tair_test import ( "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/suite" "net" "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var ( diff --git a/tair/taircommands.go b/tair/taircommands.go index 524460b..4996e40 100644 --- a/tair/taircommands.go +++ b/tair/taircommands.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) type tairCmdable func(ctx context.Context, cmd redis.Cmder) error @@ -125,7 +125,7 @@ type TairCmdable interface { ExHStrLen(ctx context.Context, key, field string) *redis.IntCmd ExHKeys(ctx context.Context, key string) *redis.StringSliceCmd ExHVals(ctx context.Context, key string) *redis.StringSliceCmd - ExHGetAll(ctx context.Context, key string) *redis.StringStringMapCmd + ExHGetAll(ctx context.Context, key string) *redis.MapStringStringCmd ExHScan(ctx context.Context, key string, cursor string) *redis.SliceCmd // TairRoaring TrSetBit(ctx context.Context, key string, offset int64, value int64) *redis.IntCmd diff --git a/tair/taircpc.go b/tair/taircpc.go index ee1c5f0..05a36d0 100644 --- a/tair/taircpc.go +++ b/tair/taircpc.go @@ -5,7 +5,7 @@ import ( "strconv" "time" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) type CpcData struct { diff --git a/tair/tairdoc.go b/tair/tairdoc.go index 7228fcd..6832d0b 100644 --- a/tair/tairdoc.go +++ b/tair/tairdoc.go @@ -2,7 +2,8 @@ package tair import ( "context" - "github.com/go-redis/redis/v8" + + "github.com/redis/go-redis/v9" ) // args diff --git a/tair/tairdoc_test.go b/tair/tairdoc_test.go index c054992..60d94d1 100644 --- a/tair/tairdoc_test.go +++ b/tair/tairdoc_test.go @@ -1,13 +1,14 @@ package tair_test import ( - "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/suite" "math/rand" "testing" "time" + + "github.com/alibaba/tair-go/tair" + "github.com/redis/go-redis/v9" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" ) var randomKey = "randomPkey_" + randStrDoc(20) diff --git a/tair/tairgis.go b/tair/tairgis.go index 54d0be0..f00fbb4 100644 --- a/tair/tairgis.go +++ b/tair/tairgis.go @@ -2,8 +2,9 @@ package tair import ( "context" - "github.com/go-redis/redis/v8" "strconv" + + "github.com/redis/go-redis/v9" ) // args @@ -427,7 +428,7 @@ func (tc tairCmdable) GisGetAllArgs(ctx context.Context, area string, args *GisA return resCmd } -func (tc tairCmdable) GisWithin(ctx context.Context, area string, polygonWkt string, withoutWkt bool) *redis.StringStringMapCmd { +func (tc tairCmdable) GisWithin(ctx context.Context, area string, polygonWkt string, withoutWkt bool) *redis.MapStringStringCmd { a := make([]interface{}, 3) a[0] = "GIS.WITHIN" a[1] = area @@ -435,7 +436,7 @@ func (tc tairCmdable) GisWithin(ctx context.Context, area string, polygonWkt str if withoutWkt { a = append(a, "WITHOUTWKT") } - cmd := redis.NewStringStringMapCmd(ctx, a...) + cmd := redis.NewMapStringStringCmd(ctx, a...) _ = tc(ctx, cmd) return cmd } diff --git a/tair/tairgis_test.go b/tair/tairgis_test.go index ec6cb0b..8244773 100644 --- a/tair/tairgis_test.go +++ b/tair/tairgis_test.go @@ -1,15 +1,16 @@ package tair_test import ( - "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/suite" "math/rand" "strconv" "strings" "testing" "time" + + "github.com/alibaba/tair-go/tair" + "github.com/redis/go-redis/v9" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" ) var randomGisKey = "randomPkey_" + randStrGis(20) diff --git a/tair/tairhash.go b/tair/tairhash.go index 6f3e37a..be2a822 100644 --- a/tair/tairhash.go +++ b/tair/tairhash.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) type ExHSetArgs struct { @@ -549,11 +549,11 @@ func (tc tairCmdable) ExHVals(ctx context.Context, key string) *redis.StringSlic return cmd } -func (tc tairCmdable) ExHGetAll(ctx context.Context, key string) *redis.StringStringMapCmd { +func (tc tairCmdable) ExHGetAll(ctx context.Context, key string) *redis.MapStringStringCmd { a := make([]interface{}, 2) a[0] = "exhgetall" a[1] = key - cmd := redis.NewStringStringMapCmd(ctx, a...) + cmd := redis.NewMapStringStringCmd(ctx, a...) _ = tc(ctx, cmd) return cmd } diff --git a/tair/tairpipeline.go b/tair/tairpipeline.go index 82904d5..4d47cd7 100644 --- a/tair/tairpipeline.go +++ b/tair/tairpipeline.go @@ -2,7 +2,8 @@ package tair import ( "context" - "github.com/go-redis/redis/v8" + + "github.com/redis/go-redis/v9" ) type TairPipeline struct { diff --git a/tair/tairpipeline_test.go b/tair/tairpipeline_test.go index ad5e0b9..deb5f48 100644 --- a/tair/tairpipeline_test.go +++ b/tair/tairpipeline_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) diff --git a/tair/tairroaring.go b/tair/tairroaring.go index 3fb5c50..8ba4969 100644 --- a/tair/tairroaring.go +++ b/tair/tairroaring.go @@ -2,7 +2,8 @@ package tair import ( "context" - "github.com/go-redis/redis/v8" + + "github.com/redis/go-redis/v9" ) func (tc tairCmdable) TrSetBit(ctx context.Context, key string, offset int64, value int64) *redis.IntCmd { diff --git a/tair/tairroaring_test.go b/tair/tairroaring_test.go index 28b34ba..6143fb5 100644 --- a/tair/tairroaring_test.go +++ b/tair/tairroaring_test.go @@ -1,11 +1,12 @@ package tair_test import ( + "testing" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" - "testing" ) type TairRoaringTestSuite struct { diff --git a/tair/tairsearch.go b/tair/tairsearch.go index 091c200..19cc26c 100644 --- a/tair/tairsearch.go +++ b/tair/tairsearch.go @@ -3,7 +3,7 @@ package tair import ( "context" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) type protocolType int diff --git a/tair/tairsearch_test.go b/tair/tairsearch_test.go index be9c9a3..75955d4 100644 --- a/tair/tairsearch_test.go +++ b/tair/tairsearch_test.go @@ -2,12 +2,13 @@ package tair_test import ( "encoding/json" + "testing" + "github.com/alibaba/tair-go/tair" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "regexp" - "testing" ) type TairSearchTestSuite struct { diff --git a/tair/tairstring.go b/tair/tairstring.go index a1b4319..fda828a 100644 --- a/tair/tairstring.go +++ b/tair/tairstring.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) type ExSetArgs struct { diff --git a/tair/tairts.go b/tair/tairts.go index cea790f..b414c25 100644 --- a/tair/tairts.go +++ b/tair/tairts.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) var MENUS = [...]string{MIN, MAX, SUM, AVG, STDP, STDS, COUNT, FIRST, LAST, RANGE} diff --git a/tair/tairvector.go b/tair/tairvector.go index e4ca42f..dfbb77f 100644 --- a/tair/tairvector.go +++ b/tair/tairvector.go @@ -2,7 +2,7 @@ package tair import ( "context" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) type TvsCreateIndexArgs struct { diff --git a/tair/tairzset.go b/tair/tairzset.go index ece4071..ab82a9e 100644 --- a/tair/tairzset.go +++ b/tair/tairzset.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/go-redis/redis/v8" + "github.com/redis/go-redis/v9" ) type ExZAddArgs struct {