Skip to content

Commit

Permalink
rename kylin to arana
Browse files Browse the repository at this point in the history
  • Loading branch information
dk-lockdown committed Dec 12, 2021
1 parent 3c5a879 commit d2dd160
Show file tree
Hide file tree
Showing 29 changed files with 68 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
run: echo Hello world ${{ secrets.PROXY_DING_TOKEN }} ${{ secrets.PROXY_DING_SIGN }}

# Because the contexts of push and PR are different, there are two Notify.
# Notifications are triggered only in the dubbogo/kylin repository.
# Notifications are triggered only in the dubbogo/arana repository.
- name: DingTalk Message Notify only Push
uses: ./.github/actions/actions-ding
# Whether job is successful or not, always () is always true.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ jobs:
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://golang.org/dl/go1.14.linux-amd64.tar.gz"
project_path: "./cmd/kylin"
binary_name: "dubbo-go-kylin"
project_path: "./cmd/arana"
binary_name: "dubbo-go-arana"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# kylin
# arana
hello, db.
26 changes: 13 additions & 13 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ import (
)

import (
"github.com/dubbogo/kylin/pkg/config"
"github.com/dubbogo/kylin/pkg/constants"
"github.com/dubbogo/kylin/pkg/executor"
"github.com/dubbogo/kylin/pkg/mysql"
"github.com/dubbogo/kylin/pkg/resource"
"github.com/dubbogo/kylin/pkg/server"
"github.com/dubbogo/kylin/third_party/pools"
"github.com/dubbogo/arana/pkg/config"
"github.com/dubbogo/arana/pkg/constants"
"github.com/dubbogo/arana/pkg/executor"
"github.com/dubbogo/arana/pkg/mysql"
"github.com/dubbogo/arana/pkg/resource"
"github.com/dubbogo/arana/pkg/server"
"github.com/dubbogo/arana/third_party/pools"
)

var (
Expand All @@ -48,14 +48,14 @@ var (

var (
rootCommand = &cobra.Command{
Use: "kylin",
Short: "kylin is a db proxy server",
Use: "arana",
Short: "arana is a db proxy server",
Version: Version,
}

startCommand = &cobra.Command{
Use: "start",
Short: "start kylin",
Short: "start arana",

Run: func(cmd *cobra.Command, args []string) {
conf := config.Load(configPath)
Expand All @@ -73,9 +73,9 @@ var (
}
return collector.NewBackendConnection
})
kylin := server.NewServer()
kylin.AddListener(listener)
kylin.Start()
arana := server.NewServer()
arana.AddListener(listener)
arana.Start()
},
}
)
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ WORKDIR app

COPY dist/ .

CMD ["./kylin", "start", "-c", "config.yaml"]
CMD ["./arana", "start", "-c", "config.yaml"]
2 changes: 1 addition & 1 deletion docker/conf/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ data_source_cluster:
max_capacity: 20
idle_timeout: 60s
conf:
dsn: root:123456@tcp(kylin-mysql:3306)/employees?timeout=1s&readTimeout=1s&writeTimeout=1s&parseTime=true&loc=Local&charset=utf8mb4,utf8
dsn: root:123456@tcp(arana-mysql:3306)/employees?timeout=1s&readTimeout=1s&writeTimeout=1s&parseTime=true&loc=Local&charset=utf8mb4,utf8
10 changes: 5 additions & 5 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2.3"
services:
mysql:
image: mysql:8.0
container_name: kylin-mysql
container_name: arana-mysql
networks:
- local
ports:
Expand All @@ -14,10 +14,10 @@ services:
- ./mysqld/:/var/run/mysqld:z
- ./scripts/:/docker-entrypoint-initdb.d/:rw
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
kylin:
image: kylin:latest
container_name: kylin
command: sh -c "sleep 30 && ./kylin start -c config.yaml"
arana:
image: arana:latest
container_name: arana
command: sh -c "sleep 30 && ./arana start -c config.yaml"
networks:
- local
ports:
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/dubbogo/kylin
module github.com/dubbogo/arana

