wangkang 1 month ago
parent
commit
58c18a326b
100 changed files with 34 additions and 18433 deletions
  1. 1 1
      go.mod
  2. 6 0
      handler/article.go
  3. 6 8
      main.go
  4. 20 4
      model/redis.go
  5. 1 0
      router/router.go
  6. 0 22
      vendor/github.com/cespare/xxhash/LICENSE.txt
  7. 0 50
      vendor/github.com/cespare/xxhash/README.md
  8. 0 6
      vendor/github.com/cespare/xxhash/go.mod
  9. 0 4
      vendor/github.com/cespare/xxhash/go.sum
  10. 0 14
      vendor/github.com/cespare/xxhash/rotate.go
  11. 0 14
      vendor/github.com/cespare/xxhash/rotate19.go
  12. 0 168
      vendor/github.com/cespare/xxhash/xxhash.go
  13. 0 12
      vendor/github.com/cespare/xxhash/xxhash_amd64.go
  14. 0 233
      vendor/github.com/cespare/xxhash/xxhash_amd64.s
  15. 0 75
      vendor/github.com/cespare/xxhash/xxhash_other.go
  16. 0 10
      vendor/github.com/cespare/xxhash/xxhash_safe.go
  17. 0 30
      vendor/github.com/cespare/xxhash/xxhash_unsafe.go
  18. 0 79
      vendor/github.com/dgryski/go-rendezvous/rdv.go
  19. 0 2
      vendor/github.com/go-redis/redis/v8/.gitignore
  20. 0 15
      vendor/github.com/go-redis/redis/v8/.golangci.yml
  21. 0 4
      vendor/github.com/go-redis/redis/v8/.prettierrc
  22. 0 23
      vendor/github.com/go-redis/redis/v8/.travis.yml
  23. 0 83
      vendor/github.com/go-redis/redis/v8/CHANGELOG.md
  24. 0 25
      vendor/github.com/go-redis/redis/v8/LICENSE
  25. 0 20
      vendor/github.com/go-redis/redis/v8/Makefile
  26. 0 143
      vendor/github.com/go-redis/redis/v8/README.md
  27. 0 1674
      vendor/github.com/go-redis/redis/v8/cluster.go
  28. 0 25
      vendor/github.com/go-redis/redis/v8/cluster_commands.go
  29. 0 2163
      vendor/github.com/go-redis/redis/v8/command.go
  30. 0 2671
      vendor/github.com/go-redis/redis/v8/commands.go
  31. 0 4
      vendor/github.com/go-redis/redis/v8/doc.go
  32. 0 108
      vendor/github.com/go-redis/redis/v8/error.go
  33. 0 15
      vendor/github.com/go-redis/redis/v8/go.mod
  34. 0 123
      vendor/github.com/go-redis/redis/v8/go.sum
  35. 0 77
      vendor/github.com/go-redis/redis/v8/internal/hashtag/hashtag.go
  36. 0 24
      vendor/github.com/go-redis/redis/v8/internal/internal.go
  37. 0 12
      vendor/github.com/go-redis/redis/v8/internal/log.go
  38. 0 60
      vendor/github.com/go-redis/redis/v8/internal/once.go
  39. 0 126
      vendor/github.com/go-redis/redis/v8/internal/pool/conn.go
  40. 0 517
      vendor/github.com/go-redis/redis/v8/internal/pool/pool.go
  41. 0 208
      vendor/github.com/go-redis/redis/v8/internal/pool/pool_single.go
  42. 0 112
      vendor/github.com/go-redis/redis/v8/internal/pool/pool_sticky.go
  43. 0 314
      vendor/github.com/go-redis/redis/v8/internal/proto/reader.go
  44. 0 166
      vendor/github.com/go-redis/redis/v8/internal/proto/scan.go
  45. 0 152
      vendor/github.com/go-redis/redis/v8/internal/proto/writer.go
  46. 0 11
      vendor/github.com/go-redis/redis/v8/internal/safe.go
  47. 0 20
      vendor/github.com/go-redis/redis/v8/internal/unsafe.go
  48. 0 145
      vendor/github.com/go-redis/redis/v8/internal/util.go
  49. 0 11
      vendor/github.com/go-redis/redis/v8/internal/util/safe.go
  50. 0 19
      vendor/github.com/go-redis/redis/v8/internal/util/strconv.go
  51. 0 22
      vendor/github.com/go-redis/redis/v8/internal/util/unsafe.go
  52. 0 76
      vendor/github.com/go-redis/redis/v8/iterator.go
  53. 0 258
      vendor/github.com/go-redis/redis/v8/options.go
  54. 0 137
      vendor/github.com/go-redis/redis/v8/pipeline.go
  55. 0 603
      vendor/github.com/go-redis/redis/v8/pubsub.go
  56. 0 765
      vendor/github.com/go-redis/redis/v8/redis.go
  57. 0 180
      vendor/github.com/go-redis/redis/v8/result.go
  58. 0 729
      vendor/github.com/go-redis/redis/v8/ring.go
  59. 0 63
      vendor/github.com/go-redis/redis/v8/script.go
  60. 0 506
      vendor/github.com/go-redis/redis/v8/sentinel.go
  61. 0 151
      vendor/github.com/go-redis/redis/v8/tx.go
  62. 0 201
      vendor/github.com/go-redis/redis/v8/universal.go
  63. 0 201
      vendor/go.opentelemetry.io/otel/LICENSE
  64. 0 172
      vendor/go.opentelemetry.io/otel/api/correlation/context.go
  65. 0 112
      vendor/go.opentelemetry.io/otel/api/correlation/correlation_context_propagator.go
  66. 0 19
      vendor/go.opentelemetry.io/otel/api/correlation/doc.go
  67. 0 179
      vendor/go.opentelemetry.io/otel/api/correlation/map.go
  68. 0 83
      vendor/go.opentelemetry.io/otel/api/global/global.go
  69. 0 339
      vendor/go.opentelemetry.io/otel/api/global/internal/meter.go
  70. 0 140
      vendor/go.opentelemetry.io/otel/api/global/internal/state.go
  71. 0 132
      vendor/go.opentelemetry.io/otel/api/global/internal/trace.go
  72. 0 91
      vendor/go.opentelemetry.io/otel/api/internal/rawhelpers.go
  73. 0 16
      vendor/go.opentelemetry.io/otel/api/kv/doc.go
  74. 0 160
      vendor/go.opentelemetry.io/otel/api/kv/key.go
  75. 0 134
      vendor/go.opentelemetry.io/otel/api/kv/kv.go
  76. 0 31
      vendor/go.opentelemetry.io/otel/api/kv/value/type_string.go
  77. 0 244
      vendor/go.opentelemetry.io/otel/api/kv/value/value.go
  78. 0 217
      vendor/go.opentelemetry.io/otel/api/metric/async.go
  79. 0 84
      vendor/go.opentelemetry.io/otel/api/metric/config.go
  80. 0 95
      vendor/go.opentelemetry.io/otel/api/metric/counter.go
  81. 0 71
      vendor/go.opentelemetry.io/otel/api/metric/descriptor.go
  82. 0 49
      vendor/go.opentelemetry.io/otel/api/metric/doc.go
  83. 0 37
      vendor/go.opentelemetry.io/otel/api/metric/kind.go
  84. 0 28
      vendor/go.opentelemetry.io/otel/api/metric/kind_string.go
  85. 0 314
      vendor/go.opentelemetry.io/otel/api/metric/meter.go
  86. 0 222
      vendor/go.opentelemetry.io/otel/api/metric/must.go
  87. 0 58
      vendor/go.opentelemetry.io/otel/api/metric/noop.go
  88. 0 648
      vendor/go.opentelemetry.io/otel/api/metric/number.go
  89. 0 25
      vendor/go.opentelemetry.io/otel/api/metric/numberkind_string.go
  90. 0 124
      vendor/go.opentelemetry.io/otel/api/metric/observer.go
  91. 0 167
      vendor/go.opentelemetry.io/otel/api/metric/registry/registry.go
  92. 0 93
      vendor/go.opentelemetry.io/otel/api/metric/sdkapi.go
  93. 0 193
      vendor/go.opentelemetry.io/otel/api/metric/sync.go
  94. 0 96
      vendor/go.opentelemetry.io/otel/api/metric/updowncounter.go
  95. 0 97
      vendor/go.opentelemetry.io/otel/api/metric/valuerecorder.go
  96. 0 16
      vendor/go.opentelemetry.io/otel/api/propagation/doc.go
  97. 0 143
      vendor/go.opentelemetry.io/otel/api/propagation/propagation.go
  98. 0 55
      vendor/go.opentelemetry.io/otel/api/trace/always_off_sampler.go
  99. 0 55
      vendor/go.opentelemetry.io/otel/api/trace/always_on_sampler.go
  100. 0 0
      vendor/go.opentelemetry.io/otel/api/trace/api.go

+ 1 - 1
go.mod

