From d2dd16019456c1ae927ad332a01ea87e10c9d58f Mon Sep 17 00:00:00 2001 From: scott lewis Date: Sun, 12 Dec 2021 20:05:55 +0800 Subject: [PATCH] rename kylin to arana --- .github/workflows/github-actions.yml | 2 +- .github/workflows/release.yml | 4 +-- README.md | 2 +- cmd/cmd.go | 26 +++++++++---------- docker/Dockerfile | 2 +- docker/conf/config.yaml | 2 +- docker/docker-compose.yaml | 10 +++---- go.mod | 2 +- makefile | 4 +-- pkg/config/config.go | 2 +- pkg/executor/redirect.go | 10 +++---- pkg/mysql/auth.go | 6 ++--- pkg/mysql/client.go | 10 +++---- pkg/mysql/conn.go | 8 +++--- pkg/mysql/errors/sql_error.go | 2 +- pkg/mysql/fields.go | 2 +- pkg/mysql/result.go | 2 +- pkg/mysql/rows.go | 6 ++--- pkg/mysql/server.go | 10 +++---- pkg/mysql/utils.go | 2 +- pkg/proto/data.go | 2 +- pkg/proto/interface.go | 2 +- pkg/resource/data_source.go | 4 +-- pkg/server/server.go | 2 +- third_party/pools/numbered.go | 2 +- third_party/pools/resource_pool.go | 4 +-- third_party/pools/resource_pool_flaky_test.go | 2 +- third_party/sync2/consolidator.go | 2 +- third_party/timer/timer.go | 2 +- 29 files changed, 68 insertions(+), 68 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 6ab60f6e..c6c15ed4 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -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. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 488727a4..0eb2e08a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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" diff --git a/README.md b/README.md index ded319ca..dd850c1a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# kylin +# arana hello, db. diff --git a/cmd/cmd.go b/cmd/cmd.go index 50ee4524..3c288456 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -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 ( @@ -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) @@ -73,9 +73,9 @@ var ( } return collector.NewBackendConnection }) - kylin := server.NewServer() - kylin.AddListener(listener) - kylin.Start() + arana := server.NewServer() + arana.AddListener(listener) + arana.Start() }, } ) diff --git a/docker/Dockerfile b/docker/Dockerfile index 82dbae06..540b158f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,4 +4,4 @@ WORKDIR app COPY dist/ . -CMD ["./kylin", "start", "-c", "config.yaml"] \ No newline at end of file +CMD ["./arana", "start", "-c", "config.yaml"] \ No newline at end of file diff --git a/docker/conf/config.yaml b/docker/conf/config.yaml index 1d50f5ed..0f039757 100644 --- a/docker/conf/config.yaml +++ b/docker/conf/config.yaml @@ -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 \ No newline at end of file + dsn: root:123456@tcp(arana-mysql:3306)/employees?timeout=1s&readTimeout=1s&writeTimeout=1s&parseTime=true&loc=Local&charset=utf8mb4,utf8 \ No newline at end of file diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 55bac89f..76453897 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -2,7 +2,7 @@ version: "2.3" services: mysql: image: mysql:8.0 - container_name: kylin-mysql + container_name: arana-mysql networks: - local ports: @@ -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: diff --git a/go.mod b/go.mod index dcd9aeda..08756511 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/dubbogo/kylin +module github.com/dubbogo/arana go 1.16 diff --git a/makefile b/makefile index 7fc0ea17..42dfd4e6 100644 --- a/makefile +++ b/makefile @@ -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 diff --git a/pkg/config/config.go b/pkg/config/config.go index bc44c312..3206ce1e 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -36,7 +36,7 @@ import ( ) import ( - "github.com/dubbogo/kylin/pkg/util/log" + "github.com/dubbogo/arana/pkg/util/log" ) type Configuration struct { diff --git a/pkg/executor/redirect.go b/pkg/executor/redirect.go index 1166b930..867e99ce 100644 --- a/pkg/executor/redirect.go +++ b/pkg/executor/redirect.go @@ -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 { diff --git a/pkg/mysql/auth.go b/pkg/mysql/auth.go index b52d03e8..db35c5eb 100644 --- a/pkg/mysql/auth.go +++ b/pkg/mysql/auth.go @@ -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 diff --git a/pkg/mysql/client.go b/pkg/mysql/client.go index 6ca4e3f0..2df6eddc 100644 --- a/pkg/mysql/client.go +++ b/pkg/mysql/client.go @@ -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 { diff --git a/pkg/mysql/conn.go b/pkg/mysql/conn.go index eb58d025..8f77122a 100644 --- a/pkg/mysql/conn.go +++ b/pkg/mysql/conn.go @@ -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 ( diff --git a/pkg/mysql/errors/sql_error.go b/pkg/mysql/errors/sql_error.go index da33b956..c8cb9b27 100644 --- a/pkg/mysql/errors/sql_error.go +++ b/pkg/mysql/errors/sql_error.go @@ -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 diff --git a/pkg/mysql/fields.go b/pkg/mysql/fields.go index d80dc856..0a88ad39 100644 --- a/pkg/mysql/fields.go +++ b/pkg/mysql/fields.go @@ -25,7 +25,7 @@ import ( ) import ( - "github.com/dubbogo/kylin/pkg/constants/mysql" + "github.com/dubbogo/arana/pkg/constants/mysql" ) var ( diff --git a/pkg/mysql/result.go b/pkg/mysql/result.go index 7437cbf1..00c006e9 100644 --- a/pkg/mysql/result.go +++ b/pkg/mysql/result.go @@ -20,7 +20,7 @@ package mysql import ( - "github.com/dubbogo/kylin/pkg/proto" + "github.com/dubbogo/arana/pkg/proto" ) type Result struct { diff --git a/pkg/mysql/rows.go b/pkg/mysql/rows.go index 8138fa3c..a4ec07b9 100644 --- a/pkg/mysql/rows.go +++ b/pkg/mysql/rows.go @@ -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 { diff --git a/pkg/mysql/server.go b/pkg/mysql/server.go index 3553e9ab..945b5e43 100644 --- a/pkg/mysql/server.go +++ b/pkg/mysql/server.go @@ -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 diff --git a/pkg/mysql/utils.go b/pkg/mysql/utils.go index 5ce788cc..86ae5ab6 100644 --- a/pkg/mysql/utils.go +++ b/pkg/mysql/utils.go @@ -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 diff --git a/pkg/proto/data.go b/pkg/proto/data.go index e4d5c3be..f2c78661 100644 --- a/pkg/proto/data.go +++ b/pkg/proto/data.go @@ -24,7 +24,7 @@ import ( ) import ( - "github.com/dubbogo/kylin/pkg/constants/mysql" + "github.com/dubbogo/arana/pkg/constants/mysql" ) type ( diff --git a/pkg/proto/interface.go b/pkg/proto/interface.go index 5fbf7732..da30540f 100644 --- a/pkg/proto/interface.go +++ b/pkg/proto/interface.go @@ -24,7 +24,7 @@ import ( ) import ( - "github.com/dubbogo/kylin/third_party/pools" + "github.com/dubbogo/arana/third_party/pools" ) type ( diff --git a/pkg/resource/data_source.go b/pkg/resource/data_source.go index 0694924b..db7c1058 100644 --- a/pkg/resource/data_source.go +++ b/pkg/resource/data_source.go @@ -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 diff --git a/pkg/server/server.go b/pkg/server/server.go index 518951d8..85da2608 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -20,7 +20,7 @@ package server import ( - "github.com/dubbogo/kylin/pkg/proto" + "github.com/dubbogo/arana/pkg/proto" ) type Server struct { diff --git a/third_party/pools/numbered.go b/third_party/pools/numbered.go index 9f4fa322..0b465442 100644 --- a/third_party/pools/numbered.go +++ b/third_party/pools/numbered.go @@ -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. diff --git a/third_party/pools/resource_pool.go b/third_party/pools/resource_pool.go index 8f0cc9d2..325c0788 100644 --- a/third_party/pools/resource_pool.go +++ b/third_party/pools/resource_pool.go @@ -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 ( diff --git a/third_party/pools/resource_pool_flaky_test.go b/third_party/pools/resource_pool_flaky_test.go index 99ac33ab..6663a04e 100644 --- a/third_party/pools/resource_pool_flaky_test.go +++ b/third_party/pools/resource_pool_flaky_test.go @@ -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 diff --git a/third_party/sync2/consolidator.go b/third_party/sync2/consolidator.go index 7822d821..3f49756e 100644 --- a/third_party/sync2/consolidator.go +++ b/third_party/sync2/consolidator.go @@ -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 diff --git a/third_party/timer/timer.go b/third_party/timer/timer.go index 36e1bb93..3017cd95 100644 --- a/third_party/timer/timer.go +++ b/third_party/timer/timer.go @@ -42,7 +42,7 @@ import ( ) import ( - "github.com/dubbogo/kylin/third_party/sync2" + "github.com/dubbogo/arana/third_party/sync2" ) // Out-of-band messages