Skip to content

Commit 4c55595

Browse files
committed
refactor: migrate to redis org
1 parent 4b83f5d commit 4c55595

Some content is hidden

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

50 files changed

+78
-78
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ package main
2828

2929
import (
3030
"context"
31-
"github.com/rueian/rueidis"
31+
"github.com/redis/rueidis"
3232
)
3333

3434
func main() {
@@ -88,7 +88,7 @@ It is even able to achieve ~14x throughput over go-redis in a local benchmark of
8888

8989
Benchmark source code: https://github.com/rueian/rueidis-benchmark
9090

91-
A benchmark result performed on two GCP n2-highcpu-2 machines also shows that rueidis can achieve higher throughput with lower latencies: https://github.com/rueian/rueidis/pull/93
91+
A benchmark result performed on two GCP n2-highcpu-2 machines also shows that rueidis can achieve higher throughput with lower latencies: https://github.com/redis/rueidis/pull/93
9292

9393
### Pipelining Bulk Operations Manually
9494

@@ -412,5 +412,5 @@ module mymodule
412412
413413
go 1.18
414414
415-
require github.com/rueian/rueidis v0.0.100-go1.18
415+
require github.com/redis/rueidis v1.0.0-go1.18
416416
```

client.go

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

8-
"github.com/rueian/rueidis/internal/cmds"
8+
"github.com/redis/rueidis/internal/cmds"
99
)
1010

1111
type singleClient struct {

cluster.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"sync/atomic"
1010
"time"
1111

12-
"github.com/rueian/rueidis/internal/cmds"
13-
"github.com/rueian/rueidis/internal/util"
12+
"github.com/redis/rueidis/internal/cmds"
13+
"github.com/redis/rueidis/internal/util"
1414
)
1515

1616
// ErrNoSlot indicates that there is no redis node owns the key slot.

cmds.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package rueidis
22

3-
import "github.com/rueian/rueidis/internal/cmds"
3+
import "github.com/redis/rueidis/internal/cmds"
44

55
// Completed represents a completed Redis command, should be created by the Build() of command builder.
66
type Completed = cmds.Completed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/rueian/rueidis
1+
module github.com/redis/rueidis
22

33
go 1.20
44

hack/cmds/commands_search.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@
11841184
"command": "TIMEOUT"
11851185
},
11861186
{
1187-
"comment": "https://github.com/rueian/rueidis/issues/57",
1187+
"comment": "https://github.com/redis/rueidis/issues/57",
11881188
"name": "op",
11891189
"type": "block",
11901190
"optional": true,

helper.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"sync"
77
"time"
88

9-
"github.com/rueian/rueidis/internal/cmds"
10-
"github.com/rueian/rueidis/internal/util"
9+
"github.com/redis/rueidis/internal/cmds"
10+
"github.com/redis/rueidis/internal/util"
1111
)
1212

1313
// MGetCache is a helper that consults the client-side caches with multiple keys by grouping keys within same slot into MGETs

lua.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"encoding/hex"
77
"sync/atomic"
88

9-
"github.com/rueian/rueidis/internal/util"
9+
"github.com/redis/rueidis/internal/util"
1010
)
1111

1212
// NewLuaScript creates a Lua instance whose Lua.Exec uses EVALSHA and EVAL.

lua_test.go

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

13-
"github.com/rueian/rueidis/internal/cmds"
13+
"github.com/redis/rueidis/internal/cmds"
1414
)
1515

1616
func TestNewLuaScriptOnePass(t *testing.T) {

message.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"time"
1010
"unsafe"
1111

12-
"github.com/rueian/rueidis/internal/util"
12+
"github.com/redis/rueidis/internal/util"
1313
)
1414

1515
const messageStructSize = int(unsafe.Sizeof(RedisMessage{}))
@@ -475,7 +475,7 @@ func (m *RedisMessage) Error() error {
475475
return Nil
476476
}
477477
if m.typ == '-' || m.typ == '!' {
478-
// kvrocks: https://github.com/rueian/rueidis/issues/152#issuecomment-1333923750
478+
// kvrocks: https://github.com/redis/rueidis/issues/152#issuecomment-1333923750
479479
mm := *m
480480
mm.string = strings.TrimPrefix(m.string, "ERR ")
481481
return (*RedisError)(&mm)

message_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ func TestRedisMessage(t *testing.T) {
657657
}
658658
})
659659
t.Run("Trim ERR prefix", func(t *testing.T) {
660-
// kvrocks: https://github.com/rueian/rueidis/issues/152#issuecomment-1333923750
660+
// kvrocks: https://github.com/redis/rueidis/issues/152#issuecomment-1333923750
661661
if (&RedisMessage{typ: '-', string: "ERR no_prefix"}).Error().Error() != "no_prefix" {
662662
t.Fatal("fail to trim ERR")
663663
}

mock/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"testing"
1818

1919
"github.com/golang/mock/gomock"
20-
"github.com/rueian/rueidis/mock"
20+
"github.com/redis/rueidis/mock"
2121
)
2222

2323
func TestWithRueidis(t *testing.T) {
@@ -53,7 +53,7 @@ import (
5353
"testing"
5454

5555
"github.com/golang/mock/gomock"
56-
"github.com/rueian/rueidis/mock"
56+
"github.com/redis/rueidis/mock"
5757
)
5858

5959
func TestWithRueidisReceive(t *testing.T) {

mock/client.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"time"
77

88
"github.com/golang/mock/gomock"
9-
"github.com/rueian/rueidis"
10-
"github.com/rueian/rueidis/internal/cmds"
9+
"github.com/redis/rueidis"
10+
"github.com/redis/rueidis/internal/cmds"
1111
)
1212

1313
var _ rueidis.Client = (*Client)(nil)

mock/client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"time"
88

99
"github.com/golang/mock/gomock"
10-
"github.com/rueian/rueidis"
10+
"github.com/redis/rueidis"
1111
)
1212

1313
func TestNewClient(t *testing.T) {

mock/match.go

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

77
"github.com/golang/mock/gomock"
8-
"github.com/rueian/rueidis"
8+
"github.com/redis/rueidis"
99
)
1010

1111
func Match(cmd ...string) gomock.Matcher {

mock/match_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"testing"
77

88
"github.com/golang/mock/gomock"
9-
"github.com/rueian/rueidis"
10-
"github.com/rueian/rueidis/internal/cmds"
9+
"github.com/redis/rueidis"
10+
"github.com/redis/rueidis/internal/cmds"
1111
)
1212

1313
func TestMatch_Completed(t *testing.T) {
@@ -63,7 +63,7 @@ func TestMatch_Other(t *testing.T) {
6363
t.Fatalf("unexpected matched %s", m.String())
6464
}
6565
if m := Match("GET", "k"); m.Matches([]rueidis.Completed{
66-
cmds.NewBuilder(cmds.NoSlot).Get().Key("k").Build(), // https://github.com/rueian/rueidis/issues/120
66+
cmds.NewBuilder(cmds.NoSlot).Get().Key("k").Build(), // https://github.com/redis/rueidis/issues/120
6767
}) {
6868
t.Fatalf("unexpected matched %s", m.String())
6969
}
@@ -78,7 +78,7 @@ func TestMatchFn_Other(t *testing.T) {
7878
if m := MatchFn(func(cmd []string) bool {
7979
return reflect.DeepEqual(cmd, []string{"GET", "k"})
8080
}, "GET k"); m.Matches([]rueidis.Completed{
81-
cmds.NewBuilder(cmds.NoSlot).Get().Key("k").Build(), // https://github.com/rueian/rueidis/issues/120
81+
cmds.NewBuilder(cmds.NoSlot).Get().Key("k").Build(), // https://github.com/redis/rueidis/issues/120
8282
}) {
8383
t.Fatalf("unexpected matched %s", m.String())
8484
}

mock/result.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"strconv"
55
"unsafe"
66

7-
"github.com/rueian/rueidis"
7+
"github.com/redis/rueidis"
88
)
99

1010
func Result(val rueidis.RedisMessage) rueidis.RedisResult {

mock/result_test.go

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

8-
"github.com/rueian/rueidis"
8+
"github.com/redis/rueidis"
99
)
1010

1111
func TestRedisString(t *testing.T) {

mux.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"sync/atomic"
88
"time"
99

10-
"github.com/rueian/rueidis/internal/cmds"
11-
"github.com/rueian/rueidis/internal/util"
10+
"github.com/redis/rueidis/internal/cmds"
11+
"github.com/redis/rueidis/internal/util"
1212
)
1313

1414
type connFn func(dst string, opt *ClientOption) conn

mux_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"testing"
1414
"time"
1515

16-
"github.com/rueian/rueidis/internal/cmds"
16+
"github.com/redis/rueidis/internal/cmds"
1717
)
1818

1919
func setupMux(wires []*mockWire) (conn *mux, checkClean func(t *testing.T)) {

om/README.md

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

13-
"github.com/rueian/rueidis"
14-
"github.com/rueian/rueidis/om"
13+
"github.com/redis/rueidis"
14+
"github.com/redis/rueidis/om"
1515
)
1616

1717
type Example struct {

om/conv.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"strconv"
77
"unsafe"
88

9-
"github.com/rueian/rueidis"
9+
"github.com/redis/rueidis"
1010
)
1111

1212
func newHashConvFactory(t reflect.Type, schema schema) *hashConvFactory {

om/cursor.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"errors"
66

7-
"github.com/rueian/rueidis"
7+
"github.com/redis/rueidis"
88
)
99

1010
var EndOfCursor = errors.New("end of cursor")

om/cursor_test.go

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

8-
"github.com/rueian/rueidis"
8+
"github.com/redis/rueidis"
99
)
1010

1111
type Book struct {

om/hash.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"strconv"
77
"time"
88

9-
"github.com/rueian/rueidis"
9+
"github.com/redis/rueidis"
1010
)
1111

1212
// NewHashRepository creates an HashRepository.

om/hash_test.go

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

1111
"github.com/oklog/ulid/v2"
12-
"github.com/rueian/rueidis"
12+
"github.com/redis/rueidis"
1313
)
1414

1515
type HashTestStruct struct {

om/json.go

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

11-
"github.com/rueian/rueidis"
11+
"github.com/redis/rueidis"
1212
)
1313

1414
// NewJSONRepository creates an JSONRepository.

om/json_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"time"
88

99
"github.com/oklog/ulid/v2"
10-
"github.com/rueian/rueidis"
10+
"github.com/redis/rueidis"
1111
)
1212

1313
type JSONTestStruct struct {

om/repo.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"errors"
66
"time"
77

8-
"github.com/rueian/rueidis"
9-
"github.com/rueian/rueidis/internal/cmds"
8+
"github.com/redis/rueidis"
9+
"github.com/redis/rueidis/internal/cmds"
1010
)
1111

1212
type (

om/repo_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package om
33
import (
44
"testing"
55

6-
"github.com/rueian/rueidis"
6+
"github.com/redis/rueidis"
77
)
88

99
func setup(t *testing.T) rueidis.Client {

pipe.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"sync/atomic"
1616
"time"
1717

18-
"github.com/rueian/rueidis/internal/cmds"
18+
"github.com/redis/rueidis/internal/cmds"
1919
)
2020

2121
var noHello = regexp.MustCompile("unknown command .?HELLO.?")
@@ -313,7 +313,7 @@ func (p *pipe) _backgroundWrite() (err error) {
313313
continue
314314
}
315315
if flushDelay != 0 && atomic.LoadInt32(&p.waits) > 1 { // do not delay for sequential usage
316-
time.Sleep(flushDelay - time.Since(flushStart)) // ref: https://github.com/rueian/rueidis/issues/156
316+
time.Sleep(flushDelay - time.Since(flushStart)) // ref: https://github.com/redis/rueidis/issues/156
317317
}
318318
}
319319
}

pipe_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"testing"
1515
"time"
1616

17-
"github.com/rueian/rueidis/internal/cmds"
17+
"github.com/redis/rueidis/internal/cmds"
1818
)
1919

2020
type redisExpect struct {

redis_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ func TestSentinelClientIntegration(t *testing.T) {
586586
Sentinel: SentinelOption{
587587
MasterSet: "test",
588588
},
589-
SelectDB: 2, // https://github.com/rueian/rueidis/issues/138
589+
SelectDB: 2, // https://github.com/redis/rueidis/issues/138
590590
})
591591
if err != nil {
592592
t.Fatal(err)

ring_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"testing"
77
"time"
88

9-
"github.com/rueian/rueidis/internal/cmds"
9+
"github.com/redis/rueidis/internal/cmds"
1010
)
1111

1212
//gocyclo:ignore

rueidis.go

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

13-
"github.com/rueian/rueidis/internal/cmds"
13+
"github.com/redis/rueidis/internal/cmds"
1414
)
1515

1616
const (
@@ -122,7 +122,7 @@ type ClientOption struct {
122122
// application and Redis CPU utilization due to less executed system calls. By default, Rueidis flushes data to the
123123
// connection without extra delays. Depending on network latency and application-specific conditions the value
124124
// of MaxFlushDelay may vary, sth like 20 microseconds should not affect latency/throughput a lot but still
125-
// produce notable CPU usage reduction under load. Ref: https://github.com/rueian/rueidis/issues/156
125+
// produce notable CPU usage reduction under load. Ref: https://github.com/redis/rueidis/issues/156
126126
MaxFlushDelay time.Duration
127127

128128
// ShuffleInit is a handy flag that shuffles the InitAddress after passing to the NewClient() if it is true

0 commit comments

Comments
 (0)