Skip to content

Commit

Permalink
replace seata/seata-go
Browse files Browse the repository at this point in the history
  • Loading branch information
PangXing committed Jul 17, 2022
1 parent d7e79b9 commit 136f803
Show file tree
Hide file tree
Showing 79 changed files with 242 additions and 481 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ about: Create a report to help us improve
title: ''
---

- [ ] I have searched the [issues](https://github.com/transaction-wg/seata-golang/issues) of this repository and believe that this is not a duplicate.
- [ ] I have searched the [issues](https://github.com/seata/seata-go/issues) of this repository and believe that this is not a duplicate.

**Describe the bug**
A clear and concise description of what the bug is.
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ cmd/tc/cmd
cmd/tc/tc
cmd/tc/trace.out
log/
.vscode/
*.log
2 changes: 1 addition & 1 deletion cmd/profiles/dev/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ store_config:
db:
log_query_limit: 100
# 数据库seata创建脚本位于 `/scripts/server/db/` 下
dsn: "root:root@tcp(127.0.0.1:3306)/seata?timeout=1s&readTimeout=1s&writeTimeout=1s&parseTime=true&loc=Local&charset=utf8mb4,utf8"
dsn: "root:root@tcp(127.0.0.1:33306)/seata?timeout=1s&readTimeout=1s&writeTimeout=1s&parseTime=true&loc=Local&charset=utf8mb4,utf8"

registry_config:
type: nacos
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/transaction-wg/seata-golang
module github.com/seata/seata-go

go 1.14
go 1.16

require (
github.com/apache/dubbo-getty v1.4.7
Expand Down
6 changes: 0 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40 h1:xvUo53O5MRZhVMJAxWCJcS5HHrqAiAG9SJ1LpMu6aAI=
github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
Expand All @@ -69,11 +68,8 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5 h1:xD/lrqdvwsc+O2bjSSi3YqY73Ke3LAiSCx49aCesA0E=
github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo=
github.com/cockroachdb/errors v1.2.4 h1:Lap807SXTH5tri2TivECb/4abUkMZC9zRoLarvcKDqs=
github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA=
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY=
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
Expand Down Expand Up @@ -131,7 +127,6 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/getsentry/raven-go v0.2.0 h1:no+xWJRb5ZI7eE8TWgIq1jLulQiIoLG0IfYxv5JYMGs=
github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
Expand Down Expand Up @@ -297,7 +292,6 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
Expand Down
2 changes: 1 addition & 1 deletion pkg/base/config_center/base_operate.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package config_center

import (
"github.com/transaction-wg/seata-golang/pkg/base/config"
"github.com/seata/seata-go/pkg/base/config"
)

// AddListener add config center listener
Expand Down
2 changes: 1 addition & 1 deletion pkg/base/config_center/config_center_factory.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package config_center

import (
"github.com/transaction-wg/seata-golang/pkg/base/config"
"github.com/seata/seata-go/pkg/base/config"
)

type DynamicConfigurationFactory interface {
Expand Down
15 changes: 5 additions & 10 deletions pkg/base/config_center/etcdv3/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,17 @@ package etcdv3
import (
"strings"
"sync"
)

import (
gxetcd "github.com/dubbogo/gost/database/kv/etcd/v3"

"github.com/seata/seata-go/pkg/base/config"
"github.com/seata/seata-go/pkg/base/config_center"
"github.com/seata/seata-go/pkg/base/constant"
"github.com/seata/seata-go/pkg/base/extension"
"github.com/seata/seata-go/pkg/util/log"
clientv3 "go.etcd.io/etcd/client/v3"
)

import (
"github.com/transaction-wg/seata-golang/pkg/base/config"
"github.com/transaction-wg/seata-golang/pkg/base/config_center"
"github.com/transaction-wg/seata-golang/pkg/base/constant"
"github.com/transaction-wg/seata-golang/pkg/base/extension"
"github.com/transaction-wg/seata-golang/pkg/util/log"
)

func init() {
extension.SetConfigCenter(constant.Etcdv3Key, newEtcdConfigCenter)
}
Expand Down
14 changes: 5 additions & 9 deletions pkg/base/config_center/nacos/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@ import (
"net"
"strconv"
"strings"
)

import (
"github.com/nacos-group/nacos-sdk-go/clients"
"github.com/nacos-group/nacos-sdk-go/clients/config_client"

nacosConstant "github.com/nacos-group/nacos-sdk-go/common/constant"
"github.com/nacos-group/nacos-sdk-go/vo"
)

import (
"github.com/transaction-wg/seata-golang/pkg/base/config"
"github.com/transaction-wg/seata-golang/pkg/base/config_center"
"github.com/transaction-wg/seata-golang/pkg/base/constant"
"github.com/transaction-wg/seata-golang/pkg/base/extension"
"github.com/seata/seata-go/pkg/base/config"
"github.com/seata/seata-go/pkg/base/config_center"
"github.com/seata/seata-go/pkg/base/constant"
"github.com/seata/seata-go/pkg/base/extension"
)

func init() {
Expand Down
9 changes: 2 additions & 7 deletions pkg/base/extension/config_center.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@ package extension

import (
"sync"
)

import (
"github.com/pkg/errors"
)

import (
"github.com/transaction-wg/seata-golang/pkg/base/config"
"github.com/transaction-wg/seata-golang/pkg/base/config_center"
"github.com/seata/seata-go/pkg/base/config"
"github.com/seata/seata-go/pkg/base/config_center"
)

var (
Expand Down
7 changes: 1 addition & 6 deletions pkg/base/extension/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@ package extension

import (
"sync"
)

import (
"github.com/pkg/errors"
)

import (
"github.com/transaction-wg/seata-golang/pkg/base/registry"
"github.com/seata/seata-go/pkg/base/registry"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/base/getty/message_future.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package getty

import (
"github.com/transaction-wg/seata-golang/pkg/base/protocal"
"github.com/seata/seata-go/pkg/base/protocal"
)

// MessageFuture ...
Expand Down
11 changes: 2 additions & 9 deletions pkg/base/getty/readwriter/readwriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,14 @@ package readwriter
import (
"bytes"
"encoding/binary"
)

import (
getty "github.com/apache/dubbo-getty"

"github.com/pkg/errors"

"github.com/seata/seata-go/pkg/base/protocal"
"github.com/seata/seata-go/pkg/base/protocal/codec"
"vimagination.zapto.org/byteio"
)

import (
"github.com/transaction-wg/seata-golang/pkg/base/protocal"
"github.com/transaction-wg/seata-golang/pkg/base/protocal/codec"
)

/**
* <pre>
* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Expand Down
2 changes: 1 addition & 1 deletion pkg/base/model/resource.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package model

import (
"github.com/transaction-wg/seata-golang/pkg/base/meta"
"github.com/seata/seata-go/pkg/base/meta"
)

type IResource interface {
Expand Down
9 changes: 2 additions & 7 deletions pkg/base/protocal/codec/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@ package codec

import (
"bytes"
)

import (
"github.com/seata/seata-go/pkg/base/protocal"
"github.com/seata/seata-go/pkg/util/log"
"vimagination.zapto.org/byteio"
)

import (
"github.com/transaction-wg/seata-golang/pkg/base/protocal"
"github.com/transaction-wg/seata-golang/pkg/util/log"
)

type SerializerType byte

const (
Expand Down
9 changes: 2 additions & 7 deletions pkg/base/protocal/codec/seata_decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@ package codec

import (
"bytes"
)

import (
"github.com/seata/seata-go/pkg/base/meta"
"github.com/seata/seata-go/pkg/base/protocal"
"vimagination.zapto.org/byteio"
)

import (
"github.com/transaction-wg/seata-golang/pkg/base/meta"
"github.com/transaction-wg/seata-golang/pkg/base/protocal"
)

func AbstractResultMessageDecoder(in []byte) (interface{}, int) {
var (
length16 uint16 = 0
Expand Down
9 changes: 2 additions & 7 deletions pkg/base/protocal/codec/seata_encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@ package codec

import (
"bytes"
)

import (
"github.com/seata/seata-go/pkg/base/protocal"
"github.com/seata/seata-go/pkg/util/log"
"vimagination.zapto.org/byteio"
)

import (
"github.com/transaction-wg/seata-golang/pkg/base/protocal"
"github.com/transaction-wg/seata-golang/pkg/util/log"
)

func AbstractResultMessageEncoder(in interface{}) []byte {
var (
zero16 int16 = 0
Expand Down
2 changes: 1 addition & 1 deletion pkg/base/protocal/transaction.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package protocal

import (
"github.com/transaction-wg/seata-golang/pkg/base/meta"
"github.com/seata/seata-go/pkg/base/meta"
)

type AbstractTransactionResponse struct {
Expand Down
16 changes: 6 additions & 10 deletions pkg/base/registry/etcdv3/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,19 @@ import (
"strings"
"sync"
"time"
)

import (
gxetcd "github.com/dubbogo/gost/database/kv/etcd/v3"

perrors "github.com/pkg/errors"

"github.com/seata/seata-go/pkg/base/config"
"github.com/seata/seata-go/pkg/base/constant"
"github.com/seata/seata-go/pkg/base/extension"
"github.com/seata/seata-go/pkg/base/registry"
clientv3 "go.etcd.io/etcd/client/v3"
)

import (
"github.com/transaction-wg/seata-golang/pkg/base/config"
"github.com/transaction-wg/seata-golang/pkg/base/constant"
"github.com/transaction-wg/seata-golang/pkg/base/extension"
"github.com/transaction-wg/seata-golang/pkg/base/registry"
utils "github.com/transaction-wg/seata-golang/pkg/util/etcdv3"
"github.com/transaction-wg/seata-golang/pkg/util/log"
utils "github.com/seata/seata-go/pkg/util/etcdv3"
"github.com/seata/seata-go/pkg/util/log"
)

func init() {
Expand Down
12 changes: 5 additions & 7 deletions pkg/base/registry/file/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ package file

import (
"strings"
)

import (
"github.com/transaction-wg/seata-golang/pkg/base/constant"
"github.com/transaction-wg/seata-golang/pkg/base/extension"
"github.com/transaction-wg/seata-golang/pkg/base/registry"
"github.com/transaction-wg/seata-golang/pkg/client/config"
"github.com/transaction-wg/seata-golang/pkg/util/log"
"github.com/seata/seata-go/pkg/base/constant"
"github.com/seata/seata-go/pkg/base/extension"
"github.com/seata/seata-go/pkg/base/registry"
"github.com/seata/seata-go/pkg/client/config"
"github.com/seata/seata-go/pkg/util/log"
)

func init() {
Expand Down
17 changes: 6 additions & 11 deletions pkg/base/registry/nacos/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,19 @@ import (
"net"
"strconv"
"strings"
)

import (
"github.com/nacos-group/nacos-sdk-go/clients"
"github.com/nacos-group/nacos-sdk-go/clients/naming_client"

nacosConstant "github.com/nacos-group/nacos-sdk-go/common/constant"
"github.com/nacos-group/nacos-sdk-go/model"
"github.com/nacos-group/nacos-sdk-go/vo"

"github.com/pkg/errors"
)

import (
"github.com/transaction-wg/seata-golang/pkg/base/config"
"github.com/transaction-wg/seata-golang/pkg/base/constant"
"github.com/transaction-wg/seata-golang/pkg/base/extension"
"github.com/transaction-wg/seata-golang/pkg/base/registry"
"github.com/transaction-wg/seata-golang/pkg/util/log"
"github.com/seata/seata-go/pkg/base/config"
"github.com/seata/seata-go/pkg/base/constant"
"github.com/seata/seata-go/pkg/base/extension"
"github.com/seata/seata-go/pkg/base/registry"
"github.com/seata/seata-go/pkg/util/log"
)

func init() {
Expand Down
17 changes: 5 additions & 12 deletions pkg/client/config/client_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,17 @@ import (
"io/ioutil"
"os"
"time"
)

import (
"github.com/creasty/defaults"

"github.com/imdario/mergo"

"github.com/seata/seata-go/pkg/base/config"
"github.com/seata/seata-go/pkg/base/config_center"
"github.com/seata/seata-go/pkg/base/extension"
"github.com/seata/seata-go/pkg/util/log"
"github.com/seata/seata-go/pkg/util/parser"
"gopkg.in/yaml.v2"
)

import (
"github.com/transaction-wg/seata-golang/pkg/base/config"
"github.com/transaction-wg/seata-golang/pkg/base/config_center"
"github.com/transaction-wg/seata-golang/pkg/base/extension"
"github.com/transaction-wg/seata-golang/pkg/util/log"
"github.com/transaction-wg/seata-golang/pkg/util/parser"
)

var clientConfig *ClientConfig

type ClientConfig struct {
Expand Down
Loading

0 comments on commit 136f803

Please sign in to comment.