Skip to content

Commit

Permalink
Migrate go mod and badges
Browse files Browse the repository at this point in the history
We are migrating the repository from https://github.com/KaymeKaydex/go-vshard-router, which requires migrating badges and go.mod
  • Loading branch information
KaymeKaydex authored Dec 23, 2024
2 parents 84f7c54 + 42f3637 commit 249e9ba
Show file tree
Hide file tree
Showing 30 changed files with 58 additions and 58 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<img align="right" width="159px" src="docs/static/logo.png" alt="логотип go vshard router">

[![Go Reference](https://pkg.go.dev/badge/github.com/KaymeKaydex/go-vshard-router.svg)](https://pkg.go.dev/github.com/KaymeKaydex/go-vshard-router)
[![Go Reference](https://pkg.go.dev/badge/github.com/tarantool/go-vshard-router.svg)](https://pkg.go.dev/github.com/tarantool/go-vshard-router)
[![Actions Status][actions-badge]][actions-url]
[![Go Report Card](https://goreportcard.com/badge/github.com/KaymeKaydex/go-vshard-router)](https://goreportcard.com/report/github.com/KaymeKaydex/go-vshard-router)
[![Go Report Card](https://goreportcard.com/badge/github.com/tarantool/go-vshard-router)](https://goreportcard.com/report/github.com/tarantool/go-vshard-router)
[![codecov](https://codecov.io/gh/KaymeKaydex/go-vshard-router/graph/badge.svg?token=WLRWE97IT1)](https://codecov.io/gh/KaymeKaydex/go-vshard-router)
[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/KaymeKaydex/go-vshard-router/master/LICENSE)

Translations:
- [Русский](https://github.com/KaymeKaydex/go-vshard-router/blob/main/README_ru.md)
- [Русский](https://github.com/tarantool/go-vshard-router/blob/main/README_ru.md)


go-vshard-router is a library for sending requests to a sharded tarantool cluster directly,
Expand Down Expand Up @@ -71,14 +71,14 @@ graph TD
With [Go module](https://github.com/golang/go/wiki/Modules) support, simply add the following import

```
import "github.com/KaymeKaydex/go-vshard-router"
import "github.com/tarantool/go-vshard-router"
```
to your code, and then `go [build|run|test]` will automatically fetch the necessary dependencies.

Otherwise, run the following Go command to install the `go-vshard-router` package:

```sh
$ go get -u github.com/KaymeKaydex/go-vshard-router
$ go get -u github.com/tarantool/go-vshard-router
```

### Running Go-Vshard-Router
Expand All @@ -94,8 +94,8 @@ import (
"strconv"
"time"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
"github.com/KaymeKaydex/go-vshard-router/providers/static"
vshardrouter "github.com/tarantool/go-vshard-router"
"github.com/tarantool/go-vshard-router/providers/static"

"github.com/google/uuid"
"github.com/tarantool/go-tarantool/v2"
Expand Down Expand Up @@ -215,5 +215,5 @@ at a load close to production
![Image alt](docs/static/not-direct.png)


[actions-badge]: https://github.com/KaymeKaydex/go-vshard-router/actions/workflows/main.yml/badge.svg
[actions-url]: https://github.com/KaymeKaydex/go-vshard-router/actions/workflows/main.yml
[actions-badge]: https://github.com/tarantool/go-vshard-router/actions/workflows/main.yml/badge.svg
[actions-url]: https://github.com/tarantool/go-vshard-router/actions/workflows/main.yml
18 changes: 9 additions & 9 deletions README_ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<img align="right" width="159px" src="docs/static/logo.png" alt="go vshard router logo">

[![Go Reference](https://pkg.go.dev/badge/github.com/KaymeKaydex/go-vshard-router.svg)](https://pkg.go.dev/github.com/KaymeKaydex/go-vshard-router)
[![Go Reference](https://pkg.go.dev/badge/github.com/tarantool/go-vshard-router.svg)](https://pkg.go.dev/github.com/tarantool/go-vshard-router)
[![Actions Status][actions-badge]][actions-url]
[![Go Report Card](https://goreportcard.com/badge/github.com/KaymeKaydex/go-vshard-router)](https://goreportcard.com/report/github.com/KaymeKaydex/go-vshard-router)
[![Go Report Card](https://goreportcard.com/badge/github.com/tarantool/go-vshard-router)](https://goreportcard.com/report/github.com/tarantool/go-vshard-router)
[![codecov](https://codecov.io/gh/KaymeKaydex/go-vshard-router/graph/badge.svg?token=WLRWE97IT1)](https://codecov.io/gh/KaymeKaydex/go-vshard-router)

Translations:
- [English](https://github.com/KaymeKaydex/go-vshard-router/blob/main/README.md)
- [English](https://github.com/tarantool/go-vshard-router/blob/main/README.md)

go-vshard-router — библиотека для отправки запросов напрямую в стораджа в шардированный кластер tarantool,
без использования tarantool-router. Эта библиотека написана на основе [модуля библиотеки tarantool vhsard router](https://github.com/tarantool/vshard/blob/master/vshard/router/init.lua). go-vshard-router применяет новый подход к созданию кластера
Expand Down Expand Up @@ -70,14 +70,14 @@ graph TD
С помощью [Go module](https://github.com/golang/go/wiki/Modules) можно добавить следующий импорт

```
import "github.com/KaymeKaydex/go-vshard-router"
import "github.com/tarantool/go-vshard-router"
```
в ваш код, а затем `go [build|run|test]` автоматически получит необходимые зависимости.


В противном случае выполните следующую команду Go, чтобы установить пакет go-vshard-router:
```sh
$ go get -u github.com/KaymeKaydex/go-vshard-router
$ go get -u github.com/tarantool/go-vshard-router
```

### Использование Go-Vshard-Router
Expand All @@ -93,8 +93,8 @@ import (
"strconv"
"time"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
"github.com/KaymeKaydex/go-vshard-router/providers/static"
vshardrouter "github.com/tarantool/go-vshard-router"
"github.com/tarantool/go-vshard-router/providers/static"

"github.com/google/uuid"
"github.com/tarantool/go-tarantool/v2"
Expand Down Expand Up @@ -216,5 +216,5 @@ func main() {
![Image alt](docs/static/not-direct.png)


[actions-badge]: https://github.com/KaymeKaydex/go-vshard-router/actions/workflows/main.yml/badge.svg
[actions-url]: https://github.com/KaymeKaydex/go-vshard-router/actions/workflows/main.yml
[actions-badge]: https://github.com/tarantool/go-vshard-router/actions/workflows/main.yml/badge.svg
[actions-url]: https://github.com/tarantool/go-vshard-router/actions/workflows/main.yml
2 changes: 1 addition & 1 deletion api.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func (r VshardRouterCallResp) GetTyped(result []interface{}) error {
// RouterCallImpl Perform shard operation function will restart operation
// after wrong bucket response until timeout is reached
// Deprecated: RouterCallImpl is deprecated.
// See https://github.com/KaymeKaydex/go-vshard-router/issues/110.
// See https://github.com/tarantool/go-vshard-router/issues/110.
// Use Call method with RO, RW, RE, BRO, BRE modes instead.
func (r *Router) RouterCallImpl(ctx context.Context,
bucketID uint64,
Expand Down
2 changes: 1 addition & 1 deletion api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"testing"
"time"

mockpool "github.com/KaymeKaydex/go-vshard-router/mocks/pool"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"github.com/tarantool/go-tarantool/v2"
mockpool "github.com/tarantool/go-vshard-router/mocks/pool"
)

var emptyRouter = &Router{
Expand Down
4 changes: 2 additions & 2 deletions examples/customer/go-service/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module customer
go 1.22.2

require (
github.com/KaymeKaydex/go-vshard-router v0.0.9
github.com/tarantool/go-vshard-router v0.0.9
github.com/google/uuid v1.6.0
github.com/spf13/viper v1.18.2
github.com/swaggo/swag v1.16.3
Expand Down Expand Up @@ -49,4 +49,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/KaymeKaydex/go-vshard-router v0.0.9 => ../../../
replace github.com/tarantool/go-vshard-router v0.0.9 => ../../../
4 changes: 2 additions & 2 deletions examples/customer/go-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"github.com/tarantool/go-tarantool/v2"
"github.com/tarantool/go-tarantool/v2/pool"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
"github.com/KaymeKaydex/go-vshard-router/providers/static"
vshardrouter "github.com/tarantool/go-vshard-router"
"github.com/tarantool/go-vshard-router/providers/static"
)

// @title Example customer service Swagger API
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/KaymeKaydex/go-vshard-router
module github.com/tarantool/go-vshard-router

go 1.20

Expand Down
2 changes: 1 addition & 1 deletion mocks/topology/topology_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion providers/etcd/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"path/filepath"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
"github.com/google/uuid"
vshardrouter "github.com/tarantool/go-vshard-router"
"go.etcd.io/etcd/client/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion providers/etcd/provider_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package etcd

import (
"fmt"
mocktopology "github.com/KaymeKaydex/go-vshard-router/mocks/topology"
mocktopology "github.com/tarantool/go-vshard-router/mocks/topology"
"go.etcd.io/etcd/client/v2"
"testing"
"time"
Expand Down
2 changes: 1 addition & 1 deletion providers/static/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/google/uuid"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
vshardrouter "github.com/tarantool/go-vshard-router"
)

// Check that provider implements TopologyProvider interface
Expand Down
2 changes: 1 addition & 1 deletion providers/static/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/google/uuid"
"github.com/stretchr/testify/require"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
vshardrouter "github.com/tarantool/go-vshard-router"
)

func TestNewProvider(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion providers/viper/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/google/uuid"
srcviper "github.com/spf13/viper"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
vshardrouter "github.com/tarantool/go-vshard-router"
)

// Check that provider implements TopologyProvider interface
Expand Down
2 changes: 1 addition & 1 deletion providers/viper/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/spf13/viper"
"github.com/stretchr/testify/require"

vprovider "github.com/KaymeKaydex/go-vshard-router/providers/viper"
vprovider "github.com/tarantool/go-vshard-router/providers/viper"
)

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

"github.com/stretchr/testify/require"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
vshardrouter "github.com/tarantool/go-vshard-router"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion replicaset.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func bucketStatWait(future *tarantool.Future) (BucketStatInfo, error) {
// link https://github.com/tarantool/vshard/blob/99ceaee014ea3a67424c2026545838e08d69b90c/vshard/replicaset.lua#L661
// Deprecated: ReplicaCall is deprecated,
// because looks like it has a little bit broken interface.
// See https://github.com/KaymeKaydex/go-vshard-router/issues/42.
// See https://github.com/tarantool/go-vshard-router/issues/42.
// Use CallAsync instead.
func (rs *Replicaset) ReplicaCall(
ctx context.Context,
Expand Down
2 changes: 1 addition & 1 deletion replicaset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/tarantool/go-tarantool/v2"
"github.com/vmihailenco/msgpack/v5"

mockpool "github.com/KaymeKaydex/go-vshard-router/mocks/pool"
mockpool "github.com/tarantool/go-vshard-router/mocks/pool"
)

func TestReplicasetInfo_String(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions tarantool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"testing"
"time"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
"github.com/KaymeKaydex/go-vshard-router/providers/static"
chelper "github.com/KaymeKaydex/go-vshard-router/test_helper"
"github.com/google/uuid"
"github.com/stretchr/testify/require"
"github.com/tarantool/go-tarantool/v2"
"github.com/tarantool/go-tarantool/v2/pool"
"github.com/tarantool/go-tarantool/v2/test_helpers"
vshardrouter "github.com/tarantool/go-vshard-router"
"github.com/tarantool/go-vshard-router/providers/static"
chelper "github.com/tarantool/go-vshard-router/test_helper"
)

const instancesCount = 4
Expand Down
4 changes: 2 additions & 2 deletions tests/tnt/call_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"testing"
"time"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
"github.com/KaymeKaydex/go-vshard-router/providers/static"
"github.com/google/uuid"
"github.com/stretchr/testify/require"
"github.com/tarantool/go-tarantool/v2"
"github.com/tarantool/go-tarantool/v2/pool"
vshardrouter "github.com/tarantool/go-vshard-router"
"github.com/tarantool/go-vshard-router/providers/static"
)

type Product struct {
Expand Down
2 changes: 1 addition & 1 deletion tests/tnt/cfgmaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package tnt
import (
"fmt"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
"github.com/google/uuid"
vshardrouter "github.com/tarantool/go-vshard-router"
)

type cfgmaker struct {
Expand Down
4 changes: 2 additions & 2 deletions tests/tnt/concurrent_topology_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"testing"
"time"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
"github.com/stretchr/testify/require"
vshardrouter "github.com/tarantool/go-vshard-router"
)

type concurrentTopologyProvider struct {
Expand All @@ -35,7 +35,7 @@ func (c *concurrentTopologyProvider) Init(tc vshardrouter.TopologyController) er
defer close(c.closed)
//nolint:errcheck
defer tc.AddReplicasets(ctx, removed)
// Hack until issue will be resolved: https://github.com/KaymeKaydex/go-vshard-router/issues/65
// Hack until issue will be resolved: https://github.com/tarantool/go-vshard-router/issues/65
// A little pause to let finish NewRouter() with no err
time.Sleep(2 * time.Second)

Expand Down
4 changes: 2 additions & 2 deletions tests/tnt/discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"testing"
"time"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
"github.com/KaymeKaydex/go-vshard-router/providers/static"
"github.com/stretchr/testify/require"
vshardrouter "github.com/tarantool/go-vshard-router"
"github.com/tarantool/go-vshard-router/providers/static"
)

func TestBucketDiscovery(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions tests/tnt/replicaset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"testing"
"time"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
"github.com/KaymeKaydex/go-vshard-router/providers/static"
"github.com/stretchr/testify/require"
"github.com/tarantool/go-tarantool/v2"
"github.com/tarantool/go-tarantool/v2/pool"
vshardrouter "github.com/tarantool/go-vshard-router"
"github.com/tarantool/go-vshard-router/providers/static"
)

func TestReplicasetReplicaCall(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions tests/tnt/router_call_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"testing"
"time"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
"github.com/KaymeKaydex/go-vshard-router/providers/static"
"github.com/stretchr/testify/require"
"github.com/tarantool/go-tarantool/v2/pool"
vshardrouter "github.com/tarantool/go-vshard-router"
"github.com/tarantool/go-vshard-router/providers/static"
)

func TestRouterCallProto(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions tests/tnt/routermap_call_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"testing"
"time"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
"github.com/KaymeKaydex/go-vshard-router/providers/static"
"github.com/stretchr/testify/require"
vshardrouter "github.com/tarantool/go-vshard-router"
"github.com/tarantool/go-vshard-router/providers/static"
)

func TestRouterMapCall(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion tests/tnt/tnt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strconv"
"testing"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
vshardrouter "github.com/tarantool/go-vshard-router"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions tests/tnt/topology_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"testing"
"time"

vshardrouter "github.com/KaymeKaydex/go-vshard-router"
"github.com/KaymeKaydex/go-vshard-router/providers/static"
"github.com/stretchr/testify/require"
vshardrouter "github.com/tarantool/go-vshard-router"
"github.com/tarantool/go-vshard-router/providers/static"
)

func TestTopology(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion topology_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"errors"
"testing"

mockpool "github.com/KaymeKaydex/go-vshard-router/mocks/pool"
"github.com/google/uuid"
"github.com/stretchr/testify/require"
mockpool "github.com/tarantool/go-vshard-router/mocks/pool"
)

func TestRouter_Topology(t *testing.T) {
Expand Down
Loading

0 comments on commit 249e9ba

Please sign in to comment.