Use redis.v4 that is in alpha/beta state.

This commit is contained in:
Vladimir Mihailenco 2016-04-09 13:27:16 +03:00
parent 96650c0e91
commit 38d30a4bab
29 changed files with 38 additions and 38 deletions

View File

@ -19,5 +19,5 @@ install:
- go get github.com/onsi/gomega
- go get github.com/garyburd/redigo/redis
- mkdir -p $HOME/gopath/src/gopkg.in
- mv $HOME/gopath/src/github.com/go-redis/redis $HOME/gopath/src/gopkg.in/redis.v3
- cd $HOME/gopath/src/gopkg.in/redis.v3
- mv $HOME/gopath/src/github.com/go-redis/redis $HOME/gopath/src/gopkg.in/redis.v4
- cd $HOME/gopath/src/gopkg.in/redis.v4

View File

@ -7,7 +7,7 @@ import (
redigo "github.com/garyburd/redigo/redis"
"gopkg.in/redis.v3"
"gopkg.in/redis.v4"
)
func benchmarkRedisClient(poolSize int) *redis.Client {

View File

@ -6,8 +6,8 @@ import (
"sync/atomic"
"time"
"gopkg.in/redis.v3/internal/hashtag"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4/internal/hashtag"
"gopkg.in/redis.v4/internal/pool"
)
// ClusterClient is a Redis Cluster client representing a pool of zero

View File

@ -14,8 +14,8 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gopkg.in/redis.v3"
"gopkg.in/redis.v3/internal/hashtag"
"gopkg.in/redis.v4"
"gopkg.in/redis.v4/internal/hashtag"
)
type clusterScenario struct {

View File

@ -7,7 +7,7 @@ import (
"strings"
"time"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4/internal/pool"
)
var (

View File

@ -4,7 +4,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gopkg.in/redis.v3"
"gopkg.in/redis.v4"
)
var _ = Describe("Command", func() {

View File

@ -9,7 +9,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gopkg.in/redis.v3"
"gopkg.in/redis.v4"
)
var _ = Describe("Commands", func() {

View File

@ -6,7 +6,7 @@ import (
"sync"
"time"
"gopkg.in/redis.v3"
"gopkg.in/redis.v4"
)
var client *redis.Client

View File

@ -3,7 +3,7 @@ package redis
import (
"time"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4/internal/pool"
)
func (c *baseClient) Pool() pool.Pooler {

View File

@ -5,7 +5,7 @@ import (
"testing"
"time"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4/internal/pool"
)
func benchmarkPoolGetPut(b *testing.B, poolSize int) {

View File

@ -9,7 +9,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4/internal/pool"
)
var _ = Describe("ConnPool", func() {

View File

@ -14,7 +14,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gopkg.in/redis.v3"
"gopkg.in/redis.v4"
)
const (
@ -94,7 +94,7 @@ var _ = AfterSuite(func() {
func TestGinkgoSuite(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "gopkg.in/redis.v3")
RunSpecs(t, "gopkg.in/redis.v4")
}
//------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@ import (
"net"
"time"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4/internal/pool"
)
type Options struct {

View File

@ -6,7 +6,7 @@ import (
"net"
"strconv"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4/internal/pool"
)
const (

View File

@ -5,7 +5,7 @@ import (
"bytes"
"testing"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4/internal/pool"
)
func BenchmarkParseReplyStatus(b *testing.B) {

View File

@ -4,7 +4,7 @@ import (
"sync"
"sync/atomic"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4/internal/pool"
)
// Pipeline implements pipelining as described in

View File

@ -7,7 +7,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gopkg.in/redis.v3"
"gopkg.in/redis.v4"
)
var _ = Describe("Pipelining", func() {

View File

@ -4,8 +4,8 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gopkg.in/redis.v3"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4"
"gopkg.in/redis.v4/internal/pool"
)
var _ = Describe("pool", func() {

View File

@ -5,7 +5,7 @@ import (
"net"
"time"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4/internal/pool"
)
var receiveMessageTimeout = 5 * time.Second

View File

@ -9,7 +9,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gopkg.in/redis.v3"
"gopkg.in/redis.v4"
)
var _ = Describe("PubSub", func() {

View File

@ -11,8 +11,8 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gopkg.in/redis.v3"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4"
"gopkg.in/redis.v4/internal/pool"
)
var _ = Describe("races", func() {

View File

@ -1,11 +1,11 @@
package redis // import "gopkg.in/redis.v3"
package redis // import "gopkg.in/redis.v4"
import (
"fmt"
"io/ioutil"
"log"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4/internal/pool"
)
// Deprecated. Use SetLogger instead.

View File

@ -7,7 +7,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gopkg.in/redis.v3"
"gopkg.in/redis.v4"
)
var _ = Describe("Client", func() {

View File

@ -6,9 +6,9 @@ import (
"sync"
"time"
"gopkg.in/redis.v3/internal/consistenthash"
"gopkg.in/redis.v3/internal/hashtag"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4/internal/consistenthash"
"gopkg.in/redis.v4/internal/hashtag"
"gopkg.in/redis.v4/internal/pool"
)
var (

View File

@ -8,7 +8,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gopkg.in/redis.v3"
"gopkg.in/redis.v4"
)
var _ = Describe("Redis ring", func() {

View File

@ -8,7 +8,7 @@ import (
"sync"
"time"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4/internal/pool"
)
//------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gopkg.in/redis.v3"
"gopkg.in/redis.v4"
)
var _ = Describe("Sentinel", func() {

2
tx.go
View File

@ -4,7 +4,7 @@ import (
"errors"
"fmt"
"gopkg.in/redis.v3/internal/pool"
"gopkg.in/redis.v4/internal/pool"
)
var errDiscard = errors.New("redis: Discard can be used only inside Exec")

View File

@ -7,7 +7,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gopkg.in/redis.v3"
"gopkg.in/redis.v4"
)
var _ = Describe("Tx", func() {