go 1.16

Expand Down
4 changes: 2 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ unit-test:

build:
@mkdir -p dist
cd cmd && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ../dist/kylin
cd cmd && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ../dist/arana

docker-build: build
docker build -f docker/Dockerfile -t kylin:latest .
docker build -f docker/Dockerfile -t arana:latest .

integration-test: build docker-build
@mkdir -p docker/data
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
)

import (
"github.com/dubbogo/kylin/pkg/util/log"
"github.com/dubbogo/arana/pkg/util/log"
)

type Configuration struct {
Expand Down
10 changes: 5 additions & 5 deletions pkg/executor/redirect.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ import (
)

import (
"github.com/dubbogo/kylin/pkg/mysql"
"github.com/dubbogo/kylin/pkg/proto"
"github.com/dubbogo/kylin/pkg/resource"
"github.com/dubbogo/kylin/pkg/util/log"
"github.com/dubbogo/kylin/third_party/pools"
"github.com/dubbogo/arana/pkg/mysql"
"github.com/dubbogo/arana/pkg/proto"
"github.com/dubbogo/arana/pkg/resource"
"github.com/dubbogo/arana/pkg/util/log"
"github.com/dubbogo/arana/third_party/pools"
)

type RedirectExecutor struct {
Expand Down
6 changes: 3 additions & 3 deletions pkg/mysql/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ import (
)

import (
"github.com/dubbogo/kylin/pkg/constants/mysql"
err2 "github.com/dubbogo/kylin/pkg/mysql/errors"
"github.com/dubbogo/kylin/pkg/util/log"
"github.com/dubbogo/arana/pkg/constants/mysql"
err2 "github.com/dubbogo/arana/pkg/mysql/errors"
"github.com/dubbogo/arana/pkg/util/log"
)

// server pub keys registry
Expand Down
10 changes: 5 additions & 5 deletions pkg/mysql/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ import (
)

import (
"github.com/dubbogo/kylin/pkg/constants/mysql"
err2 "github.com/dubbogo/kylin/pkg/mysql/errors"
"github.com/dubbogo/kylin/pkg/proto"
"github.com/dubbogo/kylin/pkg/util/log"
"github.com/dubbogo/kylin/third_party/pools"
"github.com/dubbogo/arana/pkg/constants/mysql"
err2 "github.com/dubbogo/arana/pkg/mysql/errors"
"github.com/dubbogo/arana/pkg/proto"
"github.com/dubbogo/arana/pkg/util/log"
"github.com/dubbogo/arana/third_party/pools"
)

type Config struct {
Expand Down
8 changes: 4 additions & 4 deletions pkg/mysql/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ import (
)

import (
"github.com/dubbogo/kylin/pkg/constants/mysql"
err2 "github.com/dubbogo/kylin/pkg/mysql/errors"
"github.com/dubbogo/kylin/third_party/bucketpool"
"github.com/dubbogo/kylin/third_party/sync2"
"github.com/dubbogo/arana/pkg/constants/mysql"
err2 "github.com/dubbogo/arana/pkg/mysql/errors"
"github.com/dubbogo/arana/third_party/bucketpool"
"github.com/dubbogo/arana/third_party/sync2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/mysql/errors/sql_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
)

import (
"github.com/dubbogo/kylin/pkg/constants/mysql"
"github.com/dubbogo/arana/pkg/constants/mysql"
)

// SQLError is the error structure returned from calling a db library function
Expand Down
2 changes: 1 addition & 1 deletion pkg/mysql/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

import (
"github.com/dubbogo/kylin/pkg/constants/mysql"
"github.com/dubbogo/arana/pkg/constants/mysql"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/mysql/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package mysql

import (
"github.com/dubbogo/kylin/pkg/proto"
"github.com/dubbogo/arana/pkg/proto"
)

type Result struct {
Expand Down
6 changes: 3 additions & 3 deletions pkg/mysql/rows.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import (
)

import (
"github.com/dubbogo/kylin/pkg/constants/mysql"
"github.com/dubbogo/kylin/pkg/mysql/errors"
"github.com/dubbogo/kylin/pkg/proto"
"github.com/dubbogo/arana/pkg/constants/mysql"
"github.com/dubbogo/arana/pkg/mysql/errors"
"github.com/dubbogo/arana/pkg/proto"
)

type ResultSet struct {
Expand Down
10 changes: 5 additions & 5 deletions pkg/mysql/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ import (
)

import (
"github.com/dubbogo/kylin/pkg/config"
"github.com/dubbogo/kylin/pkg/constants/mysql"
"github.com/dubbogo/kylin/pkg/mysql/errors"
"github.com/dubbogo/kylin/pkg/proto"
"github.com/dubbogo/kylin/pkg/util/log"
"github.com/dubbogo/arana/pkg/config"
"github.com/dubbogo/arana/pkg/constants/mysql"
"github.com/dubbogo/arana/pkg/mysql/errors"
"github.com/dubbogo/arana/pkg/proto"
"github.com/dubbogo/arana/pkg/util/log"
)

const initClientConnStatus = mysql.ServerStatusAutocommit
Expand Down
2 changes: 1 addition & 1 deletion pkg/mysql/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
)

import (
"github.com/dubbogo/kylin/pkg/constants/mysql"
"github.com/dubbogo/arana/pkg/constants/mysql"
)

// Registry for custom tls.Configs
Expand Down
2 changes: 1 addition & 1 deletion pkg/proto/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

import (
"github.com/dubbogo/kylin/pkg/constants/mysql"
"github.com/dubbogo/arana/pkg/constants/mysql"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion pkg/proto/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

import (
"github.com/dubbogo/kylin/third_party/pools"
"github.com/dubbogo/arana/third_party/pools"
)

type (
Expand Down
4 changes: 2 additions & 2 deletions pkg/resource/data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
)

import (
"github.com/dubbogo/kylin/pkg/config"
"github.com/dubbogo/kylin/third_party/pools"
"github.com/dubbogo/arana/pkg/config"
"github.com/dubbogo/arana/third_party/pools"
)

var dataSourceManager *DataSourceManager
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package server

import (
"github.com/dubbogo/kylin/pkg/proto"
"github.com/dubbogo/arana/pkg/proto"
)

type Server struct {
Expand Down
2 changes: 1 addition & 1 deletion third_party/pools/numbered.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
)

import (
"github.com/dubbogo/kylin/third_party/cache"
"github.com/dubbogo/arana/third_party/cache"
)

// Numbered allows you to manage resources by tracking them with numbers.
Expand Down
4 changes: 2 additions & 2 deletions third_party/pools/resource_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ import (
)

import (
"github.com/dubbogo/kylin/third_party/sync2"
"github.com/dubbogo/kylin/third_party/timer"
"github.com/dubbogo/arana/third_party/sync2"
"github.com/dubbogo/arana/third_party/timer"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion third_party/pools/resource_pool_flaky_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import (
)

import (
"github.com/dubbogo/kylin/third_party/sync2"
"github.com/dubbogo/arana/third_party/sync2"
)

var lastID, count sync2.AtomicInt64
Expand Down
2 changes: 1 addition & 1 deletion third_party/sync2/consolidator.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
)

import (
"github.com/dubbogo/kylin/third_party/cache"
"github.com/dubbogo/arana/third_party/cache"
)

// Consolidator consolidates duplicate queries from executing simulaneously
Expand Down
2 changes: 1 addition & 1 deletion third_party/timer/timer.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
)

import (
"github.com/dubbogo/kylin/third_party/sync2"
"github.com/dubbogo/arana/third_party/sync2"
)

// Out-of-band messages
Expand Down

0 comments on commit d2dd160

Please sign in to comment.