@@ -6,7 +6,7 @@ require (
 	git.finogeeks.club/monitor/go-client v0.0.0-20171124095506-52407144eb4a
 	github.com/FZambia/sentinel v1.1.0
 	github.com/gin-gonic/gin v1.5.0
-	github.com/go-redis/redis/v8 v8.0.0-beta.5
+	github.com/go-redis/redis/v8 v8.0.0-beta.5 // indirect
 	github.com/gomodule/redigo v2.0.0+incompatible
 	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
 	github.com/modern-go/reflect2 v1.0.1 // indirect

+ 6 - 0
handler/article.go

@@ -51,3 +51,9 @@ func GetArticles(c *gin.Context) {
 	fmt.Printf("Indexed user %s to index %s, type %s\n", put1.Id, put1.Index, put1.Type)
 	c.JSON(http.StatusOK, gin.H{"name": "wangkang"})
 }
+
+func Test(c *gin.Context){
+	model.RedisSet("test_2222222222","OK")
+	model.RedisGet("test_2222222222")
+	c.JSON(http.StatusOK, gin.H{"name": "wangkang"})
+}

+ 6 - 8
main.go

@@ -2,18 +2,16 @@ package main
 
 import (
 	"github.com/gin-gonic/gin"
-	"time"
-	"web_test_cgi/model"
 	"web_test_cgi/router"
 )
 
 func main() {
-	for {
-		k := "test_222222222222"
-		model.RedisSet(k,"OK")
-		model.RedisGet(k)
-		time.Sleep(time.Second * 1)
-	}
+	//for {
+	//	k := "test_222222222222"
+	//	model.RedisSet(k,"OK")
+	//	model.RedisGet(k)
+	//	time.Sleep(time.Second * 1)
+	//}
 	gin.SetMode("debug")
 	// 使用Default 里面已经包含了 log 和 recovery
 	// todo log 中间件可以考虑替换

+ 20 - 4
model/redis.go

@@ -1,6 +1,5 @@
 package model
 
-
 import (
 	"errors"
 	"fmt"
@@ -79,9 +78,11 @@ func (m *MasterPool)Update(newAddr string) {
 	if m.Addr() == newAddr{
 		return
 	}
+	fmt.Println("need to update MasterPool addr:",newAddr)
 	m.mu.Lock()
 	defer m.mu.Unlock()
 	m.pool = NewRedisPool(newAddr,"master")
+	m.addr = newAddr
 }
 
 
@@ -132,9 +133,11 @@ func NewSlavePoolRoom(addrList []string) *SlavePoolRoom{
 }
 
 func (s *SlavePoolRoom) get()*SlavePool{
+	fmt.Println("pool list:",s.poolList)
 	if s.nowIndex >= s.len{
 		s.nowIndex = 0
 	}
+	fmt.Println("pool index:",s.nowIndex)
 	pool := s.poolList[s.nowIndex]
 	s.nowIndex++
 	return pool
@@ -147,8 +150,17 @@ func (s *SlavePoolRoom)GetConn()redis.Conn{
 }
 
 func (s *SlavePoolRoom) Check(validAddr []string) bool{
+	if uint8(len(validAddr)) != s.len{
+		return false
+	}
 	for _,addr :=range validAddr {
-		if !s.existAddr(addr){
+		found := false
+		for _,pool := range s.poolList{
+			if pool.Addr() == addr{
+				found = true
+			}
+		}
+		if !found{
 			return false
 		}
 	}
@@ -168,6 +180,7 @@ func (s *SlavePoolRoom) Update(validAddr []string) error {
 	if s.Check(validAddr){
 		return nil
 	}
+	fmt.Println("SlavePoolRoom need update:",validAddr)
 	s.mu.Lock()
 	defer s.mu.Unlock()
 	newPoolList := make([]*SlavePool,0)
@@ -204,7 +217,8 @@ func checkAddrCron(){
 
 func newSentinelClient() *sentinel.Sentinel {
 	return &sentinel.Sentinel{
-		Addrs: []string{"redis://redis-cluster-redis-cluster-sentinel.redis-cluster:26379/"},
+		//Addrs: []string{"redis://redis-cluster-redis-cluster-sentinel.redis-cluster:26379/"},
+		Addrs: []string{"redis://106.13.49.158:26379"},
 		MasterName: "mymaster",
 		Dial: func(addr string) (redis.Conn, error) {
 			fmt.Println("sentinel addr:",addr)
@@ -264,13 +278,15 @@ func NewSlavePool(sen *sentinel.Sentinel) []*redis.Pool{
 
 func NewRedisPool(addr string,role string) *redis.Pool{
 	fmt.Println("NewPool addr:",addr)
+	//addr = "106.13.49.158" + ":" +strings.Split(addr,":")[1] //test
 	return &redis.Pool{
 		MaxIdle:     3,
 		MaxActive:   64,
 		Wait:        true,
 		IdleTimeout: 240 * time.Second,
 		Dial: func() (redis.Conn, error) {
-			c, err := redis.Dial("tcp",addr)
+			option := redis.DialPassword("5IV4V!fktYMKLVz")
+			c, err := redis.Dial("tcp",addr,option)
 			if err != nil {
 				fmt.Println("NewPool err:",err.Error())
 				return nil, err

+ 1 - 0
router/router.go

@@ -25,6 +25,7 @@ func Load(g *gin.Engine) *gin.Engine {
 	articleGroup := g.Group("/web_test_cgi")
 	{
 		articleGroup.GET("/user_info", handler.GetArticles)
+		articleGroup.GET("/ping",handler.Test)
 		//articleGroup.POST("/article", handler.AddArticle)
 	}
 

+ 0 - 22
vendor/github.com/cespare/xxhash/LICENSE.txt

@@ -1,22 +0,0 @@
-Copyright (c) 2016 Caleb Spare
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 0 - 50
vendor/github.com/cespare/xxhash/README.md

@@ -1,50 +0,0 @@
-# xxhash
-
-[![GoDoc](https://godoc.org/github.com/cespare/xxhash?status.svg)](https://godoc.org/github.com/cespare/xxhash)
-
-xxhash is a Go implementation of the 64-bit
-[xxHash](http://cyan4973.github.io/xxHash/) algorithm, XXH64. This is a
-high-quality hashing algorithm that is much faster than anything in the Go
-standard library.
-
-The API is very small, taking its cue from the other hashing packages in the
-standard library:
-
-    $ go doc github.com/cespare/xxhash                                                                                                                                                                                              !
-    package xxhash // import "github.com/cespare/xxhash"
-
-    Package xxhash implements the 64-bit variant of xxHash (XXH64) as described
-    at http://cyan4973.github.io/xxHash/.
-
-    func New() hash.Hash64
-    func Sum64(b []byte) uint64
-    func Sum64String(s string) uint64
-
-This implementation provides a fast pure-Go implementation and an even faster
-assembly implementation for amd64.
-
-## Benchmarks
-
-Here are some quick benchmarks comparing the pure-Go and assembly
-implementations of Sum64 against another popular Go XXH64 implementation,
-[github.com/OneOfOne/xxhash](https://github.com/OneOfOne/xxhash):
-
-| input size | OneOfOne | cespare (purego) | cespare |
-| --- | --- | --- | --- |
-| 5 B   |  416 MB/s | 720 MB/s |  872 MB/s  |
-| 100 B | 3980 MB/s | 5013 MB/s | 5252 MB/s  |
-| 4 KB  | 12727 MB/s | 12999 MB/s | 13026 MB/s |
-| 10 MB | 9879 MB/s | 10775 MB/s | 10913 MB/s  |
-
-These numbers were generated with:
-
-```
-$ go test -benchtime 10s -bench '/OneOfOne,'
-$ go test -tags purego -benchtime 10s -bench '/xxhash,'
-$ go test -benchtime 10s -bench '/xxhash,'
-```
-
-## Projects using this package
-
-- [InfluxDB](https://github.com/influxdata/influxdb)
-- [Prometheus](https://github.com/prometheus/prometheus)

+ 0 - 6
vendor/github.com/cespare/xxhash/go.mod

@@ -1,6 +0,0 @@
-module github.com/cespare/xxhash
-
-require (
-	github.com/OneOfOne/xxhash v1.2.2
-	github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72
-)

+ 0 - 4
vendor/github.com/cespare/xxhash/go.sum

@@ -1,4 +0,0 @@
-github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
-github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
-github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=
-github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=

+ 0 - 14
vendor/github.com/cespare/xxhash/rotate.go

@@ -1,14 +0,0 @@
-// +build !go1.9
-
-package xxhash
-
-// TODO(caleb): After Go 1.10 comes out, remove this fallback code.
-
-func rol1(x uint64) uint64  { return (x << 1) | (x >> (64 - 1)) }
-func rol7(x uint64) uint64  { return (x << 7) | (x >> (64 - 7)) }
-func rol11(x uint64) uint64 { return (x << 11) | (x >> (64 - 11)) }
-func rol12(x uint64) uint64 { return (x << 12) | (x >> (64 - 12)) }
-func rol18(x uint64) uint64 { return (x << 18) | (x >> (64 - 18)) }
-func rol23(x uint64) uint64 { return (x << 23) | (x >> (64 - 23)) }
-func rol27(x uint64) uint64 { return (x << 27) | (x >> (64 - 27)) }
-func rol31(x uint64) uint64 { return (x << 31) | (x >> (64 - 31)) }

+ 0 - 14
vendor/github.com/cespare/xxhash/rotate19.go

@@ -1,14 +0,0 @@
-// +build go1.9
-
-package xxhash
-
-import "math/bits"
-
-func rol1(x uint64) uint64  { return bits.RotateLeft64(x, 1) }
-func rol7(x uint64) uint64  { return bits.RotateLeft64(x, 7) }
-func rol11(x uint64) uint64 { return bits.RotateLeft64(x, 11) }
-func rol12(x uint64) uint64 { return bits.RotateLeft64(x, 12) }
-func rol18(x uint64) uint64 { return bits.RotateLeft64(x, 18) }
-func rol23(x uint64) uint64 { return bits.RotateLeft64(x, 23) }
-func rol27(x uint64) uint64 { return bits.RotateLeft64(x, 27) }
-func rol31(x uint64) uint64 { return bits.RotateLeft64(x, 31) }

+ 0 - 168
vendor/github.com/cespare/xxhash/xxhash.go

@@ -1,168 +0,0 @@
-// Package xxhash implements the 64-bit variant of xxHash (XXH64) as described
-// at http://cyan4973.github.io/xxHash/.
-package xxhash
-
-import (
-	"encoding/binary"
-	"hash"
-)
-
-const (
-	prime1 uint64 = 11400714785074694791
-	prime2 uint64 = 14029467366897019727
-	prime3 uint64 = 1609587929392839161
-	prime4 uint64 = 9650029242287828579
-	prime5 uint64 = 2870177450012600261
-)
-
-// NOTE(caleb): I'm using both consts and vars of the primes. Using consts where
-// possible in the Go code is worth a small (but measurable) performance boost
-// by avoiding some MOVQs. Vars are needed for the asm and also are useful for
-// convenience in the Go code in a few places where we need to intentionally
-// avoid constant arithmetic (e.g., v1 := prime1 + prime2 fails because the
-// result overflows a uint64).
-var (
-	prime1v = prime1
-	prime2v = prime2
-	prime3v = prime3
-	prime4v = prime4
-	prime5v = prime5
-)
-
-type xxh struct {
-	v1    uint64
-	v2    uint64
-	v3    uint64
-	v4    uint64
-	total int
-	mem   [32]byte
-	n     int // how much of mem is used
-}
-
-// New creates a new hash.Hash64 that implements the 64-bit xxHash algorithm.
-func New() hash.Hash64 {
-	var x xxh
-	x.Reset()
-	return &x
-}
-
-func (x *xxh) Reset() {
-	x.n = 0
-	x.total = 0
-	x.v1 = prime1v + prime2
-	x.v2 = prime2
-	x.v3 = 0
-	x.v4 = -prime1v
-}
-
-func (x *xxh) Size() int      { return 8 }
-func (x *xxh) BlockSize() int { return 32 }
-
-// Write adds more data to x. It always returns len(b), nil.
-func (x *xxh) Write(b []byte) (n int, err error) {
-	n = len(b)
-	x.total += len(b)
-
-	if x.n+len(b) < 32 {
-		// This new data doesn't even fill the current block.
-		copy(x.mem[x.n:], b)
-		x.n += len(b)
-		return
-	}
-
-	if x.n > 0 {
-		// Finish off the partial block.
-		copy(x.mem[x.n:], b)
-		x.v1 = round(x.v1, u64(x.mem[0:8]))
-		x.v2 = round(x.v2, u64(x.mem[8:16]))
-		x.v3 = round(x.v3, u64(x.mem[16:24]))
-		x.v4 = round(x.v4, u64(x.mem[24:32]))
-		b = b[32-x.n:]
-		x.n = 0
-	}
-
-	if len(b) >= 32 {
-		// One or more full blocks left.
-		b = writeBlocks(x, b)
-	}
-
-	// Store any remaining partial block.
-	copy(x.mem[:], b)
-	x.n = len(b)
-
-	return
-}
-
-func (x *xxh) Sum(b []byte) []byte {
-	s := x.Sum64()
-	return append(
-		b,
-		byte(s>>56),
-		byte(s>>48),
-		byte(s>>40),
-		byte(s>>32),
-		byte(s>>24),
-		byte(s>>16),
-		byte(s>>8),
-		byte(s),
-	)
-}
-
-func (x *xxh) Sum64() uint64 {
-	var h uint64
-
-	if x.total >= 32 {
-		v1, v2, v3, v4 := x.v1, x.v2, x.v3, x.v4
-		h = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4)
-		h = mergeRound(h, v1)
-		h = mergeRound(h, v2)
-		h = mergeRound(h, v3)
-		h = mergeRound(h, v4)
-	} else {
-		h = x.v3 + prime5
-	}
-
-	h += uint64(x.total)
-
-	i, end := 0, x.n
-	for ; i+8 <= end; i += 8 {
-		k1 := round(0, u64(x.mem[i:i+8]))
-		h ^= k1
-		h = rol27(h)*prime1 + prime4
-	}
-	if i+4 <= end {
-		h ^= uint64(u32(x.mem[i:i+4])) * prime1
-		h = rol23(h)*prime2 + prime3
-		i += 4
-	}
-	for i < end {
-		h ^= uint64(x.mem[i]) * prime5
-		h = rol11(h) * prime1
-		i++
-	}
-
-	h ^= h >> 33
-	h *= prime2
-	h ^= h >> 29
-	h *= prime3
-	h ^= h >> 32
-
-	return h
-}
-
-func u64(b []byte) uint64 { return binary.LittleEndian.Uint64(b) }
-func u32(b []byte) uint32 { return binary.LittleEndian.Uint32(b) }
-
-func round(acc, input uint64) uint64 {
-	acc += input * prime2
-	acc = rol31(acc)
-	acc *= prime1
-	return acc
-}
-
-func mergeRound(acc, val uint64) uint64 {
-	val = round(0, val)
-	acc ^= val
-	acc = acc*prime1 + prime4
-	return acc
-}

+ 0 - 12
vendor/github.com/cespare/xxhash/xxhash_amd64.go

@@ -1,12 +0,0 @@
-// +build !appengine
-// +build gc
-// +build !purego
-
-package xxhash
-
-// Sum64 computes the 64-bit xxHash digest of b.
-//
-//go:noescape
-func Sum64(b []byte) uint64
-
-func writeBlocks(x *xxh, b []byte) []byte

+ 0 - 233
vendor/github.com/cespare/xxhash/xxhash_amd64.s

@@ -1,233 +0,0 @@
-// +build !appengine
-// +build gc
-// +build !purego
-
-#include "textflag.h"
-
-// Register allocation:
-// AX	h
-// CX	pointer to advance through b
-// DX	n
-// BX	loop end
-// R8	v1, k1
-// R9	v2
-// R10	v3
-// R11	v4
-// R12	tmp
-// R13	prime1v
-// R14	prime2v
-// R15	prime4v
-
-// round reads from and advances the buffer pointer in CX.
-// It assumes that R13 has prime1v and R14 has prime2v.
-#define round(r) \
-	MOVQ  (CX), R12 \
-	ADDQ  $8, CX    \
-	IMULQ R14, R12  \
-	ADDQ  R12, r    \
-	ROLQ  $31, r    \
-	IMULQ R13, r
-
-// mergeRound applies a merge round on the two registers acc and val.
-// It assumes that R13 has prime1v, R14 has prime2v, and R15 has prime4v.
-#define mergeRound(acc, val) \
-	IMULQ R14, val \
-	ROLQ  $31, val \
-	IMULQ R13, val \
-	XORQ  val, acc \
-	IMULQ R13, acc \
-	ADDQ  R15, acc
-
-// func Sum64(b []byte) uint64
-TEXT ·Sum64(SB), NOSPLIT, $0-32
-	// Load fixed primes.
-	MOVQ ·prime1v(SB), R13
-	MOVQ ·prime2v(SB), R14
-	MOVQ ·prime4v(SB), R15
-
-	// Load slice.
-	MOVQ b_base+0(FP), CX
-	MOVQ b_len+8(FP), DX
-	LEAQ (CX)(DX*1), BX
-
-	// The first loop limit will be len(b)-32.
-	SUBQ $32, BX
-
-	// Check whether we have at least one block.
-	CMPQ DX, $32
-	JLT  noBlocks
-
-	// Set up initial state (v1, v2, v3, v4).
-	MOVQ R13, R8
-	ADDQ R14, R8
-	MOVQ R14, R9
-	XORQ R10, R10
-	XORQ R11, R11
-	SUBQ R13, R11
-
-	// Loop until CX > BX.
-blockLoop:
-	round(R8)
-	round(R9)
-	round(R10)
-	round(R11)
-
-	CMPQ CX, BX
-	JLE  blockLoop
-
-	MOVQ R8, AX
-	ROLQ $1, AX
-	MOVQ R9, R12
-	ROLQ $7, R12
-	ADDQ R12, AX
-	MOVQ R10, R12
-	ROLQ $12, R12
-	ADDQ R12, AX
-	MOVQ R11, R12
-	ROLQ $18, R12
-	ADDQ R12, AX
-
-	mergeRound(AX, R8)
-	mergeRound(AX, R9)
-	mergeRound(AX, R10)
-	mergeRound(AX, R11)
-
-	JMP afterBlocks
-
-noBlocks:
-	MOVQ ·prime5v(SB), AX
-
-afterBlocks:
-	ADDQ DX, AX
-
-	// Right now BX has len(b)-32, and we want to loop until CX > len(b)-8.
-	ADDQ $24, BX
-
-	CMPQ CX, BX
-	JG   fourByte
-
-wordLoop:
-	// Calculate k1.
-	MOVQ  (CX), R8
-	ADDQ  $8, CX
-	IMULQ R14, R8
-	ROLQ  $31, R8
-	IMULQ R13, R8
-
-	XORQ  R8, AX
-	ROLQ  $27, AX
-	IMULQ R13, AX
-	ADDQ  R15, AX
-
-	CMPQ CX, BX
-	JLE  wordLoop
-
-fourByte:
-	ADDQ $4, BX
-	CMPQ CX, BX
-	JG   singles
-
-	MOVL  (CX), R8
-	ADDQ  $4, CX
-	IMULQ R13, R8
-	XORQ  R8, AX
-
-	ROLQ  $23, AX
-	IMULQ R14, AX
-	ADDQ  ·prime3v(SB), AX
-
-singles:
-	ADDQ $4, BX
-	CMPQ CX, BX
-	JGE  finalize
-
-singlesLoop:
-	MOVBQZX (CX), R12
-	ADDQ    $1, CX
-	IMULQ   ·prime5v(SB), R12
-	XORQ    R12, AX
-
-	ROLQ  $11, AX
-	IMULQ R13, AX
-
-	CMPQ CX, BX
-	JL   singlesLoop
-
-finalize:
-	MOVQ  AX, R12
-	SHRQ  $33, R12
-	XORQ  R12, AX
-	IMULQ R14, AX
-	MOVQ  AX, R12
-	SHRQ  $29, R12
-	XORQ  R12, AX
-	IMULQ ·prime3v(SB), AX
-	MOVQ  AX, R12
-	SHRQ  $32, R12
-	XORQ  R12, AX
-
-	MOVQ AX, ret+24(FP)
-	RET
-
-// writeBlocks uses the same registers as above except that it uses AX to store
-// the x pointer.
-
-// func writeBlocks(x *xxh, b []byte) []byte
-TEXT ·writeBlocks(SB), NOSPLIT, $0-56
-	// Load fixed primes needed for round.
-	MOVQ ·prime1v(SB), R13
-	MOVQ ·prime2v(SB), R14
-
-	// Load slice.
-	MOVQ b_base+8(FP), CX
-	MOVQ CX, ret_base+32(FP) // initialize return base pointer; see NOTE below
-	MOVQ b_len+16(FP), DX
-	LEAQ (CX)(DX*1), BX
-	SUBQ $32, BX
-
-	// Load vN from x.
-	MOVQ x+0(FP), AX
-	MOVQ 0(AX), R8   // v1
-	MOVQ 8(AX), R9   // v2
-	MOVQ 16(AX), R10 // v3
-	MOVQ 24(AX), R11 // v4
-
-	// We don't need to check the loop condition here; this function is
-	// always called with at least one block of data to process.
-blockLoop:
-	round(R8)
-	round(R9)
-	round(R10)
-	round(R11)
-
-	CMPQ CX, BX
-	JLE  blockLoop
-
-	// Copy vN back to x.
-	MOVQ R8, 0(AX)
-	MOVQ R9, 8(AX)
-	MOVQ R10, 16(AX)
-	MOVQ R11, 24(AX)
-
-	// Construct return slice.
-	// NOTE: It's important that we don't construct a slice that has a base
-	// pointer off the end of the original slice, as in Go 1.7+ this will
-	// cause runtime crashes. (See discussion in, for example,
-	// https://github.com/golang/go/issues/16772.)
-	// Therefore, we calculate the length/cap first, and if they're zero, we
-	// keep the old base. This is what the compiler does as well if you
-	// write code like
-	//   b = b[len(b):]
-
-	// New length is 32 - (CX - BX) -> BX+32 - CX.
-	ADDQ $32, BX
-	SUBQ CX, BX
-	JZ   afterSetBase
-
-	MOVQ CX, ret_base+32(FP)
-
-afterSetBase:
-	MOVQ BX, ret_len+40(FP)
-	MOVQ BX, ret_cap+48(FP) // set cap == len
-
-	RET

+ 0 - 75
vendor/github.com/cespare/xxhash/xxhash_other.go

@@ -1,75 +0,0 @@
-// +build !amd64 appengine !gc purego
-
-package xxhash
-
-// Sum64 computes the 64-bit xxHash digest of b.
-func Sum64(b []byte) uint64 {
-	// A simpler version would be
-	//   x := New()
-	//   x.Write(b)
-	//   return x.Sum64()
-	// but this is faster, particularly for small inputs.
-
-	n := len(b)
-	var h uint64
-
-	if n >= 32 {
-		v1 := prime1v + prime2
-		v2 := prime2
-		v3 := uint64(0)
-		v4 := -prime1v
-		for len(b) >= 32 {
-			v1 = round(v1, u64(b[0:8:len(b)]))
-			v2 = round(v2, u64(b[8:16:len(b)]))
-			v3 = round(v3, u64(b[16:24:len(b)]))
-			v4 = round(v4, u64(b[24:32:len(b)]))
-			b = b[32:len(b):len(b)]
-		}
-		h = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4)
-		h = mergeRound(h, v1)
-		h = mergeRound(h, v2)
-		h = mergeRound(h, v3)
-		h = mergeRound(h, v4)
-	} else {
-		h = prime5
-	}
-
-	h += uint64(n)
-
-	i, end := 0, len(b)
-	for ; i+8 <= end; i += 8 {
-		k1 := round(0, u64(b[i:i+8:len(b)]))
-		h ^= k1
-		h = rol27(h)*prime1 + prime4
-	}
-	if i+4 <= end {
-		h ^= uint64(u32(b[i:i+4:len(b)])) * prime1
-		h = rol23(h)*prime2 + prime3
-		i += 4
-	}
-	for ; i < end; i++ {
-		h ^= uint64(b[i]) * prime5
-		h = rol11(h) * prime1
-	}
-
-	h ^= h >> 33
-	h *= prime2
-	h ^= h >> 29
-	h *= prime3
-	h ^= h >> 32
-
-	return h
-}
-
-func writeBlocks(x *xxh, b []byte) []byte {
-	v1, v2, v3, v4 := x.v1, x.v2, x.v3, x.v4
-	for len(b) >= 32 {
-		v1 = round(v1, u64(b[0:8:len(b)]))
-		v2 = round(v2, u64(b[8:16:len(b)]))
-		v3 = round(v3, u64(b[16:24:len(b)]))
-		v4 = round(v4, u64(b[24:32:len(b)]))
-		b = b[32:len(b):len(b)]
-	}
-	x.v1, x.v2, x.v3, x.v4 = v1, v2, v3, v4
-	return b
-}

+ 0 - 10
vendor/github.com/cespare/xxhash/xxhash_safe.go

@@ -1,10 +0,0 @@
-// +build appengine
-
-// This file contains the safe implementations of otherwise unsafe-using code.
-
-package xxhash
-
-// Sum64String computes the 64-bit xxHash digest of s.
-func Sum64String(s string) uint64 {
-	return Sum64([]byte(s))
-}

+ 0 - 30
vendor/github.com/cespare/xxhash/xxhash_unsafe.go

@@ -1,30 +0,0 @@
-// +build !appengine
-
-// This file encapsulates usage of unsafe.
-// xxhash_safe.go contains the safe implementations.
-
-package xxhash
-
-import (
-	"reflect"
-	"unsafe"
-)
-
-// Sum64String computes the 64-bit xxHash digest of s.
-// It may be faster than Sum64([]byte(s)) by avoiding a copy.
-//
-// TODO(caleb): Consider removing this if an optimization is ever added to make
-// it unnecessary: https://golang.org/issue/2205.
-//
-// TODO(caleb): We still have a function call; we could instead write Go/asm
-// copies of Sum64 for strings to squeeze out a bit more speed.
-func Sum64String(s string) uint64 {
-	// See https://groups.google.com/d/msg/golang-nuts/dcjzJy-bSpw/tcZYBzQqAQAJ
-	// for some discussion about this unsafe conversion.
-	var b []byte
-	bh := (*reflect.SliceHeader)(unsafe.Pointer(&b))
-	bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data
-	bh.Len = len(s)
-	bh.Cap = len(s)
-	return Sum64(b)
-}

+ 0 - 79
vendor/github.com/dgryski/go-rendezvous/rdv.go

@@ -1,79 +0,0 @@
-package rendezvous
-
-type Rendezvous struct {
-	nodes map[string]int
-	nstr  []string
-	nhash []uint64
-	hash  Hasher
-}
-
-type Hasher func(s string) uint64
-
-func New(nodes []string, hash Hasher) *Rendezvous {
-	r := &Rendezvous{
-		nodes: make(map[string]int, len(nodes)),
-		nstr:  make([]string, len(nodes)),
-		nhash: make([]uint64, len(nodes)),
-		hash:  hash,
-	}
-
-	for i, n := range nodes {
-		r.nodes[n] = i
-		r.nstr[i] = n
-		r.nhash[i] = hash(n)
-	}
-
-	return r
-}
-
-func (r *Rendezvous) Lookup(k string) string {
-	// short-circuit if we're empty
-	if len(r.nodes) == 0 {
-		return ""
-	}
-
-	khash := r.hash(k)
-
-	var midx int
-	var mhash = xorshiftMult64(khash ^ r.nhash[0])
-
-	for i, nhash := range r.nhash[1:] {
-		if h := xorshiftMult64(khash ^ nhash); h > mhash {
-			midx = i + 1
-			mhash = h
-		}
-	}
-
-	return r.nstr[midx]
-}
-
-func (r *Rendezvous) Add(node string) {
-	r.nodes[node] = len(r.nstr)
-	r.nstr = append(r.nstr, node)
-	r.nhash = append(r.nhash, r.hash(node))
-}
-
-func (r *Rendezvous) Remove(node string) {
-	// find index of node to remove
-	nidx := r.nodes[node]
-
-	// remove from the slices
-	l := len(r.nstr)
-	r.nstr[nidx] = r.nstr[l]
-	r.nstr = r.nstr[:l]
-
-	r.nhash[nidx] = r.nhash[l]
-	r.nhash = r.nhash[:l]
-
-	// update the map
-	delete(r.nodes, node)
-	moved := r.nstr[nidx]
-	r.nodes[moved] = nidx
-}
-
-func xorshiftMult64(x uint64) uint64 {
-	x ^= x >> 12 // a
-	x ^= x << 25 // b
-	x ^= x >> 27 // c
-	return x * 2685821657736338717
-}

+ 0 - 2
vendor/github.com/go-redis/redis/v8/.gitignore

@@ -1,2 +0,0 @@
-*.rdb
-testdata/*/

+ 0 - 15
vendor/github.com/go-redis/redis/v8/.golangci.yml

@@ -1,15 +0,0 @@
-run:
-  concurrency: 8
-  deadline: 5m
-  tests: false
-linters:
-  enable-all: true
-  disable:
-    - funlen
-    - gochecknoglobals
-    - gocognit
-    - goconst
-    - godox
-    - gosec
-    - maligned
-    - wsl

+ 0 - 4
vendor/github.com/go-redis/redis/v8/.prettierrc

@@ -1,4 +0,0 @@
-semi: false
-singleQuote: true
-proseWrap: always
-printWidth: 100

+ 0 - 23
vendor/github.com/go-redis/redis/v8/.travis.yml

@@ -1,23 +0,0 @@
-dist: xenial
-language: go
-
-services:
-  - redis-server
-
-go:
-  - 1.12.x
-  - 1.13.x
-  - 1.14.x
-  - tip
-
-matrix:
-  allow_failures:
-    - go: tip
-
-env:
-  - GO111MODULE=on
-
-go_import_path: github.com/go-redis/redis
-
-before_install:
-  - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0

+ 0 - 83
vendor/github.com/go-redis/redis/v8/CHANGELOG.md

@@ -1,83 +0,0 @@
-# Changelog
-
-## v8 (unreleased)
-
-- All commands require `context.Context` as a first argument, e.g. `rdb.Ping(ctx)`. If you are not
-  using `context.Context` yet, the simplest option is to define package variable
-  `var ctx = context.TODO()` and use it when `ctx` is expected.
-- Ring uses Rendezvous Hashing by default which provides better distribution. This means that
-  existing keys must be moved to a new location or key will be inaccessible / lost. To use old
-  hashing scheme:
-- `Cluster.ForEachNode` is renamed to `ForEachShard` for consistency with `Ring`.
-
-```go
-import "github.com/golang/groupcache/consistenthash"
-
-ring := redis.NewRing(&redis.RingOptions{
-    NewConsistentHash: func() {
-        return consistenthash.New(100, crc32.ChecksumIEEE)
-    },
-})
-```
-
-- Added `redisext.OpenTemetryHook` that adds
-  [Redis OpenTelemetry instrumentation](https://redis.uptrace.dev/tracing/).
-
-## v7.3
-
-- New option `Options.Username` which causes client to use `AuthACL`. Be aware if your connection
-  URL contains username.
-
-## v7.2
-
-- Existing `HMSet` is renamed to `HSet` and old deprecated `HMSet` is restored for Redis 3 users.
-
-## v7.1
-
-- Existing `Cmd.String` is renamed to `Cmd.Text`. New `Cmd.String` implements `fmt.Stringer`
-  interface.
-
-## v7
-
-- _Important_. Tx.Pipeline now returns a non-transactional pipeline. Use Tx.TxPipeline for a
-  transactional pipeline.
-- WrapProcess is replaced with more convenient AddHook that has access to context.Context.
-- WithContext now can not be used to create a shallow copy of the client.
-- New methods ProcessContext, DoContext, and ExecContext.
-- Client respects Context.Deadline when setting net.Conn deadline.
-- Client listens on Context.Done while waiting for a connection from the pool and returns an error
-  when context context is cancelled.
-- Add PubSub.ChannelWithSubscriptions that sends `*Subscription` in addition to `*Message` to allow
-  detecting reconnections.
-- `time.Time` is now marshalled in RFC3339 format. `rdb.Get("foo").Time()` helper is added to parse
-  the time.
-- `SetLimiter` is removed and added `Options.Limiter` instead.
-- `HMSet` is deprecated as of Redis v4.
-
-## v6.15
-
-- Cluster and Ring pipelines process commands for each node in its own goroutine.
-
-## 6.14
-
-- Added Options.MinIdleConns.
-- Added Options.MaxConnAge.
-- PoolStats.FreeConns is renamed to PoolStats.IdleConns.
-- Add Client.Do to simplify creating custom commands.
-- Add Cmd.String, Cmd.Int, Cmd.Int64, Cmd.Uint64, Cmd.Float64, and Cmd.Bool helpers.
-- Lower memory usage.
-
-## v6.13
-
-- Ring got new options called `HashReplicas` and `Hash`. It is recommended to set
-  `HashReplicas = 1000` for better keys distribution between shards.
-- Cluster client was optimized to use much less memory when reloading cluster state.
-- PubSub.ReceiveMessage is re-worked to not use ReceiveTimeout so it does not lose data when timeout
-  occurres. In most cases it is recommended to use PubSub.Channel instead.
-- Dialer.KeepAlive is set to 5 minutes by default.
-
-## v6.12
-
-- ClusterClient got new option called `ClusterSlots` which allows to build cluster of normal Redis
-  Servers that don't have cluster mode enabled. See
-  https://godoc.org/github.com/go-redis/redis#example-NewClusterClient--ManualSetup

+ 0 - 25
vendor/github.com/go-redis/redis/v8/LICENSE

@@ -1,25 +0,0 @@
-Copyright (c) 2013 The github.com/go-redis/redis Authors.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-   * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-   * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 0 - 20
vendor/github.com/go-redis/redis/v8/Makefile

@@ -1,20 +0,0 @@
-all: testdeps
-	go test ./...
-	go test ./... -short -race
-	go test ./... -run=NONE -bench=. -benchmem
-	env GOOS=linux GOARCH=386 go test ./...
-	golangci-lint run
-
-testdeps: testdata/redis/src/redis-server
-
-bench: testdeps
-	go test ./... -test.run=NONE -test.bench=. -test.benchmem
-
-.PHONY: all test testdeps bench
-
-testdata/redis:
-	mkdir -p $@
-	wget -qO- http://download.redis.io/redis-stable.tar.gz | tar xvz --strip-components=1 -C $@
-
-testdata/redis/src/redis-server: testdata/redis
-	cd $< && make all

+ 0 - 143
vendor/github.com/go-redis/redis/v8/README.md

@@ -1,143 +0,0 @@
-# Redis client for Golang
-
-[![Build Status](https://travis-ci.org/go-redis/redis.png?branch=master)](https://travis-ci.org/go-redis/redis)
-[![GoDoc](https://godoc.org/github.com/go-redis/redis?status.svg)](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc)
-
-- [Docs](https://redis.uptrace.dev)
-- [Reference](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc)
-- [Examples](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#pkg-examples)
-
-## Sponsors
-
-- [**Uptrace.dev** - distributed traces and metrics](https://uptrace.dev)
-
-## Ecosystem
-
-- [Redis Cache](https://github.com/go-redis/cache).
-- [Rate limiting](https://github.com/go-redis/redis_rate).
-- [Distributed Locks](https://github.com/bsm/redislock).
-
-## Features
-
-- Redis 3 commands except QUIT, MONITOR, SLOWLOG and SYNC.
-- Automatic connection pooling with
-  [circuit breaker](https://en.wikipedia.org/wiki/Circuit_breaker_design_pattern) support.
-- [Pub/Sub](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#PubSub).
-- [Transactions](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#example-Client-TxPipeline).
-- [Pipeline](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#example-Client-Pipeline) and
-  [TxPipeline](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#example-Client-TxPipeline).
-- [Scripting](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#Script).
-- [Timeouts](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#Options).
-- [Redis Sentinel](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#NewFailoverClient).
-- [Redis Cluster](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#NewClusterClient).
-- [Cluster of Redis Servers](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#example-NewClusterClient--ManualSetup)
-  without using cluster mode and Redis Sentinel.
-- [Ring](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#NewRing).
-- [Instrumentation](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#ex-package--Instrumentation).
-
-API docs: https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc. Examples:
-https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#pkg-examples.
-
-## Installation
-
-go-redis requires a Go version with [Modules](https://github.com/golang/go/wiki/Modules) support and
-uses import versioning. So please make sure to initialize a Go module before installing go-redis:
-
-```shell
-go mod init github.com/my/repo
-go get github.com/go-redis/redis/v8
-```
-
-Import:
-
-```go
-import "github.com/go-redis/redis/v8"
-```
-
-## Quickstart
-
-```go
-func ExampleNewClient() {
-    rdb := redis.NewClient(&redis.Options{
-        Addr:     "localhost:6379",
-        Password: "", // no password set
-        DB:       0,  // use default DB
-    })
-
-    pong, err := rdb.Ping(ctx).Result()
-    fmt.Println(pong, err)
-    // Output: PONG <nil>
-}
-
-func ExampleClient() {
-    rdb := redis.NewClient(&redis.Options{
-        Addr:     "localhost:6379",
-        Password: "", // no password set
-        DB:       0,  // use default DB
-    })
-    err := rdb.Set(ctx, "key", "value", 0).Err()
-    if err != nil {
-        panic(err)
-    }
-
-    val, err := rdb.Get(ctx, "key").Result()
-    if err != nil {
-        panic(err)
-    }
-    fmt.Println("key", val)
-
-    val2, err := rdb.Get(ctx, "key2").Result()
-    if err == redis.Nil {
-        fmt.Println("key2 does not exist")
-    } else if err != nil {
-        panic(err)
-    } else {
-        fmt.Println("key2", val2)
-    }
-    // Output: key value
-    // key2 does not exist
-}
-```
-
-## Howto
-
-Please go through [examples](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#pkg-examples)
-to get an idea how to use this package.
-
-## Look and feel
-
-Some corner cases:
-
-```go
-// SET key value EX 10 NX
-set, err := rdb.SetNX(ctx, "key", "value", 10*time.Second).Result()
-
-// SORT list LIMIT 0 2 ASC
-vals, err := rdb.Sort(ctx, "list", &redis.Sort{Offset: 0, Count: 2, Order: "ASC"}).Result()
-
-// ZRANGEBYSCORE zset -inf +inf WITHSCORES LIMIT 0 2
-vals, err := rdb.ZRangeByScoreWithScores(ctx, "zset", &redis.ZRangeBy{
-    Min: "-inf",
-    Max: "+inf",
-    Offset: 0,
-    Count: 2,
-}).Result()
-
-// ZINTERSTORE out 2 zset1 zset2 WEIGHTS 2 3 AGGREGATE SUM
-vals, err := rdb.ZInterStore(ctx, "out", &redis.ZStore{
-    Keys: []string{"zset1", "zset2"},
-    Weights: []int64{2, 3}
-}).Result()
-
-// EVAL "return {KEYS[1],ARGV[1]}" 1 "key" "hello"
-vals, err := rdb.Eval(ctx, "return {KEYS[1],ARGV[1]}", []string{"key"}, "hello").Result()
-
-// custom command
-res, err := rdb.Do(ctx, "set", "key", "value").Result()
-```
-
-## See also
-
-- [Golang PostgreSQL ORM](https://github.com/go-pg/pg)
-- [Golang msgpack](https://github.com/vmihailenco/msgpack)
-- [Golang message task queue](https://github.com/vmihailenco/taskq)

File diff suppressed because it is too large
+ 0 - 1674
vendor/github.com/go-redis/redis/v8/cluster.go


+ 0 - 25
vendor/github.com/go-redis/redis/v8/cluster_commands.go

@@ -1,25 +0,0 @@
-package redis
-
-import (
-	"context"
-	"sync/atomic"
-)
-
-func (c *ClusterClient) DBSize(ctx context.Context) *IntCmd {
-	cmd := NewIntCmd(ctx, "dbsize")
-	var size int64
-	err := c.ForEachMaster(ctx, func(ctx context.Context, master *Client) error {
-		n, err := master.DBSize(ctx).Result()
-		if err != nil {
-			return err
-		}
-		atomic.AddInt64(&size, n)
-		return nil
-	})
-	if err != nil {
-		cmd.SetErr(err)
-		return cmd
-	}
-	cmd.val = size
-	return cmd
-}

File diff suppressed because it is too large
+ 0 - 2163
vendor/github.com/go-redis/redis/v8/command.go


File diff suppressed because it is too large
+ 0 - 2671
vendor/github.com/go-redis/redis/v8/commands.go


+ 0 - 4
vendor/github.com/go-redis/redis/v8/doc.go

@@ -1,4 +0,0 @@
-/*
-Package redis implements a Redis client.
-*/
-package redis

+ 0 - 108
vendor/github.com/go-redis/redis/v8/error.go

@@ -1,108 +0,0 @@
-package redis
-
-import (
-	"context"
-	"io"
-	"net"
-	"strings"
-
-	"github.com/go-redis/redis/v8/internal/pool"
-	"github.com/go-redis/redis/v8/internal/proto"
-)
-
-var ErrClosed = pool.ErrClosed
-
-type Error interface {
-	error
-
-	// RedisError is a no-op function but
-	// serves to distinguish types that are Redis
-	// errors from ordinary errors: a type is a
-	// Redis error if it has a RedisError method.
-	RedisError()
-}
-
-var _ Error = proto.RedisError("")
-
-func isRetryableError(err error, retryTimeout bool) bool {
-	switch err {
-	case nil, context.Canceled, context.DeadlineExceeded:
-		return false
-	case io.EOF:
-		return true
-	}
-	if netErr, ok := err.(net.Error); ok {
-		if netErr.Timeout() {
-			return retryTimeout
-		}
-		return true
-	}
-
-	s := err.Error()
-	if s == "ERR max number of clients reached" {
-		return true
-	}
-	if strings.HasPrefix(s, "LOADING ") {
-		return true
-	}
-	if strings.HasPrefix(s, "READONLY ") {
-		return true
-	}
-	if strings.HasPrefix(s, "CLUSTERDOWN ") {
-		return true
-	}
-	return false
-}
-
-func isRedisError(err error) bool {
-	_, ok := err.(proto.RedisError)
-	return ok
-}
-
-func isBadConn(err error, allowTimeout bool) bool {
-	if err == nil {
-		return false
-	}
-	if isRedisError(err) {
-		// Close connections in read only state in case domain addr is used
-		// and domain resolves to a different Redis Server. See #790.
-		return isReadOnlyError(err)
-	}
-	if allowTimeout {
-		if netErr, ok := err.(net.Error); ok && netErr.Timeout() {
-			return false
-		}
-	}
-	return true
-}
-
-func isMovedError(err error) (moved bool, ask bool, addr string) {
-	if !isRedisError(err) {
-		return
-	}
-
-	s := err.Error()
-	switch {
-	case strings.HasPrefix(s, "MOVED "):
-		moved = true
-	case strings.HasPrefix(s, "ASK "):
-		ask = true
-	default:
-		return
-	}
-
-	ind := strings.LastIndex(s, " ")
-	if ind == -1 {
-		return false, false, ""
-	}
-	addr = s[ind+1:]
-	return
-}
-
-func isLoadingError(err error) bool {
-	return strings.HasPrefix(err.Error(), "LOADING ")
-}
-
-func isReadOnlyError(err error) bool {
-	return strings.HasPrefix(err.Error(), "READONLY ")
-}

+ 0 - 15
vendor/github.com/go-redis/redis/v8/go.mod

@@ -1,15 +0,0 @@
-module github.com/go-redis/redis/v8
-
-require (
-	github.com/cespare/xxhash v1.1.0
-	github.com/dgryski/go-rendezvous v0.0.0-20200609043717-5ab96a526299
-	github.com/onsi/ginkgo v1.10.1
-	github.com/onsi/gomega v1.7.0
-	go.opentelemetry.io/otel v0.6.0
-	golang.org/x/net v0.0.0-20190923162816-aa69164e4478 // indirect
-	golang.org/x/sys v0.0.0-20191010194322-b09406accb47 // indirect
-	golang.org/x/text v0.3.2 // indirect
-	google.golang.org/grpc v1.29.1 // indirect
-)
-
-go 1.11

+ 0 - 123
vendor/github.com/go-redis/redis/v8/go.sum

@@ -1,123 +0,0 @@
-cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs=
-github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60=
-github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
-github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
-github.com/benbjohnson/clock v1.0.0 h1:78Jk/r6m4wCi6sndMpty7A//t4dw/RW5fV4ZgDVfX1w=
-github.com/benbjohnson/clock v1.0.0/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=
-github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
-github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
-github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
-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/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/dgryski/go-rendezvous v0.0.0-20200609043717-5ab96a526299 h1:+A9j6ahTbTFQSn5bzjlflos/dMeJrQWbE4UNkpEMDV0=
-github.com/dgryski/go-rendezvous v0.0.0-20200609043717-5ab96a526299/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
-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/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
-github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
-github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
-github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
-github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I=
-github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
-github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
-github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
-github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
-github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo=
-github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
-github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
-github.com/opentracing/opentracing-go v1.1.1-0.20190913142402-a7454ce5950e/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
-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/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=
-github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-go.opentelemetry.io/otel v0.6.0 h1:+vkHm/XwJ7ekpISV2Ixew93gCrxTbuwTF5rSewnLLgw=
-go.opentelemetry.io/otel v0.6.0/go.mod h1:jzBIgIzK43Iu1BpDAXwqOd6UPsSAk+ewVZ5ofSXw4Ek=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-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-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-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 h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
-golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/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-20190923162816-aa69164e4478 h1:l5EDrHhldLYb3ZRHDUhXF7Om7MvYXnkV9/iQNo1lX6g=
-golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
-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-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs=
-golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/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-20191010194322-b09406accb47 h1:/XfQ9z7ib8eEJX2hdgFTZJ/ntt0swNk5oYBziWeTCvY=
-golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
-golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
-google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
-google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
-google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8=
-google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
-google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
-google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
-google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk=
-google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4=
-google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
-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/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
-gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
-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.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
-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.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo=
-gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

+ 0 - 77
vendor/github.com/go-redis/redis/v8/internal/hashtag/hashtag.go

@@ -1,77 +0,0 @@
-package hashtag
-
-import (
-	"math/rand"
-	"strings"
-)
-
-const slotNumber = 16384
-
-// CRC16 implementation according to CCITT standards.
-// Copyright 2001-2010 Georges Menie (www.menie.org)
-// Copyright 2013 The Go Authors. All rights reserved.
-// http://redis.io/topics/cluster-spec#appendix-a-crc16-reference-implementation-in-ansi-c
-var crc16tab = [256]uint16{
-	0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7,
-	0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef,
-	0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6,
-	0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de,
-	0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485,
-	0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d,
-	0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4,
-	0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc,
-	0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823,
-	0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b,
-	0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12,
-	0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a,
-	0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41,
-	0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49,
-	0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70,
-	0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78,
-	0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f,
-	0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067,
-	0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e,
-	0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256,
-	0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d,
-	0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
-	0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c,
-	0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634,
-	0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab,
-	0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3,
-	0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a,
-	0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92,
-	0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9,
-	0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1,
-	0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8,
-	0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0,
-}
-
-func Key(key string) string {
-	if s := strings.IndexByte(key, '{'); s > -1 {
-		if e := strings.IndexByte(key[s+1:], '}'); e > 0 {
-			return key[s+1 : s+e+1]
-		}
-	}
-	return key
-}
-
-func RandomSlot() int {
-	return rand.Intn(slotNumber)
-}
-
-// hashSlot returns a consistent slot number between 0 and 16383
-// for any given string key.
-func Slot(key string) int {
-	if key == "" {
-		return RandomSlot()
-	}
-	key = Key(key)
-	return int(crc16sum(key)) % slotNumber
-}
-
-func crc16sum(key string) (crc uint16) {
-	for i := 0; i < len(key); i++ {
-		crc = (crc << 8) ^ crc16tab[(byte(crc>>8)^key[i])&0x00ff]
-	}
-	return
-}

+ 0 - 24
vendor/github.com/go-redis/redis/v8/internal/internal.go

@@ -1,24 +0,0 @@
-package internal
-
-import (
-	"math/rand"
-	"time"
-)
-
-// Retry backoff with jitter sleep to prevent overloaded conditions during intervals
-// https://www.awsarchitectureblog.com/2015/03/backoff.html
-func RetryBackoff(retry int, minBackoff, maxBackoff time.Duration) time.Duration {
-	if retry < 0 {
-		retry = 0
-	}
-
-	backoff := minBackoff << uint(retry)
-	if backoff > maxBackoff || backoff < minBackoff {
-		backoff = maxBackoff
-	}
-
-	if backoff == 0 {
-		return 0
-	}
-	return time.Duration(rand.Int63n(int64(backoff)))
-}

+ 0 - 12
vendor/github.com/go-redis/redis/v8/internal/log.go

@@ -1,12 +0,0 @@
-package internal
-
-import (
-	"log"
-	"os"
-)
-
-type Logging interface {
-	Printf(format string, v ...interface{})
-}
-
-var Logger Logging = log.New(os.Stderr, "redis: ", log.LstdFlags|log.Lshortfile)

+ 0 - 60
vendor/github.com/go-redis/redis/v8/internal/once.go

@@ -1,60 +0,0 @@
-/*
-Copyright 2014 The Camlistore Authors
-
-Licensed 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 internal
-
-import (
-	"sync"
-	"sync/atomic"
-)
-
-// A Once will perform a successful action exactly once.
-//
-// Unlike a sync.Once, this Once's func returns an error
-// and is re-armed on failure.
-type Once struct {
-	m    sync.Mutex
-	done uint32
-}
-
-// Do calls the function f if and only if Do has not been invoked
-// without error for this instance of Once.  In other words, given
-// 	var once Once
-// if once.Do(f) is called multiple times, only the first call will
-// invoke f, even if f has a different value in each invocation unless
-// f returns an error.  A new instance of Once is required for each
-// function to execute.
-//
-// Do is intended for initialization that must be run exactly once.  Since f
-// is niladic, it may be necessary to use a function literal to capture the
-// arguments to a function to be invoked by Do:
-// 	err := config.once.Do(func() error { return config.init(filename) })
-func (o *Once) Do(f func() error) error {
-	if atomic.LoadUint32(&o.done) == 1 {
-		return nil
-	}
-	// Slow-path.
-	o.m.Lock()
-	defer o.m.Unlock()
-	var err error
-	if o.done == 0 {
-		err = f()
-		if err == nil {
-			atomic.StoreUint32(&o.done, 1)
-		}
-	}
-	return err
-}

+ 0 - 126
vendor/github.com/go-redis/redis/v8/internal/pool/conn.go

@@ -1,126 +0,0 @@
-package pool
-
-import (
-	"bufio"
-	"context"
-	"net"
-	"sync/atomic"
-	"time"
-
-	"github.com/go-redis/redis/v8/internal"
-	"github.com/go-redis/redis/v8/internal/proto"
-)
-
-var noDeadline = time.Time{}
-
-type Conn struct {
-	usedAt  int64 // atomic
-	netConn net.Conn
-
-	rd *proto.Reader
-	bw *bufio.Writer
-	wr *proto.Writer
-
-	Inited    bool
-	pooled    bool
-	createdAt time.Time
-}
-
-func NewConn(netConn net.Conn) *Conn {
-	cn := &Conn{
-		netConn:   netConn,
-		createdAt: time.Now(),
-	}
-	cn.rd = proto.NewReader(netConn)
-	cn.bw = bufio.NewWriter(netConn)
-	cn.wr = proto.NewWriter(cn.bw)
-	cn.SetUsedAt(time.Now())
-	return cn
-}
-
-func (cn *Conn) UsedAt() time.Time {
-	unix := atomic.LoadInt64(&cn.usedAt)
-	return time.Unix(unix, 0)
-}
-
-func (cn *Conn) SetUsedAt(tm time.Time) {
-	atomic.StoreInt64(&cn.usedAt, tm.Unix())
-}
-
-func (cn *Conn) SetNetConn(netConn net.Conn) {
-	cn.netConn = netConn
-	cn.rd.Reset(netConn)
-	cn.bw.Reset(netConn)
-}
-
-func (cn *Conn) Write(b []byte) (int, error) {
-	return cn.netConn.Write(b)
-}
-
-func (cn *Conn) RemoteAddr() net.Addr {
-	return cn.netConn.RemoteAddr()
-}
-
-func (cn *Conn) WithReader(ctx context.Context, timeout time.Duration, fn func(rd *proto.Reader) error) error {
-	return internal.WithSpan(ctx, "with_reader", func(ctx context.Context) error {
-		err := cn.netConn.SetReadDeadline(cn.deadline(ctx, timeout))
-		if err != nil {
-			return err
-		}
-		return fn(cn.rd)
-	})
-}
-
-func (cn *Conn) WithWriter(
-	ctx context.Context, timeout time.Duration, fn func(wr *proto.Writer) error,
-) error {
-	return internal.WithSpan(ctx, "with_writer", func(ctx context.Context) error {
-		err := cn.netConn.SetWriteDeadline(cn.deadline(ctx, timeout))
-		if err != nil {
-			return err
-		}
-
-		if cn.bw.Buffered() > 0 {
-			cn.bw.Reset(cn.netConn)
-		}
-
-		err = fn(cn.wr)
-		if err != nil {
-			return err
-		}
-
-		return cn.bw.Flush()
-	})
-}
-
-func (cn *Conn) Close() error {
-	return cn.netConn.Close()
-}
-
-func (cn *Conn) deadline(ctx context.Context, timeout time.Duration) time.Time {
-	tm := time.Now()
-	cn.SetUsedAt(tm)
-
-	if timeout > 0 {
-		tm = tm.Add(timeout)
-	}
-
-	if ctx != nil {
-		deadline, ok := ctx.Deadline()
-		if ok {
-			if timeout == 0 {
-				return deadline
-			}
-			if deadline.Before(tm) {
-				return deadline
-			}
-			return tm
-		}
-	}
-
-	if timeout > 0 {
-		return tm
-	}
-
-	return noDeadline
-}

+ 0 - 517
vendor/github.com/go-redis/redis/v8/internal/pool/pool.go

@@ -1,517 +0,0 @@
-package pool
-
-import (
-	"context"
-	"errors"
-	"net"
-	"sync"
-	"sync/atomic"
-	"time"
-
-	"github.com/go-redis/redis/v8/internal"
-)
-
-var ErrClosed = errors.New("redis: client is closed")
-var ErrPoolTimeout = errors.New("redis: connection pool timeout")
-
-var timers = sync.Pool{
-	New: func() interface{} {
-		t := time.NewTimer(time.Hour)
-		t.Stop()
-		return t
-	},
-}
-
-// Stats contains pool state information and accumulated stats.
-type Stats struct {
-	Hits     uint32 // number of times free connection was found in the pool
-	Misses   uint32 // number of times free connection was NOT found in the pool
-	Timeouts uint32 // number of times a wait timeout occurred
-
-	TotalConns uint32 // number of total connections in the pool
-	IdleConns  uint32 // number of idle connections in the pool
-	StaleConns uint32 // number of stale connections removed from the pool
-}
-
-type Pooler interface {
-	NewConn(context.Context) (*Conn, error)
-	CloseConn(*Conn) error
-
-	Get(context.Context) (*Conn, error)
-	Put(*Conn)
-	Remove(*Conn, error)
-
-	Len() int
-	IdleLen() int
-	Stats() *Stats
-
-	Close() error
-}
-
-type Options struct {
-	Dialer  func(context.Context) (net.Conn, error)
-	OnClose func(*Conn) error
-
-	PoolSize           int
-	MinIdleConns       int
-	MaxConnAge         time.Duration
-	PoolTimeout        time.Duration
-	IdleTimeout        time.Duration
-	IdleCheckFrequency time.Duration
-}
-
-type ConnPool struct {
-	opt *Options
-
-	dialErrorsNum uint32 // atomic
-
-	lastDialErrorMu sync.RWMutex
-	lastDialError   error
-
-	queue chan struct{}
-
-	connsMu      sync.Mutex
-	conns        []*Conn
-	idleConns    []*Conn
-	poolSize     int
-	idleConnsLen int
-
-	stats Stats
-
-	_closed  uint32 // atomic
-	closedCh chan struct{}
-}
-
-var _ Pooler = (*ConnPool)(nil)
-
-func NewConnPool(opt *Options) *ConnPool {
-	p := &ConnPool{
-		opt: opt,
-
-		queue:     make(chan struct{}, opt.PoolSize),
-		conns:     make([]*Conn, 0, opt.PoolSize),
-		idleConns: make([]*Conn, 0, opt.PoolSize),
-		closedCh:  make(chan struct{}),
-	}
-
-	p.connsMu.Lock()
-	p.checkMinIdleConns()
-	p.connsMu.Unlock()
-
-	if opt.IdleTimeout > 0 && opt.IdleCheckFrequency > 0 {
-		go p.reaper(opt.IdleCheckFrequency)
-	}
-
-	return p
-}
-
-func (p *ConnPool) checkMinIdleConns() {
-	if p.opt.MinIdleConns == 0 {
-		return
-	}
-	for p.poolSize < p.opt.PoolSize && p.idleConnsLen < p.opt.MinIdleConns {
-		p.poolSize++
-		p.idleConnsLen++
-		go func() {
-			err := p.addIdleConn()
-			if err != nil {
-				p.connsMu.Lock()
-				p.poolSize--
-				p.idleConnsLen--
-				p.connsMu.Unlock()
-			}
-		}()
-	}
-}
-
-func (p *ConnPool) addIdleConn() error {
-	cn, err := p.dialConn(context.TODO(), true)
-	if err != nil {
-		return err
-	}
-
-	p.connsMu.Lock()
-	p.conns = append(p.conns, cn)
-	p.idleConns = append(p.idleConns, cn)
-	p.connsMu.Unlock()
-	return nil
-}
-
-func (p *ConnPool) NewConn(ctx context.Context) (*Conn, error) {
-	return p.newConn(ctx, false)
-}
-
-func (p *ConnPool) newConn(ctx context.Context, pooled bool) (*Conn, error) {
-	cn, err := p.dialConn(ctx, pooled)
-	if err != nil {
-		return nil, err
-	}
-
-	p.connsMu.Lock()
-	p.conns = append(p.conns, cn)
-	if pooled {
-		// If pool is full remove the cn on next Put.
-		if p.poolSize >= p.opt.PoolSize {
-			cn.pooled = false
-		} else {
-			p.poolSize++
-		}
-	}
-	p.connsMu.Unlock()
-	return cn, nil
-}
-
-func (p *ConnPool) dialConn(ctx context.Context, pooled bool) (*Conn, error) {
-	if p.closed() {
-		return nil, ErrClosed
-	}
-
-	if atomic.LoadUint32(&p.dialErrorsNum) >= uint32(p.opt.PoolSize) {
-		return nil, p.getLastDialError()
-	}
-
-	netConn, err := p.opt.Dialer(ctx)
-	if err != nil {
-		p.setLastDialError(err)
-		if atomic.AddUint32(&p.dialErrorsNum, 1) == uint32(p.opt.PoolSize) {
-			go p.tryDial()
-		}
-		return nil, err
-	}
-
-	cn := NewConn(netConn)
-	cn.pooled = pooled
-	return cn, nil
-}
-
-func (p *ConnPool) tryDial() {
-	for {
-		if p.closed() {
-			return
-		}
-
-		conn, err := p.opt.Dialer(context.Background())
-		if err != nil {
-			p.setLastDialError(err)
-			time.Sleep(time.Second)
-			continue
-		}
-
-		atomic.StoreUint32(&p.dialErrorsNum, 0)
-		_ = conn.Close()
-		return
-	}
-}
-
-func (p *ConnPool) setLastDialError(err error) {
-	p.lastDialErrorMu.Lock()
-	p.lastDialError = err
-	p.lastDialErrorMu.Unlock()
-}
-
-func (p *ConnPool) getLastDialError() error {
-	p.lastDialErrorMu.RLock()
-	err := p.lastDialError
-	p.lastDialErrorMu.RUnlock()
-	return err
-}
-
-// Get returns existed connection from the pool or creates a new one.
-func (p *ConnPool) Get(ctx context.Context) (*Conn, error) {
-	if p.closed() {
-		return nil, ErrClosed
-	}
-
-	err := p.waitTurn(ctx)
-	if err != nil {
-		return nil, err
-	}
-
-	for {
-		p.connsMu.Lock()
-		cn := p.popIdle()
-		p.connsMu.Unlock()
-
-		if cn == nil {
-			break
-		}
-
-		if p.isStaleConn(cn) {
-			_ = p.CloseConn(cn)
-			continue
-		}
-
-		atomic.AddUint32(&p.stats.Hits, 1)
-		return cn, nil
-	}
-
-	atomic.AddUint32(&p.stats.Misses, 1)
-
-	newcn, err := p.newConn(ctx, true)
-	if err != nil {
-		p.freeTurn()
-		return nil, err
-	}
-
-	return newcn, nil
-}
-
-func (p *ConnPool) getTurn() {
-	p.queue <- struct{}{}
-}
-
-func (p *ConnPool) waitTurn(ctx context.Context) error {
-	select {
-	case <-ctx.Done():
-		return ctx.Err()
-	default:
-	}
-
-	select {
-	case p.queue <- struct{}{}:
-		return nil
-	default:
-	}
-
-	timer := timers.Get().(*time.Timer)
-	timer.Reset(p.opt.PoolTimeout)
-
-	select {
-	case <-ctx.Done():
-		if !timer.Stop() {
-			<-timer.C
-		}
-		timers.Put(timer)
-		return ctx.Err()
-	case p.queue <- struct{}{}:
-		if !timer.Stop() {
-			<-timer.C
-		}
-		timers.Put(timer)
-		return nil
-	case <-timer.C:
-		timers.Put(timer)
-		atomic.AddUint32(&p.stats.Timeouts, 1)
-		return ErrPoolTimeout
-	}
-}
-
-func (p *ConnPool) freeTurn() {
-	<-p.queue
-}
-
-func (p *ConnPool) popIdle() *Conn {
-	if len(p.idleConns) == 0 {
-		return nil
-	}
-
-	idx := len(p.idleConns) - 1
-	cn := p.idleConns[idx]
-	p.idleConns = p.idleConns[:idx]
-	p.idleConnsLen--
-	p.checkMinIdleConns()
-	return cn
-}
-
-func (p *ConnPool) Put(cn *Conn) {
-	if cn.rd.Buffered() > 0 {
-		internal.Logger.Printf("Conn has unread data")
-		p.Remove(cn, BadConnError{})
-		return
-	}
-
-	if !cn.pooled {
-		p.Remove(cn, nil)
-		return
-	}
-
-	p.connsMu.Lock()
-	p.idleConns = append(p.idleConns, cn)
-	p.idleConnsLen++
-	p.connsMu.Unlock()
-	p.freeTurn()
-}
-
-func (p *ConnPool) Remove(cn *Conn, reason error) {
-	p.removeConnWithLock(cn)
-	p.freeTurn()
-	_ = p.closeConn(cn)
-}
-
-func (p *ConnPool) CloseConn(cn *Conn) error {
-	p.removeConnWithLock(cn)
-	return p.closeConn(cn)
-}
-
-func (p *ConnPool) removeConnWithLock(cn *Conn) {
-	p.connsMu.Lock()
-	p.removeConn(cn)
-	p.connsMu.Unlock()
-}
-
-func (p *ConnPool) removeConn(cn *Conn) {
-	for i, c := range p.conns {
-		if c == cn {
-			p.conns = append(p.conns[:i], p.conns[i+1:]...)
-			if cn.pooled {
-				p.poolSize--
-				p.checkMinIdleConns()
-			}
-			return
-		}
-	}
-}
-
-func (p *ConnPool) closeConn(cn *Conn) error {
-	if p.opt.OnClose != nil {
-		_ = p.opt.OnClose(cn)
-	}
-	return cn.Close()
-}
-
-// Len returns total number of connections.
-func (p *ConnPool) Len() int {
-	p.connsMu.Lock()
-	n := len(p.conns)
-	p.connsMu.Unlock()
-	return n
-}
-
-// IdleLen returns number of idle connections.
-func (p *ConnPool) IdleLen() int {
-	p.connsMu.Lock()
-	n := p.idleConnsLen
-	p.connsMu.Unlock()
-	return n
-}
-
-func (p *ConnPool) Stats() *Stats {
-	idleLen := p.IdleLen()
-	return &Stats{
-		Hits:     atomic.LoadUint32(&p.stats.Hits),
-		Misses:   atomic.LoadUint32(&p.stats.Misses),
-		Timeouts: atomic.LoadUint32(&p.stats.Timeouts),
-
-		TotalConns: uint32(p.Len()),
-		IdleConns:  uint32(idleLen),
-		StaleConns: atomic.LoadUint32(&p.stats.StaleConns),
-	}
-}
-
-func (p *ConnPool) closed() bool {
-	return atomic.LoadUint32(&p._closed) == 1
-}
-
-func (p *ConnPool) Filter(fn func(*Conn) bool) error {
-	var firstErr error
-	p.connsMu.Lock()
-	for _, cn := range p.conns {
-		if fn(cn) {
-			if err := p.closeConn(cn); err != nil && firstErr == nil {
-				firstErr = err
-			}
-		}
-	}
-	p.connsMu.Unlock()
-	return firstErr
-}
-
-func (p *ConnPool) Close() error {
-	if !atomic.CompareAndSwapUint32(&p._closed, 0, 1) {
-		return ErrClosed
-	}
-	close(p.closedCh)
-
-	var firstErr error
-	p.connsMu.Lock()
-	for _, cn := range p.conns {
-		if err := p.closeConn(cn); err != nil && firstErr == nil {
-			firstErr = err
-		}
-	}
-	p.conns = nil
-	p.poolSize = 0
-	p.idleConns = nil
-	p.idleConnsLen = 0
-	p.connsMu.Unlock()
-
-	return firstErr
-}
-
-func (p *ConnPool) reaper(frequency time.Duration) {
-	ticker := time.NewTicker(frequency)
-	defer ticker.Stop()
-
-	for {
-		select {
-		case <-ticker.C:
-			// It is possible that ticker and closedCh arrive together,
-			// and select pseudo-randomly pick ticker case, we double
-			// check here to prevent being executed after closed.
-			if p.closed() {
-				return
-			}
-			_, err := p.ReapStaleConns()
-			if err != nil {
-				internal.Logger.Printf("ReapStaleConns failed: %s", err)
-				continue
-			}
-		case <-p.closedCh:
-			return
-		}
-	}
-}
-
-func (p *ConnPool) ReapStaleConns() (int, error) {
-	var n int
-	for {
-		p.getTurn()
-
-		p.connsMu.Lock()
-		cn := p.reapStaleConn()
-		p.connsMu.Unlock()
-		p.freeTurn()
-
-		if cn != nil {
-			_ = p.closeConn(cn)
-			n++
-		} else {
-			break
-		}
-	}
-	atomic.AddUint32(&p.stats.StaleConns, uint32(n))
-	return n, nil
-}
-
-func (p *ConnPool) reapStaleConn() *Conn {
-	if len(p.idleConns) == 0 {
-		return nil
-	}
-
-	cn := p.idleConns[0]
-	if !p.isStaleConn(cn) {
-		return nil
-	}
-
-	p.idleConns = append(p.idleConns[:0], p.idleConns[1:]...)
-	p.idleConnsLen--
-	p.removeConn(cn)
-
-	return cn
-}
-
-func (p *ConnPool) isStaleConn(cn *Conn) bool {
-	if p.opt.IdleTimeout == 0 && p.opt.MaxConnAge == 0 {
-		return false
-	}
-
-	now := time.Now()
-	if p.opt.IdleTimeout > 0 && now.Sub(cn.UsedAt()) >= p.opt.IdleTimeout {
-		return true
-	}
-	if p.opt.MaxConnAge > 0 && now.Sub(cn.createdAt) >= p.opt.MaxConnAge {
-		return true
-	}
-
-	return false
-}

+ 0 - 208
vendor/github.com/go-redis/redis/v8/internal/pool/pool_single.go

@@ -1,208 +0,0 @@
-package pool
-
-import (
-	"context"
-	"fmt"
-	"sync/atomic"
-)
-
-const (
-	stateDefault = 0
-	stateInited  = 1
-	stateClosed  = 2
-)
-
-type BadConnError struct {
-	wrapped error
-}
-
-var _ error = (*BadConnError)(nil)
-
-func (e BadConnError) Error() string {
-	s := "redis: Conn is in a bad state"
-	if e.wrapped != nil {
-		s += ": " + e.wrapped.Error()
-	}
-	return s
-}
-
-func (e BadConnError) Unwrap() error {
-	return e.wrapped
-}
-
-type SingleConnPool struct {
-	pool  Pooler
-	level int32 // atomic
-
-	state uint32 // atomic
-	ch    chan *Conn
-
-	_badConnError atomic.Value
-}
-
-var _ Pooler = (*SingleConnPool)(nil)
-
-func NewSingleConnPool(pool Pooler) *SingleConnPool {
-	p, ok := pool.(*SingleConnPool)
-	if !ok {
-		p = &SingleConnPool{
-			pool: pool,
-			ch:   make(chan *Conn, 1),
-		}
-	}
-	atomic.AddInt32(&p.level, 1)
-	return p
-}
-
-func (p *SingleConnPool) SetConn(cn *Conn) {
-	if atomic.CompareAndSwapUint32(&p.state, stateDefault, stateInited) {
-		p.ch <- cn
-	} else {
-		panic("not reached")
-	}
-}
-
-func (p *SingleConnPool) NewConn(ctx context.Context) (*Conn, error) {
-	return p.pool.NewConn(ctx)
-}
-
-func (p *SingleConnPool) CloseConn(cn *Conn) error {
-	return p.pool.CloseConn(cn)
-}
-
-func (p *SingleConnPool) Get(ctx context.Context) (*Conn, error) {
-	// In worst case this races with Close which is not a very common operation.
-	for i := 0; i < 1000; i++ {
-		switch atomic.LoadUint32(&p.state) {
-		case stateDefault:
-			cn, err := p.pool.Get(ctx)
-			if err != nil {
-				return nil, err
-			}
-			if atomic.CompareAndSwapUint32(&p.state, stateDefault, stateInited) {
-				return cn, nil
-			}
-			p.pool.Remove(cn, ErrClosed)
-		case stateInited:
-			if err := p.badConnError(); err != nil {
-				return nil, err
-			}
-			cn, ok := <-p.ch
-			if !ok {
-				return nil, ErrClosed
-			}
-			return cn, nil
-		case stateClosed:
-			return nil, ErrClosed
-		default:
-			panic("not reached")
-		}
-	}
-	return nil, fmt.Errorf("redis: SingleConnPool.Get: infinite loop")
-}
-
-func (p *SingleConnPool) Put(cn *Conn) {
-	defer func() {
-		if recover() != nil {
-			p.freeConn(cn)
-		}
-	}()
-	p.ch <- cn
-}
-
-func (p *SingleConnPool) freeConn(cn *Conn) {
-	if err := p.badConnError(); err != nil {
-		p.pool.Remove(cn, err)
-	} else {
-		p.pool.Put(cn)
-	}
-}
-
-func (p *SingleConnPool) Remove(cn *Conn, reason error) {
-	defer func() {
-		if recover() != nil {
-			p.pool.Remove(cn, ErrClosed)
-		}
-	}()
-	p._badConnError.Store(BadConnError{wrapped: reason})
-	p.ch <- cn
-}
-
-func (p *SingleConnPool) Len() int {
-	switch atomic.LoadUint32(&p.state) {
-	case stateDefault:
-		return 0
-	case stateInited:
-		return 1
-	case stateClosed:
-		return 0
-	default:
-		panic("not reached")
-	}
-}
-
-func (p *SingleConnPool) IdleLen() int {
-	return len(p.ch)
-}
-
-func (p *SingleConnPool) Stats() *Stats {
-	return &Stats{}
-}
-
-func (p *SingleConnPool) Close() error {
-	level := atomic.AddInt32(&p.level, -1)
-	if level > 0 {
-		return nil
-	}
-
-	for i := 0; i < 1000; i++ {
-		state := atomic.LoadUint32(&p.state)
-		if state == stateClosed {
-			return ErrClosed
-		}
-		if atomic.CompareAndSwapUint32(&p.state, state, stateClosed) {
-			close(p.ch)
-			cn, ok := <-p.ch
-			if ok {
-				p.freeConn(cn)
-			}
-			return nil
-		}
-	}
-
-	return fmt.Errorf("redis: SingleConnPool.Close: infinite loop")
-}
-
-func (p *SingleConnPool) Reset() error {
-	if p.badConnError() == nil {
-		return nil
-	}
-
-	select {
-	case cn, ok := <-p.ch:
-		if !ok {
-			return ErrClosed
-		}
-		p.pool.Remove(cn, ErrClosed)
-		p._badConnError.Store(BadConnError{wrapped: nil})
-	default:
-		return fmt.Errorf("redis: SingleConnPool does not have a Conn")
-	}
-
-	if !atomic.CompareAndSwapUint32(&p.state, stateInited, stateDefault) {
-		state := atomic.LoadUint32(&p.state)
-		return fmt.Errorf("redis: invalid SingleConnPool state: %d", state)
-	}
-
-	return nil
-}
-
-func (p *SingleConnPool) badConnError() error {
-	if v := p._badConnError.Load(); v != nil {
-		err := v.(BadConnError)
-		if err.wrapped != nil {
-			return err
-		}
-	}
-	return nil
-}

+ 0 - 112
vendor/github.com/go-redis/redis/v8/internal/pool/pool_sticky.go

@@ -1,112 +0,0 @@
-package pool
-
-import (
-	"context"
-	"sync"
-)
-
-type StickyConnPool struct {
-	pool     *ConnPool
-	reusable bool
-
-	cn     *Conn
-	closed bool
-	mu     sync.Mutex
-}
-
-var _ Pooler = (*StickyConnPool)(nil)
-
-func NewStickyConnPool(pool *ConnPool, reusable bool) *StickyConnPool {
-	return &StickyConnPool{
-		pool:     pool,
-		reusable: reusable,
-	}
-}
-
-func (p *StickyConnPool) NewConn(context.Context) (*Conn, error) {
-	panic("not implemented")
-}
-
-func (p *StickyConnPool) CloseConn(*Conn) error {
-	panic("not implemented")
-}
-
-func (p *StickyConnPool) Get(ctx context.Context) (*Conn, error) {
-	p.mu.Lock()
-	defer p.mu.Unlock()
-
-	if p.closed {
-		return nil, ErrClosed
-	}
-	if p.cn != nil {
-		return p.cn, nil
-	}
-
-	cn, err := p.pool.Get(ctx)
-	if err != nil {
-		return nil, err
-	}
-
-	p.cn = cn
-	return cn, nil
-}
-
-func (p *StickyConnPool) putUpstream() {
-	p.pool.Put(p.cn)
-	p.cn = nil
-}
-
-func (p *StickyConnPool) Put(cn *Conn) {}
-
-func (p *StickyConnPool) removeUpstream(reason error) {
-	p.pool.Remove(p.cn, reason)
-	p.cn = nil
-}
-
-func (p *StickyConnPool) Remove(cn *Conn, reason error) {
-	p.removeUpstream(reason)
-}
-
-func (p *StickyConnPool) Len() int {
-	p.mu.Lock()
-	defer p.mu.Unlock()
-
-	if p.cn == nil {
-		return 0
-	}
-	return 1
-}
-
-func (p *StickyConnPool) IdleLen() int {
-	p.mu.Lock()
-	defer p.mu.Unlock()
-
-	if p.cn == nil {
-		return 1
-	}
-	return 0
-}
-
-func (p *StickyConnPool) Stats() *Stats {
-	return nil
-}
-
-func (p *StickyConnPool) Close() error {
-	p.mu.Lock()
-	defer p.mu.Unlock()
-
-	if p.closed {
-		return ErrClosed
-	}
-	p.closed = true
-
-	if p.cn != nil {
-		if p.reusable {
-			p.putUpstream()
-		} else {
-			p.removeUpstream(ErrClosed)
-		}
-	}
-
-	return nil
-}

+ 0 - 314
vendor/github.com/go-redis/redis/v8/internal/proto/reader.go

@@ -1,314 +0,0 @@
-package proto
-
-import (
-	"bufio"
-	"fmt"
-	"io"
-
-	"github.com/go-redis/redis/v8/internal/util"
-)
-
-const (
-	ErrorReply  = '-'
-	StatusReply = '+'
-	IntReply    = ':'
-	StringReply = '$'
-	ArrayReply  = '*'
-)
-
-//------------------------------------------------------------------------------
-
-const Nil = RedisError("redis: nil")
-
-type RedisError string
-
-func (e RedisError) Error() string { return string(e) }
-
-func (RedisError) RedisError() {}
-
-//------------------------------------------------------------------------------
-
-type MultiBulkParse func(*Reader, int64) (interface{}, error)
-
-type Reader struct {
-	rd   *bufio.Reader
-	_buf []byte
-}
-
-func NewReader(rd io.Reader) *Reader {
-	return &Reader{
-		rd:   bufio.NewReader(rd),
-		_buf: make([]byte, 64),
-	}
-}
-
-func (r *Reader) Buffered() int {
-	return r.rd.Buffered()
-}
-
-func (r *Reader) Peek(n int) ([]byte, error) {
-	return r.rd.Peek(n)
-}
-
-func (r *Reader) Reset(rd io.Reader) {
-	r.rd.Reset(rd)
-}
-
-func (r *Reader) ReadLine() ([]byte, error) {
-	line, err := r.readLine()
-	if err != nil {
-		return nil, err
-	}
-	if isNilReply(line) {
-		return nil, Nil
-	}
-	return line, nil
-}
-
-// readLine that returns an error if:
-//   - there is a pending read error;
-//   - or line does not end with \r\n.
-func (r *Reader) readLine() ([]byte, error) {
-	b, err := r.rd.ReadSlice('\n')
-	if err != nil {
-		return nil, err
-	}
-	if len(b) <= 2 || b[len(b)-1] != '\n' || b[len(b)-2] != '\r' {
-		return nil, fmt.Errorf("redis: invalid reply: %q", b)
-	}
-	b = b[:len(b)-2]
-	return b, nil
-}
-
-func (r *Reader) ReadReply(m MultiBulkParse) (interface{}, error) {
-	line, err := r.ReadLine()
-	if err != nil {
-		return nil, err
-	}
-
-	switch line[0] {
-	case ErrorReply:
-		return nil, ParseErrorReply(line)
-	case StatusReply:
-		return string(line[1:]), nil
-	case IntReply:
-		return util.ParseInt(line[1:], 10, 64)
-	case StringReply:
-		return r.readStringReply(line)
-	case ArrayReply:
-		n, err := parseArrayLen(line)
-		if err != nil {
-			return nil, err
-		}
-		if m == nil {
-			err := fmt.Errorf("redis: got %.100q, but multi bulk parser is nil", line)
-			return nil, err
-		}
-		return m(r, n)
-	}
-	return nil, fmt.Errorf("redis: can't parse %.100q", line)
-}
-
-func (r *Reader) ReadIntReply() (int64, error) {
-	line, err := r.ReadLine()
-	if err != nil {
-		return 0, err
-	}
-	switch line[0] {
-	case ErrorReply:
-		return 0, ParseErrorReply(line)
-	case IntReply:
-		return util.ParseInt(line[1:], 10, 64)
-	default:
-		return 0, fmt.Errorf("redis: can't parse int reply: %.100q", line)
-	}
-}
-
-func (r *Reader) ReadString() (string, error) {
-	line, err := r.ReadLine()
-	if err != nil {
-		return "", err
-	}
-	switch line[0] {
-	case ErrorReply:
-		return "", ParseErrorReply(line)
-	case StringReply:
-		return r.readStringReply(line)
-	case StatusReply:
-		return string(line[1:]), nil
-	case IntReply:
-		return string(line[1:]), nil
-	default:
-		return "", fmt.Errorf("redis: can't parse reply=%.100q reading string", line)
-	}
-}
-
-func (r *Reader) readStringReply(line []byte) (string, error) {
-	if isNilReply(line) {
-		return "", Nil
-	}
-
-	replyLen, err := util.Atoi(line[1:])
-	if err != nil {
-		return "", err
-	}
-
-	b := make([]byte, replyLen+2)
-	_, err = io.ReadFull(r.rd, b)
-	if err != nil {
-		return "", err
-	}
-
-	return util.BytesToString(b[:replyLen]), nil