Skip to content

Commit b934e46

Browse files
committed
Update the imports to onboard dcc in monorepo
1 parent 07539e0 commit b934e46

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+201
-1757
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## [8.11.5-grab1.0] (https://gitlab.myteksi.net/dbops/Redis/-/tree/v8) (20220-12-21)
2+
3+
### Features
4+
5+
* Add limiter for connections per node
6+
* Add dynamic poolsize
7+
* Add dynamic client reload
8+
19
## [8.11.5](https://github.com/go-redis/redis/compare/v8.11.4...v8.11.5) (2022-03-17)
210

311

README.md

+8-61
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,27 @@
11
# Redis client for Go
22

3-
![build workflow](https://github.com/go-redis/redis/actions/workflows/build.yml/badge.svg)
4-
[![PkgGoDev](https://pkg.go.dev/badge/github.com/go-redis/redis/v8)](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc)
5-
[![Documentation](https://img.shields.io/badge/redis-documentation-informational)](https://redis.uptrace.dev/)
6-
7-
go-redis is brought to you by :star: [**uptrace/uptrace**](https://github.com/uptrace/uptrace).
8-
Uptrace is an open source and blazingly fast **distributed tracing** backend powered by
9-
OpenTelemetry and ClickHouse. Give it a star as well!
3+
This is modified version of go-redis by spiderman team in grab.
4+
This is developed based by the Go-Redis V8/V8.11.5
105

116
## Resources
127

13-
- [Discussions](https://github.com/go-redis/redis/discussions)
14-
- [Documentation](https://redis.uptrace.dev)
15-
- [Reference](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc)
16-
- [Examples](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#pkg-examples)
17-
- [RealWorld example app](https://github.com/uptrace/go-treemux-realworld-example-app)
8+
- [Documentation](https://godoc.org/github.com/go-redis/redis)
9+
- [Design](https://wiki.grab.com/display/DBOps/%5BDesign%5D+Redis+connector)
1810

1911
Other projects you may like:
2012

21-
- [Bun](https://bun.uptrace.dev) - fast and simple SQL client for PostgreSQL, MySQL, and SQLite.
22-
- [BunRouter](https://bunrouter.uptrace.dev/) - fast and flexible HTTP router for Go.
23-
24-
## Ecosystem
25-
26-
- [Redis Mock](https://github.com/go-redis/redismock)
27-
- [Distributed Locks](https://github.com/bsm/redislock)
28-
- [Redis Cache](https://github.com/go-redis/cache)
29-
- [Rate limiting](https://github.com/go-redis/redis_rate)
13+
- [DCC](https://wiki.grab.com/pages/viewpage.action?pageId=399488531) - new redis library in grab, wrapped with this forked go-redis
3014

3115
## Features
32-
33-
- Redis 3 commands except QUIT, MONITOR, and SYNC.
34-
- Automatic connection pooling with
35-
[circuit breaker](https://en.wikipedia.org/wiki/Circuit_breaker_design_pattern) support.
36-
- [Pub/Sub](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#PubSub).
37-
- [Transactions](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#example-Client-TxPipeline).
38-
- [Pipeline](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#example-Client.Pipeline) and
39-
[TxPipeline](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#example-Client.TxPipeline).
40-
- [Scripting](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#Script).
41-
- [Timeouts](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#Options).
42-
- [Redis Sentinel](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#NewFailoverClient).
43-
- [Redis Cluster](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#NewClusterClient).
44-
- [Cluster of Redis Servers](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#example-NewClusterClient-ManualSetup)
45-
without using cluster mode and Redis Sentinel.
46-
- [Ring](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#NewRing).
47-
- [Instrumentation](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#example-package-Instrumentation).
48-
49-
## Installation
50-
51-
go-redis supports 2 last Go versions and requires a Go version with
52-
[modules](https://github.com/golang/go/wiki/Modules) support. So make sure to initialize a Go
53-
module:
54-
55-
```shell
56-
go mod init github.com/my/repo
57-
```
58-
59-
And then install go-redis/v8 (note _v8_ in the import; omitting it is a popular mistake):
60-
61-
```shell
62-
go get github.com/go-redis/redis/v8
63-
```
16+
- support client reload the essiential configurations, especially dinamiclly change the poolsize.
17+
- support per node limiter
6418

6519
## Quickstart
6620

6721
```go
6822
import (
6923
"context"
70-
"github.com/go-redis/redis/v8"
24+
"gitlab.myteksi.net/dbops/Redis/v8"
7125
"fmt"
7226
)
7327

@@ -166,10 +120,3 @@ Lastly, run:
166120
go test
167121
```
168122

169-
## Contributors
170-
171-
Thanks to all the people who already contributed!
172-
173-
<a href="https://github.com/go-redis/redis/graphs/contributors">
174-
<img src="https://contributors-img.web.app/image?repo=go-redis/redis" />
175-
</a>

bench_decode_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"testing"
99
"time"
1010

11-
"github.com/go-redis/redis/v8/internal/proto"
11+
"gitlab.myteksi.net/dbops/Redis/v8/internal/proto"
1212
)
1313

1414
var ctx = context.TODO()

bench_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"testing"
1111
"time"
1212

13-
"github.com/go-redis/redis/v8"
13+
"gitlab.myteksi.net/dbops/Redis/v8"
1414
)
1515

1616
func benchmarkRedisClient(ctx context.Context, poolSize int) *redis.Client {
@@ -303,7 +303,7 @@ func BenchmarkRingWithContext(b *testing.B) {
303303
}
304304
}
305305

306-
//------------------------------------------------------------------------------
306+
// ------------------------------------------------------------------------------
307307

308308
func newClusterScenario() *clusterScenario {
309309
return &clusterScenario{

cluster.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import (
1212
"sync/atomic"
1313
"time"
1414

15-
"github.com/go-redis/redis/v8/internal"
16-
"github.com/go-redis/redis/v8/internal/hashtag"
17-
"github.com/go-redis/redis/v8/internal/pool"
18-
"github.com/go-redis/redis/v8/internal/proto"
19-
"github.com/go-redis/redis/v8/internal/rand"
15+
"gitlab.myteksi.net/dbops/Redis/v8/internal"
16+
"gitlab.myteksi.net/dbops/Redis/v8/internal/hashtag"
17+
"gitlab.myteksi.net/dbops/Redis/v8/internal/pool"
18+
"gitlab.myteksi.net/dbops/Redis/v8/internal/proto"
19+
"gitlab.myteksi.net/dbops/Redis/v8/internal/rand"
2020
)
2121

2222
var errClusterNoNodes = fmt.Errorf("redis: cluster has no nodes")
@@ -168,7 +168,7 @@ func (opt *ClusterOptions) clientOptions() *Options {
168168
}
169169
}
170170

171-
//------------------------------------------------------------------------------
171+
// ------------------------------------------------------------------------------
172172

173173
type clusterNode struct {
174174
Client *Client
@@ -257,7 +257,7 @@ func (n *clusterNode) SetGeneration(gen uint32) {
257257
}
258258
}
259259

260-
//------------------------------------------------------------------------------
260+
// ------------------------------------------------------------------------------
261261

262262
type clusterNodes struct {
263263
opt *ClusterOptions
@@ -424,7 +424,7 @@ func (c *clusterNodes) Random() (*clusterNode, error) {
424424
return c.GetOrCreate(addrs[n])
425425
}
426426

427-
//------------------------------------------------------------------------------
427+
// ------------------------------------------------------------------------------
428428

429429
type clusterSlot struct {
430430
start, end int
@@ -626,7 +626,7 @@ func (c *clusterState) slotNodes(slot int) []*clusterNode {
626626
return nil
627627
}
628628

629-
//------------------------------------------------------------------------------
629+
// ------------------------------------------------------------------------------
630630

631631
type clusterStateHolder struct {
632632
load func(ctx context.Context) (*clusterState, error)
@@ -686,7 +686,7 @@ func (c *clusterStateHolder) ReloadOrGet(ctx context.Context) (*clusterState, er
686686
return c.Get(ctx)
687687
}
688688

689-
//------------------------------------------------------------------------------
689+
// ------------------------------------------------------------------------------
690690

691691
type clusterClient struct {
692692
opt *ClusterOptions
@@ -1735,7 +1735,7 @@ loop:
17351735
return ss
17361736
}
17371737

1738-
//------------------------------------------------------------------------------
1738+
// ------------------------------------------------------------------------------
17391739

17401740
type cmdsMap struct {
17411741
mu sync.Mutex

cluster_dynamic.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"runtime"
66
"time"
77

8-
"github.com/go-redis/redis/v8/internal"
8+
"gitlab.myteksi.net/dbops/Redis/v8/internal"
99
)
1010

1111
// NewDynamicClusterClient is similar to NewClusterClient, but it supports dynamic connection pool management

cluster_dynamic_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"log"
66
"time"
77

8-
"github.com/go-redis/redis/v8"
98
. "github.com/onsi/ginkgo"
109
. "github.com/onsi/gomega"
10+
"gitlab.myteksi.net/dbops/Redis/v8"
1111
)
1212

1313
var _ = Describe("Dynamic ClusterClient", func() {

cluster_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
. "github.com/onsi/ginkgo"
1313
. "github.com/onsi/gomega"
1414

15-
"github.com/go-redis/redis/v8"
16-
"github.com/go-redis/redis/v8/internal/hashtag"
15+
"gitlab.myteksi.net/dbops/Redis/v8"
16+
"gitlab.myteksi.net/dbops/Redis/v8/internal/hashtag"
1717
)
1818

1919
type clusterScenario struct {
@@ -229,7 +229,7 @@ func slotEqual(s1, s2 redis.ClusterSlot) bool {
229229
return true
230230
}
231231

232-
//------------------------------------------------------------------------------
232+
// ------------------------------------------------------------------------------
233233

234234
var _ = Describe("ClusterClient", func() {
235235
var failover bool

0 commit comments

Comments
 (0)