Skip to content

Commit 85ddc25

Browse files
authored
Merge pull request #8 from monkey92t/master
add cluster
2 parents f68b021 + 8c4e18f commit 85ddc25

File tree

10 files changed

+5457
-2751
lines changed

10 files changed

+5457
-2751
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ language: go
33
go:
44
- 1.14.x
55
- 1.15.x
6+
- tip
67

78
go_import_path: github.com/go-redis/redismock
89

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2013 The github.com/go-redis/redis Authors.
1+
Copyright (c) 2013 The github.com/go-redis/redismock Authors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ Confirm that you are using redis.Client the version is github.com/go-redis/redis
1010
go get github.com/go-redis/redismock/v8
1111
```
1212

13-
## Example
14-
15-
More examples: https://github.com/go-redis/redismock/blob/v8/example/example.go
13+
## Quick Start
1614

15+
RedisClient
1716
```go
18-
1917
var ctx = context.TODO()
2018

2119
func NewsInfoForCache(redisDB *redis.Client, newsID int) (info string, err error) {
@@ -49,4 +47,23 @@ func TestNewsInfoForCache(t *testing.T) {
4947
t.Error(err)
5048
}
5149
}
52-
```
50+
```
51+
52+
RedisCluster
53+
```go
54+
clusterClient, clusterMock := redismock.NewClusterMock()
55+
```
56+
57+
## Unsupported Command
58+
59+
RedisClient:
60+
61+
- `Subscribe` / `PSubscribe`
62+
63+
64+
RedisCluster
65+
66+
- `Subscribe` / `PSubscribe`
67+
- `Pipeline` / `TxPipeline`
68+
- `Watch`
69+
- `DBSize`

0 commit comments

Comments
 (0)