Skip to content

Commit

Permalink
feat: move to valkey-io
Browse files Browse the repository at this point in the history
Signed-off-by: Rueian <[email protected]>
  • Loading branch information
rueian committed Apr 24, 2024
1 parent 22309aa commit 0eb298b
Show file tree
Hide file tree
Showing 65 changed files with 112 additions and 112 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# valkey-go

[![Go Reference](https://pkg.go.dev/badge/github.com/rueian/valkey-go.svg)](https://pkg.go.dev/github.com/rueian/valkey-go)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/rueian/valkey-go/tree/main.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/rueian/valkey-go/tree/main)
[![Go Report Card](https://goreportcard.com/badge/github.com/rueian/valkey-go)](https://goreportcard.com/report/github.com/rueian/valkey-go)
[![codecov](https://codecov.io/gh/rueian/valkey-go/branch/main/graph/badge.svg?token=934zeTPaTc)](https://codecov.io/gh/rueian/valkey-go)
[![Go Reference](https://pkg.go.dev/badge/github.com/valkey-io/valkey-go.svg)](https://pkg.go.dev/github.com/valkey-io/valkey-go)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/valkey-io/valkey-go/tree/main.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/valkey-io/valkey-go/tree/main)
[![Go Report Card](https://goreportcard.com/badge/github.com/valkey-io/valkey-go)](https://goreportcard.com/report/github.com/valkey-io/valkey-go)
[![codecov](https://codecov.io/gh/valkey-io/valkey-go/branch/main/graph/badge.svg?token=934zeTPaTc)](https://codecov.io/gh/valkey-io/valkey-go)

A fast Golang Valkey client that does auto pipelining and supports server-assisted client-side caching.

Expand Down Expand Up @@ -31,7 +31,7 @@ package main

import (
"context"
"github.com/rueian/valkey-go"
"github.com/valkey-io/valkey-go"
)

func main() {
Expand All @@ -49,7 +49,7 @@ func main() {
}
```

Checkout more examples: [Command Response Cheatsheet](https://github.com/rueian/valkey-go#command-response-cheatsheet)
Checkout more examples: [Command Response Cheatsheet](https://github.com/valkey-io/valkey-go#command-response-cheatsheet)

## Developer Friendly Command Builder

Expand Down Expand Up @@ -181,7 +181,7 @@ Otherwise, their client-side cache will not be invalidated by valkey.
### Client Side Caching with Cache Aside Pattern

Cache-Aside is a widely used caching strategy.
[valkeyaside](https://github.com/rueian/valkey-go/blob/main/valkeyaside/README.md) can help you cache data into your client-side cache backed by Valkey. For example:
[valkeyaside](https://github.com/valkey-io/valkey-go/blob/main/valkeyaside/README.md) can help you cache data into your client-side cache backed by Valkey. For example:

```go
client, err := valkeyaside.NewClient(valkeyaside.ClientOption{
Expand All @@ -200,7 +200,7 @@ val, err := client.Get(context.Background(), time.Minute, "mykey", func(ctx cont
// ...
```

Please refer to the full example at [valkeyaside](https://github.com/rueian/valkey-go/blob/main/valkeyaside/README.md).
Please refer to the full example at [valkeyaside](https://github.com/valkey-io/valkey-go/blob/main/valkeyaside/README.md).

### Disable Client Side Caching

Expand Down Expand Up @@ -539,7 +539,7 @@ if err := valkey.DecodeSliceOfJSON(client.Do(ctx, client.B().Mget().Key("user1")

## Contributing

Contributions are welcome, including [issues](https://github.com/rueian/valkey-go/issues), [pull requests](https://github.com/rueian/valkey-go/pulls), and [discussions](https://github.com/rueian/valkey-go/discussions).
Contributions are welcome, including [issues](https://github.com/valkey-io/valkey-go/issues), [pull requests](https://github.com/valkey-io/valkey-go/pulls), and [discussions](https://github.com/valkey-io/valkey-go/discussions).
Contributions mean a lot to us and help us improve this library and the community!

### Generate command builders
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync/atomic"
"time"

"github.com/rueian/valkey-go/internal/cmds"
"github.com/valkey-io/valkey-go/internal/cmds"
)

type singleClient struct {
Expand Down
4 changes: 2 additions & 2 deletions cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"sync/atomic"
"time"

"github.com/rueian/valkey-go/internal/cmds"
"github.com/rueian/valkey-go/internal/util"
"github.com/valkey-io/valkey-go/internal/cmds"
"github.com/valkey-io/valkey-go/internal/util"
)

// ErrNoSlot indicates that there is no valkey node owns the key slot.
Expand Down
2 changes: 1 addition & 1 deletion cmds.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package valkey

import "github.com/rueian/valkey-go/internal/cmds"
import "github.com/valkey-io/valkey-go/internal/cmds"

// Builder represents a command builder. It should only be created from the client.B() method.
type Builder = cmds.Builder
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/rueian/valkey-go
module github.com/valkey-io/valkey-go

go 1.20

Expand Down
4 changes: 2 additions & 2 deletions helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"errors"
"time"

intl "github.com/rueian/valkey-go/internal/cmds"
"github.com/rueian/valkey-go/internal/util"
intl "github.com/valkey-io/valkey-go/internal/cmds"
"github.com/valkey-io/valkey-go/internal/util"
)

type mgetcachecmds struct {
Expand Down
2 changes: 1 addition & 1 deletion lru.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"time"
"unsafe"

"github.com/rueian/valkey-go/internal/cmds"
"github.com/valkey-io/valkey-go/internal/cmds"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion lru_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"time"

"github.com/rueian/valkey-go/internal/cmds"
"github.com/valkey-io/valkey-go/internal/cmds"
)

const PTTL = 50
Expand Down
2 changes: 1 addition & 1 deletion lua.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"runtime"
"sync/atomic"

"github.com/rueian/valkey-go/internal/util"
"github.com/valkey-io/valkey-go/internal/util"
)

// NewLuaScript creates a Lua instance whose Lua.Exec uses EVALSHA and EVAL.
Expand Down
2 changes: 1 addition & 1 deletion lua_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"github.com/rueian/valkey-go/internal/cmds"
"github.com/valkey-io/valkey-go/internal/cmds"
)

func TestNewLuaScriptOnePass(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion message.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"
"unsafe"

"github.com/rueian/valkey-go/internal/util"
"github.com/valkey-io/valkey-go/internal/util"
)

const messageStructSize = int(unsafe.Sizeof(ValkeyMessage{}))
Expand Down
4 changes: 2 additions & 2 deletions mock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"testing"

"go.uber.org/mock/gomock"
"github.com/rueian/valkey-go/mock"
"github.com/valkey-io/valkey-go/mock"
)

func TestWithValkey(t *testing.T) {
Expand Down Expand Up @@ -53,7 +53,7 @@ import (
"testing"

"go.uber.org/mock/gomock"
"github.com/rueian/valkey-go/mock"
"github.com/valkey-io/valkey-go/mock"
)

func TestWithValkeyReceive(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions mock/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"reflect"
"time"

"github.com/rueian/valkey-go"
"github.com/rueian/valkey-go/internal/cmds"
"github.com/valkey-io/valkey-go"
"github.com/valkey-io/valkey-go/internal/cmds"
"go.uber.org/mock/gomock"
)

Expand Down
2 changes: 1 addition & 1 deletion mock/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/rueian/valkey-go"
"github.com/valkey-io/valkey-go"
"go.uber.org/mock/gomock"
)

Expand Down
6 changes: 3 additions & 3 deletions mock/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/rueian/valkey-go/mock
module github.com/valkey-io/valkey-go/mock

go 1.20

replace github.com/rueian/valkey-go => ../
replace github.com/valkey-io/valkey-go => ../

require (
github.com/rueian/valkey-go v1.0.35
github.com/valkey-io/valkey-go v1.0.35
go.uber.org/mock v0.3.0
)

Expand Down
2 changes: 1 addition & 1 deletion mock/match.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/rueian/valkey-go"
"github.com/valkey-io/valkey-go"
"go.uber.org/mock/gomock"
)

Expand Down
4 changes: 2 additions & 2 deletions mock/match_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strings"
"testing"

"github.com/rueian/valkey-go"
"github.com/rueian/valkey-go/internal/cmds"
"github.com/valkey-io/valkey-go"
"github.com/valkey-io/valkey-go/internal/cmds"
"go.uber.org/mock/gomock"
)

Expand Down
2 changes: 1 addition & 1 deletion mock/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"
"unsafe"

"github.com/rueian/valkey-go"
"github.com/valkey-io/valkey-go"
)

func Result(val valkey.ValkeyMessage) valkey.ValkeyResult {
Expand Down
2 changes: 1 addition & 1 deletion mock/result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"testing"

"github.com/rueian/valkey-go"
"github.com/valkey-io/valkey-go"
)

func TestValkeyString(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"sync/atomic"
"time"

"github.com/rueian/valkey-go/internal/cmds"
"github.com/rueian/valkey-go/internal/util"
"github.com/valkey-io/valkey-go/internal/cmds"
"github.com/valkey-io/valkey-go/internal/util"
)

type connFn func(dst string, opt *ClientOption) conn
Expand Down
2 changes: 1 addition & 1 deletion mux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"testing"
"time"

"github.com/rueian/valkey-go/internal/cmds"
"github.com/valkey-io/valkey-go/internal/cmds"
)

func setupMux(wires []*mockWire) (conn *mux, checkClean func(t *testing.T)) {
Expand Down
4 changes: 2 additions & 2 deletions om/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"fmt"
"time"

"github.com/rueian/valkey-go"
"github.com/rueian/valkey-go/om"
"github.com/valkey-io/valkey-go"
"github.com/valkey-io/valkey-go/om"
)

type Example struct {
Expand Down
2 changes: 1 addition & 1 deletion om/conv.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"
"unsafe"

"github.com/rueian/valkey-go"
"github.com/valkey-io/valkey-go"
)

func newHashConvFactory(t reflect.Type, schema schema) *hashConvFactory {
Expand Down
2 changes: 1 addition & 1 deletion om/cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"errors"

"github.com/rueian/valkey-go"
"github.com/valkey-io/valkey-go"
)

var EndOfCursor = errors.New("end of cursor")
Expand Down
2 changes: 1 addition & 1 deletion om/cursor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"testing"

"github.com/rueian/valkey-go"
"github.com/valkey-io/valkey-go"
)

type Book struct {
Expand Down
6 changes: 3 additions & 3 deletions om/go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/rueian/valkey-go/om
module github.com/valkey-io/valkey-go/om

go 1.20

replace github.com/rueian/valkey-go => ../
replace github.com/valkey-io/valkey-go => ../

require (
github.com/oklog/ulid/v2 v2.1.0
github.com/rueian/valkey-go v1.0.35
github.com/valkey-io/valkey-go v1.0.35
)

require golang.org/x/sys v0.19.0 // indirect
2 changes: 1 addition & 1 deletion om/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"time"

"github.com/rueian/valkey-go"
"github.com/valkey-io/valkey-go"
)

// NewHashRepository creates an HashRepository.
Expand Down
2 changes: 1 addition & 1 deletion om/hash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/oklog/ulid/v2"
"github.com/rueian/valkey-go"
"github.com/valkey-io/valkey-go"
)

type HashTestStruct struct {
Expand Down
2 changes: 1 addition & 1 deletion om/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"time"

"github.com/rueian/valkey-go"
"github.com/valkey-io/valkey-go"
)

// NewJSONRepository creates an JSONRepository.
Expand Down
2 changes: 1 addition & 1 deletion om/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/oklog/ulid/v2"
"github.com/rueian/valkey-go"
"github.com/valkey-io/valkey-go"
)

type JSONTestStruct struct {
Expand Down
4 changes: 2 additions & 2 deletions om/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"errors"
"time"

"github.com/rueian/valkey-go"
"github.com/rueian/valkey-go/internal/cmds"
"github.com/valkey-io/valkey-go"
"github.com/valkey-io/valkey-go/internal/cmds"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion om/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package om
import (
"testing"

"github.com/rueian/valkey-go"
"github.com/valkey-io/valkey-go"
)

func setup(t *testing.T) valkey.Client {
Expand Down
4 changes: 2 additions & 2 deletions pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"sync/atomic"
"time"

"github.com/rueian/valkey-go/internal/cmds"
"github.com/rueian/valkey-go/internal/util"
"github.com/valkey-io/valkey-go/internal/cmds"
"github.com/valkey-io/valkey-go/internal/util"
)

const LibName = "valkey"
Expand Down
2 changes: 1 addition & 1 deletion pipe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"testing"
"time"

"github.com/rueian/valkey-go/internal/cmds"
"github.com/valkey-io/valkey-go/internal/cmds"
)

type valkeyExpect struct {
Expand Down
2 changes: 1 addition & 1 deletion ring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/rueian/valkey-go/internal/cmds"
"github.com/valkey-io/valkey-go/internal/cmds"
)

//gocyclo:ignore
Expand Down
Loading

0 comments on commit 0eb298b

Please sign in to comment.