Browse Source

Merge pull request #124 from dtm-labs/alpha

Rename yedf to dtm-labs
topic v1.7.3
yedf2 5 years ago
committed by GitHub
parent
commit
d65e489316
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      README-cn.md
  2. 14
      README-en.md
  3. 16
      README.md
  4. 12
      app/main.go
  5. 12
      bench/http.go
  6. 12
      bench/main.go
  7. 4
      common/config.go
  8. 2
      common/config_utils.go
  9. 6
      common/db.go
  10. 2
      common/types.go
  11. 2
      common/types_test.go
  12. 6
      common/utils.go
  13. 4
      dtmcli/barrier.go
  14. 2
      dtmcli/consts.go
  15. 2
      dtmcli/dtmimp/utils.go
  16. 2
      dtmcli/dtmimp/vars.go
  17. 2
      dtmcli/msg.go
  18. 2
      dtmcli/saga.go
  19. 2
      dtmcli/tcc.go
  20. 2
      dtmcli/types.go
  21. 2
      dtmcli/types_test.go
  22. 2
      dtmcli/xa.go
  23. 4
      dtmgrpc/barrier.go
  24. 6
      dtmgrpc/dtmgimp/grpc_clients.go
  25. 6
      dtmgrpc/dtmgimp/types.go
  26. 6
      dtmgrpc/dtmgimp/utils.go
  27. 6
      dtmgrpc/msg.go
  28. 4
      dtmgrpc/saga.go
  29. 8
      dtmgrpc/tcc.go
  30. 8
      dtmgrpc/type.go
  31. 2
      dtmgrpc/type_test.go
  32. 10
      dtmgrpc/xa.go
  33. 8
      dtmsvr/api.go
  34. 6
      dtmsvr/api_grpc.go
  35. 6
      dtmsvr/api_http.go
  36. 4
      dtmsvr/cron.go
  37. 8
      dtmsvr/storage/boltdb/boltdb.go
  38. 4
      dtmsvr/storage/boltdb/boltdb_test.go
  39. 8
      dtmsvr/storage/redis/redis.go
  40. 10
      dtmsvr/storage/registry/registry.go
  41. 6
      dtmsvr/storage/sql/sql.go
  42. 6
      dtmsvr/storage/trans.go
  43. 10
      dtmsvr/svr.go
  44. 6
      dtmsvr/svr_imports.go
  45. 10
      dtmsvr/trans_class.go
  46. 8
      dtmsvr/trans_process.go
  47. 10
      dtmsvr/trans_status.go
  48. 4
      dtmsvr/trans_type_msg.go
  49. 6
      dtmsvr/trans_type_saga.go
  50. 6
      dtmsvr/trans_type_tcc.go
  51. 4
      dtmsvr/trans_type_xa.go
  52. 8
      dtmsvr/utils.go
  53. 12
      examples/base_grpc.go
  54. 8
      examples/base_http.go
  55. 10
      examples/base_types.go
  56. 4
      examples/data.go
  57. 4
      examples/grpc_msg.go
  58. 4
      examples/grpc_saga.go
  59. 8
      examples/grpc_saga_barrier.go
  60. 4
      examples/grpc_tcc.go
  61. 4
      examples/grpc_xa.go
  62. 4
      examples/http_gorm_xa.go
  63. 4
      examples/http_msg.go
  64. 4
      examples/http_saga.go
  65. 8
      examples/http_saga_barrier.go
  66. 6
      examples/http_saga_gorm_barrier.go
  67. 6
      examples/http_tcc.go
  68. 8
      examples/http_tcc_barrier.go
  69. 6
      examples/http_xa.go
  70. 8
      examples/quick_start.go
  71. 10
      go.mod
  72. 23
      go.sum
  73. 8
      helper/sync-dtmcli.sh
  74. 2
      helper/test-cover.sh
  75. 4
      test/api_test.go
  76. 10
      test/base_test.go
  77. 10
      test/dtmsvr_test.go
  78. 2
      test/examples_test.go
  79. 8
      test/main_test.go
  80. 8
      test/msg_grpc_test.go
  81. 6
      test/msg_options_test.go
  82. 6
      test/msg_test.go
  83. 6
      test/saga_barrier_test.go
  84. 4
      test/saga_compatible_test.go
  85. 6
      test/saga_concurrent_test.go
  86. 6
      test/saga_grpc_barrier_test.go
  87. 8
      test/saga_grpc_test.go
  88. 6
      test/saga_options_test.go
  89. 6
      test/saga_test.go
  90. 6
      test/store_test.go
  91. 8
      test/tcc_barrier_test.go
  92. 6
      test/tcc_cover_test.go
  93. 6
      test/tcc_grpc_cover_test.go
  94. 10
      test/tcc_grpc_test.go
  95. 6
      test/tcc_test.go
  96. 10
      test/types.go
  97. 6
      test/xa_cover_test.go
  98. 6
      test/xa_grpc_test.go
  99. 6
      test/xa_test.go

16
README-cn.md

@ -1,8 +1,8 @@
![license](https://img.shields.io/github/license/yedf/dtm) ![license](https://img.shields.io/github/license/dtm-labs/dtm)
![Build Status](https://github.com/yedf/dtm/actions/workflows/tests.yml/badge.svg?branch=main) ![Build Status](https://github.com/dtm-labs/dtm/actions/workflows/tests.yml/badge.svg?branch=main)
[![codecov](https://codecov.io/gh/yedf/dtm/branch/main/graph/badge.svg?token=UKKEYQLP3F)](https://codecov.io/gh/yedf/dtm) [![codecov](https://codecov.io/gh/dtm-labs/dtm/branch/main/graph/badge.svg?token=UKKEYQLP3F)](https://codecov.io/gh/dtm-labs/dtm)
[![Go Report Card](https://goreportcard.com/badge/github.com/yedf/dtm)](https://goreportcard.com/report/github.com/yedf/dtm) [![Go Report Card](https://goreportcard.com/badge/github.com/dtm-labs/dtm)](https://goreportcard.com/report/github.com/dtm-labs/dtm)
[![Go Reference](https://pkg.go.dev/badge/github.com/yedf/dtm.svg)](https://pkg.go.dev/github.com/yedf/dtm) [![Go Reference](https://pkg.go.dev/badge/github.com/dtm-labs/dtm.svg)](https://pkg.go.dev/github.com/dtm-labs/dtm)
[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#database) [![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#database)
# [English Docs](https://en.dtm.pub) # [English Docs](https://en.dtm.pub)
@ -55,7 +55,7 @@ DTM是一款golang开发的分布式事务管理器,解决了跨数据库、
|事务消息|<span style="color:green">✓</span>|<span style="color:red">✗</span>|dtm提供类似rocketmq的事务消息| |事务消息|<span style="color:green">✓</span>|<span style="color:red">✗</span>|dtm提供类似rocketmq的事务消息|
|单服务多数据源|<span style="color:green">✓</span>|<span style="color:red">✗</span>|| |单服务多数据源|<span style="color:green">✓</span>|<span style="color:red">✗</span>||
|通信协议|HTTP、gRPC、go-zero|dubbo等协议|dtm对云原生更加友好| |通信协议|HTTP、gRPC、go-zero|dubbo等协议|dtm对云原生更加友好|
|star数量|<img src="https://img.shields.io/github/stars/yedf/dtm.svg?style=social" alt="github stars"/>|<img src="https://img.shields.io/github/stars/seata/seata.svg?style=social" alt="github stars"/>|dtm从20210604发布0.1,发展快| |star数量|<img src="https://img.shields.io/github/stars/dtm-labs/dtm.svg?style=social" alt="github stars"/>|<img src="https://img.shields.io/github/stars/seata/seata.svg?style=social" alt="github stars"/>|dtm从20210604发布0.1,发展快|
从上面对比的特性来看,如果您的语言栈包含了Java之外的语言,那么dtm是您的首选。如果您的语言栈是Java,您也可以选择接入dtm,使用子事务屏障技术,简化您的业务编写。 从上面对比的特性来看,如果您的语言栈包含了Java之外的语言,那么dtm是您的首选。如果您的语言栈是Java,您也可以选择接入dtm,使用子事务屏障技术,简化您的业务编写。
@ -75,7 +75,7 @@ DTM是一款golang开发的分布式事务管理器,解决了跨数据库、
### 获取代码 ### 获取代码
`git clone https://github.com/yedf/dtm && cd dtm` `git clone https://github.com/dtm-labs/dtm && cd dtm`
### dtm依赖于mysql ### dtm依赖于mysql
@ -126,7 +126,7 @@ DTM是一款golang开发的分布式事务管理器,解决了跨数据库、
![yedf2008](http://service.ivydad.com/cover/dubbingb6b5e2c0-2d2a-cd59-f7c5-c6b90aceb6f1.jpeg) ![yedf2008](http://service.ivydad.com/cover/dubbingb6b5e2c0-2d2a-cd59-f7c5-c6b90aceb6f1.jpeg)
欢迎使用[dtm](https://github.com/yedf/dtm),或者通过dtm学习实践分布式事务相关知识,欢迎star支持我们 欢迎使用[dtm](https://github.com/dtm-labs/dtm),或者通过dtm学习实践分布式事务相关知识,欢迎star支持我们
## 谁在使用 ## 谁在使用
<div style='vertical-align: middle'> <div style='vertical-align: middle'>

14
README-en.md

@ -1,8 +1,8 @@
![license](https://img.shields.io/github/license/yedf/dtm) ![license](https://img.shields.io/github/license/dtm-labs/dtm)
![Build Status](https://github.com/yedf/dtm/actions/workflows/tests.yml/badge.svg?branch=main) ![Build Status](https://github.com/dtm-labs/dtm/actions/workflows/tests.yml/badge.svg?branch=main)
[![codecov](https://codecov.io/gh/yedf/dtm/branch/main/graph/badge.svg?token=UKKEYQLP3F)](https://codecov.io/gh/yedf/dtm) [![codecov](https://codecov.io/gh/dtm-labs/dtm/branch/main/graph/badge.svg?token=UKKEYQLP3F)](https://codecov.io/gh/dtm-labs/dtm)
[![Go Report Card](https://goreportcard.com/badge/github.com/yedf/dtm)](https://goreportcard.com/report/github.com/yedf/dtm) [![Go Report Card](https://goreportcard.com/badge/github.com/dtm-labs/dtm)](https://goreportcard.com/report/github.com/dtm-labs/dtm)
[![Go Reference](https://pkg.go.dev/badge/github.com/yedf/dtm.svg)](https://pkg.go.dev/github.com/yedf/dtm) [![Go Reference](https://pkg.go.dev/badge/github.com/dtm-labs/dtm.svg)](https://pkg.go.dev/github.com/dtm-labs/dtm)
[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#database) [![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#database)
# [中文文档](http://dtm.pub) # [中文文档](http://dtm.pub)
@ -62,7 +62,7 @@ The following is a comparison of the main features of dtm and Seata.
| Transactional Messaging | <span style="color:green">✓</span> | <span style="color:red">✗</span> | dtm provides Transactional Messaging similar to RocketMQ | | Transactional Messaging | <span style="color:green">✓</span> | <span style="color:red">✗</span> | dtm provides Transactional Messaging similar to RocketMQ |
| Multiple DBs in a service |<span style="color:green">✓</span>|<span style="color:red">✗</span>|| | Multiple DBs in a service |<span style="color:green">✓</span>|<span style="color:red">✗</span>||
| Communication protocols | <span style="color:green">HTTP, gRPC</span> | <span style="color:green">Dubbo, no HTTP</span> | | | Communication protocols | <span style="color:green">HTTP, gRPC</span> | <span style="color:green">Dubbo, no HTTP</span> | |
| Star count | <img src="https://img.shields.io/github/stars/yedf/dtm.svg?style=social" alt="github stars"/> | <img src="https://img.shields.io/github/stars/seata/seata.svg?style=social" alt="github stars"/> | dtm 0.1 is released from 20210604 and under fast development | | Star count | <img src="https://img.shields.io/github/stars/dtm-labs/dtm.svg?style=social" alt="github stars"/> | <img src="https://img.shields.io/github/stars/seata/seata.svg?style=social" alt="github stars"/> | dtm 0.1 is released from 20210604 and under fast development |
From the features' comparison above, if your language stack includes languages other than Java, then dtm is the one for you. From the features' comparison above, if your language stack includes languages other than Java, then dtm is the one for you.
If your language stack is Java, you can also choose to access dtm and use sub-transaction barrier technology to simplify your business development. If your language stack is Java, you can also choose to access dtm and use sub-transaction barrier technology to simplify your business development.
@ -73,7 +73,7 @@ If your language stack is Java, you can also choose to access dtm and use sub-tr
### Install ### Install
`git clone https://github.com/yedf/dtm` `git clone https://github.com/dtm-labs/dtm`
### Configure Mysql ### Configure Mysql

16
README.md

@ -1,8 +1,8 @@
![license](https://img.shields.io/github/license/yedf/dtm) ![license](https://img.shields.io/github/license/dtm-labs/dtm)
![Build Status](https://github.com/yedf/dtm/actions/workflows/tests.yml/badge.svg?branch=main) ![Build Status](https://github.com/dtm-labs/dtm/actions/workflows/tests.yml/badge.svg?branch=main)
[![codecov](https://codecov.io/gh/yedf/dtm/branch/main/graph/badge.svg?token=UKKEYQLP3F)](https://codecov.io/gh/yedf/dtm) [![codecov](https://codecov.io/gh/dtm-labs/dtm/branch/main/graph/badge.svg?token=UKKEYQLP3F)](https://codecov.io/gh/dtm-labs/dtm)
[![Go Report Card](https://goreportcard.com/badge/github.com/yedf/dtm)](https://goreportcard.com/report/github.com/yedf/dtm) [![Go Report Card](https://goreportcard.com/badge/github.com/dtm-labs/dtm)](https://goreportcard.com/report/github.com/dtm-labs/dtm)
[![Go Reference](https://pkg.go.dev/badge/github.com/yedf/dtm.svg)](https://pkg.go.dev/github.com/yedf/dtm) [![Go Reference](https://pkg.go.dev/badge/github.com/dtm-labs/dtm.svg)](https://pkg.go.dev/github.com/dtm-labs/dtm)
[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#database) [![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#database)
# [English Docs](https://en.dtm.pub) # [English Docs](https://en.dtm.pub)
@ -55,7 +55,7 @@ DTM是一款golang开发的分布式事务管理器,解决了跨数据库、
|事务消息|<span style="color:green">✓</span>|<span style="color:red">✗</span>|dtm提供类似rocketmq的事务消息| |事务消息|<span style="color:green">✓</span>|<span style="color:red">✗</span>|dtm提供类似rocketmq的事务消息|
|单服务多数据源|<span style="color:green">✓</span>|<span style="color:red">✗</span>|| |单服务多数据源|<span style="color:green">✓</span>|<span style="color:red">✗</span>||
|通信协议|HTTP、gRPC、go-zero|dubbo等协议|dtm对云原生更加友好| |通信协议|HTTP、gRPC、go-zero|dubbo等协议|dtm对云原生更加友好|
|star数量|<img src="https://img.shields.io/github/stars/yedf/dtm.svg?style=social" alt="github stars"/>|<img src="https://img.shields.io/github/stars/seata/seata.svg?style=social" alt="github stars"/>|dtm从20210604发布0.1,发展快| |star数量|<img src="https://img.shields.io/github/stars/dtm-labs/dtm.svg?style=social" alt="github stars"/>|<img src="https://img.shields.io/github/stars/seata/seata.svg?style=social" alt="github stars"/>|dtm从20210604发布0.1,发展快|
从上面对比的特性来看,如果您的语言栈包含了Java之外的语言,那么dtm是您的首选。如果您的语言栈是Java,您也可以选择接入dtm,使用子事务屏障技术,简化您的业务编写。 从上面对比的特性来看,如果您的语言栈包含了Java之外的语言,那么dtm是您的首选。如果您的语言栈是Java,您也可以选择接入dtm,使用子事务屏障技术,简化您的业务编写。
@ -75,7 +75,7 @@ DTM是一款golang开发的分布式事务管理器,解决了跨数据库、
### 获取代码 ### 获取代码
`git clone https://github.com/yedf/dtm && cd dtm` `git clone https://github.com/dtm-labs/dtm && cd dtm`
### dtm依赖于mysql ### dtm依赖于mysql
@ -126,7 +126,7 @@ DTM是一款golang开发的分布式事务管理器,解决了跨数据库、
![yedf2008](http://service.ivydad.com/cover/dubbingb6b5e2c0-2d2a-cd59-f7c5-c6b90aceb6f1.jpeg) ![yedf2008](http://service.ivydad.com/cover/dubbingb6b5e2c0-2d2a-cd59-f7c5-c6b90aceb6f1.jpeg)
欢迎使用[dtm](https://github.com/yedf/dtm),或者通过dtm学习实践分布式事务相关知识,欢迎star支持我们 欢迎使用[dtm](https://github.com/dtm-labs/dtm),或者通过dtm学习实践分布式事务相关知识,欢迎star支持我们
## 谁在使用 ## 谁在使用
<div style='vertical-align: middle'> <div style='vertical-align: middle'>

12
app/main.go

@ -13,12 +13,12 @@ import (
_ "go.uber.org/automaxprocs" _ "go.uber.org/automaxprocs"
"github.com/yedf/dtm/common" "github.com/dtm-labs/dtm/common"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmsvr" "github.com/dtm-labs/dtm/dtmsvr"
"github.com/yedf/dtm/dtmsvr/storage/registry" "github.com/dtm-labs/dtm/dtmsvr/storage/registry"
"github.com/yedf/dtm/examples" "github.com/dtm-labs/dtm/examples"
) )
var Version, Commit, Date string var Version, Commit, Date string

12
bench/http.go

@ -13,13 +13,13 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/dtm-labs/dtm/common"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/dtm-labs/dtm/dtmsvr"
"github.com/dtm-labs/dtm/examples"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmsvr"
"github.com/yedf/dtm/examples"
) )
// launch command:go run app/main.go qs // launch command:go run app/main.go qs

12
bench/main.go

@ -4,12 +4,12 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/yedf/dtm/common" "github.com/dtm-labs/dtm/common"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmsvr" "github.com/dtm-labs/dtm/dtmsvr"
"github.com/yedf/dtm/dtmsvr/storage/registry" "github.com/dtm-labs/dtm/dtmsvr/storage/registry"
"github.com/yedf/dtm/examples" "github.com/dtm-labs/dtm/examples"
) )
var hint = `To start the bench server, you need to specify the parameters: var hint = `To start the bench server, you need to specify the parameters:

4
common/config.go

@ -6,8 +6,8 @@ import (
"io/ioutil" "io/ioutil"
"path/filepath" "path/filepath"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
) )

2
common/config_utils.go

@ -7,7 +7,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
) )
func loadFromEnv(prefix string, conf interface{}) { func loadFromEnv(prefix string, conf interface{}) {

6
common/db.go

@ -7,11 +7,11 @@ import (
"sync" "sync"
"time" "time"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmcli/logger"
_ "github.com/go-sql-driver/mysql" // register mysql driver _ "github.com/go-sql-driver/mysql" // register mysql driver
_ "github.com/lib/pq" // register postgres driver _ "github.com/lib/pq" // register postgres driver
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger"
"gorm.io/driver/mysql" "gorm.io/driver/mysql"
"gorm.io/driver/postgres" "gorm.io/driver/postgres"
"gorm.io/gorm" "gorm.io/gorm"

2
common/types.go

@ -10,8 +10,8 @@ import (
"fmt" "fmt"
"sync" "sync"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/go-redis/redis/v8" "github.com/go-redis/redis/v8"
"github.com/yedf/dtm/dtmcli/logger"
) )
var rdb *redis.Client var rdb *redis.Client

2
common/types_test.go

@ -9,8 +9,8 @@ package common
import ( import (
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli/dtmimp"
) )
func TestGeneralDB(t *testing.T) { func TestGeneralDB(t *testing.T) {

6
common/utils.go

@ -18,9 +18,9 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
) )
// GetGinApp init and return gin // GetGinApp init and return gin

4
dtmcli/barrier.go

@ -11,8 +11,8 @@ import (
"fmt" "fmt"
"net/url" "net/url"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
) )
// BarrierBusiFunc type for busi func // BarrierBusiFunc type for busi func

2
dtmcli/consts.go

@ -7,7 +7,7 @@
package dtmcli package dtmcli
import ( import (
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
) )
const ( const (

2
dtmcli/dtmimp/utils.go

@ -18,8 +18,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/yedf/dtm/dtmcli/logger"
) )
// Logf an alias of Infof // Logf an alias of Infof

2
dtmcli/dtmimp/vars.go

@ -9,8 +9,8 @@ package dtmimp
import ( import (
"errors" "errors"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/yedf/dtm/dtmcli/logger"
) )
// ErrFailure error of FAILURE // ErrFailure error of FAILURE

2
dtmcli/msg.go

@ -6,7 +6,7 @@
package dtmcli package dtmcli
import "github.com/yedf/dtm/dtmcli/dtmimp" import "github.com/dtm-labs/dtm/dtmcli/dtmimp"
// Msg reliable msg type // Msg reliable msg type
type Msg struct { type Msg struct {

2
dtmcli/saga.go

@ -7,7 +7,7 @@
package dtmcli package dtmcli
import ( import (
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
) )
// Saga struct of saga // Saga struct of saga

2
dtmcli/tcc.go

@ -10,8 +10,8 @@ import (
"fmt" "fmt"
"net/url" "net/url"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/yedf/dtm/dtmcli/dtmimp"
) )
// Tcc struct of tcc // Tcc struct of tcc

2
dtmcli/types.go

@ -9,7 +9,7 @@ package dtmcli
import ( import (
"fmt" "fmt"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
) )
// MustGenGid generate a new gid // MustGenGid generate a new gid

2
dtmcli/types_test.go

@ -10,8 +10,8 @@ import (
"net/url" "net/url"
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli/dtmimp"
) )
func TestTypes(t *testing.T) { func TestTypes(t *testing.T) {

2
dtmcli/xa.go

@ -11,8 +11,8 @@ import (
"fmt" "fmt"
"net/url" "net/url"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/yedf/dtm/dtmcli/dtmimp"
) )
// XaGlobalFunc type of xa global function // XaGlobalFunc type of xa global function

4
dtmgrpc/barrier.go

@ -9,8 +9,8 @@ package dtmgrpc
import ( import (
"context" "context"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/dtmgrpc/dtmgimp"
) )
// BarrierFromGrpc generate a Barrier from grpc context // BarrierFromGrpc generate a Barrier from grpc context

6
dtmgrpc/dtmgimp/grpc_clients.go

@ -10,9 +10,9 @@ import (
"fmt" "fmt"
"sync" "sync"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmgrpc/dtmgpb" "github.com/dtm-labs/dtm/dtmgrpc/dtmgpb"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
) )

6
dtmgrpc/dtmgimp/types.go

@ -11,9 +11,9 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
"google.golang.org/grpc/status" "google.golang.org/grpc/status"

6
dtmgrpc/dtmgimp/utils.go

@ -9,9 +9,9 @@ package dtmgimp
import ( import (
context "context" context "context"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmgrpc/dtmgpb" "github.com/dtm-labs/dtm/dtmgrpc/dtmgpb"
"google.golang.org/grpc/metadata" "google.golang.org/grpc/metadata"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
emptypb "google.golang.org/protobuf/types/known/emptypb" emptypb "google.golang.org/protobuf/types/known/emptypb"

6
dtmgrpc/msg.go

@ -7,9 +7,9 @@
package dtmgrpc package dtmgrpc
import ( import (
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/dtmgrpc/dtmgimp"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
) )

4
dtmgrpc/saga.go

@ -7,8 +7,8 @@
package dtmgrpc package dtmgrpc
import ( import (
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/dtmgrpc/dtmgimp"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
) )

8
dtmgrpc/tcc.go

@ -10,10 +10,10 @@ import (
context "context" context "context"
"fmt" "fmt"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/dtmgrpc/dtmgimp"
"github.com/yedf/dtm/dtmgrpc/dtmgpb" "github.com/dtm-labs/dtm/dtmgrpc/dtmgpb"
"github.com/yedf/dtmdriver" "github.com/dtm-labs/dtmdriver"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
) )

8
dtmgrpc/type.go

@ -9,10 +9,10 @@ package dtmgrpc
import ( import (
context "context" context "context"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/dtmgrpc/dtmgimp"
"github.com/yedf/dtmdriver" "github.com/dtm-labs/dtmdriver"
emptypb "google.golang.org/protobuf/types/known/emptypb" emptypb "google.golang.org/protobuf/types/known/emptypb"
) )

2
dtmgrpc/type_test.go

@ -10,8 +10,8 @@ import (
"context" "context"
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
) )
func TestType(t *testing.T) { func TestType(t *testing.T) {

10
dtmgrpc/xa.go

@ -11,11 +11,11 @@ import (
"database/sql" "database/sql"
"fmt" "fmt"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/dtmgrpc/dtmgimp"
"github.com/yedf/dtm/dtmgrpc/dtmgpb" "github.com/dtm-labs/dtm/dtmgrpc/dtmgpb"
"github.com/yedf/dtmdriver" "github.com/dtm-labs/dtmdriver"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
emptypb "google.golang.org/protobuf/types/known/emptypb" emptypb "google.golang.org/protobuf/types/known/emptypb"

8
dtmsvr/api.go

@ -9,10 +9,10 @@ package dtmsvr
import ( import (
"fmt" "fmt"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmsvr/storage" "github.com/dtm-labs/dtm/dtmsvr/storage"
) )
func svcSubmit(t *TransGlobal) (interface{}, error) { func svcSubmit(t *TransGlobal) (interface{}, error) {

6
dtmsvr/api_grpc.go

@ -9,9 +9,9 @@ package dtmsvr
import ( import (
"context" "context"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/dtmgrpc/dtmgimp"
pb "github.com/yedf/dtm/dtmgrpc/dtmgpb" pb "github.com/dtm-labs/dtm/dtmgrpc/dtmgpb"
"google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/emptypb"
) )

6
dtmsvr/api_http.go

@ -9,11 +9,11 @@ package dtmsvr
import ( import (
"errors" "errors"
"github.com/dtm-labs/dtm/common"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
) )
func addRoute(engine *gin.Engine) { func addRoute(engine *gin.Engine) {

4
dtmsvr/cron.go

@ -12,8 +12,8 @@ import (
"runtime/debug" "runtime/debug"
"time" "time"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
) )
// NowForwardDuration will be set in test, trans may be timeout // NowForwardDuration will be set in test, trans may be timeout

8
dtmsvr/storage/boltdb/boltdb.go

@ -9,10 +9,10 @@ import (
bolt "go.etcd.io/bbolt" bolt "go.etcd.io/bbolt"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/yedf/dtm/common" "github.com/dtm-labs/dtm/common"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmsvr/storage" "github.com/dtm-labs/dtm/dtmsvr/storage"
) )
var config = &common.Config var config = &common.Config

4
dtmsvr/storage/boltdb/boltdb_test.go

@ -8,8 +8,8 @@ import (
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
bolt "go.etcd.io/bbolt" bolt "go.etcd.io/bbolt"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmsvr/storage" "github.com/dtm-labs/dtm/dtmsvr/storage"
) )
func TestInitializeBuckets(t *testing.T) { func TestInitializeBuckets(t *testing.T) {

8
dtmsvr/storage/redis/redis.go

@ -8,10 +8,10 @@ import (
"github.com/go-redis/redis/v8" "github.com/go-redis/redis/v8"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/yedf/dtm/common" "github.com/dtm-labs/dtm/common"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmsvr/storage" "github.com/dtm-labs/dtm/dtmsvr/storage"
) )
var config = &common.Config var config = &common.Config

10
dtmsvr/storage/registry/registry.go

@ -3,11 +3,11 @@ package registry
import ( import (
"time" "time"
"github.com/yedf/dtm/common" "github.com/dtm-labs/dtm/common"
"github.com/yedf/dtm/dtmsvr/storage" "github.com/dtm-labs/dtm/dtmsvr/storage"
"github.com/yedf/dtm/dtmsvr/storage/boltdb" "github.com/dtm-labs/dtm/dtmsvr/storage/boltdb"
"github.com/yedf/dtm/dtmsvr/storage/redis" "github.com/dtm-labs/dtm/dtmsvr/storage/redis"
"github.com/yedf/dtm/dtmsvr/storage/sql" "github.com/dtm-labs/dtm/dtmsvr/storage/sql"
) )
var config = &common.Config var config = &common.Config

6
dtmsvr/storage/sql/sql.go

@ -9,9 +9,9 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"gorm.io/gorm/clause" "gorm.io/gorm/clause"
"github.com/yedf/dtm/common" "github.com/dtm-labs/dtm/common"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmsvr/storage" "github.com/dtm-labs/dtm/dtmsvr/storage"
) )
var config = &common.Config var config = &common.Config

6
dtmsvr/storage/trans.go

@ -3,9 +3,9 @@ package storage
import ( import (
"time" "time"
"github.com/yedf/dtm/common" "github.com/dtm-labs/dtm/common"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
) )
type TransGlobalStore struct { type TransGlobalStore struct {

10
dtmsvr/svr.go

@ -11,12 +11,12 @@ import (
"net" "net"
"time" "time"
"github.com/dtm-labs/dtm/common"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/dtm-labs/dtm/dtmgrpc/dtmgimp"
"github.com/dtm-labs/dtm/dtmgrpc/dtmgpb"
"github.com/dtm-labs/dtmdriver"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmgrpc/dtmgimp"
"github.com/yedf/dtm/dtmgrpc/dtmgpb"
"github.com/yedf/dtmdriver"
"google.golang.org/grpc" "google.golang.org/grpc"
) )

6
dtmsvr/svr_imports.go

@ -1,7 +1,7 @@
package dtmsvr package dtmsvr
import ( import (
_ "github.com/ychensha/dtmdriver-polaris" _ "github.com/dtm-labs/dtmdriver-gozero"
_ "github.com/yedf/dtmdriver-gozero" _ "github.com/dtm-labs/dtmdriver-polaris"
_ "github.com/yedf/dtmdriver-protocol1" _ "github.com/dtm-labs/dtmdriver-protocol1"
) )

10
dtmsvr/trans_class.go

@ -9,12 +9,12 @@ package dtmsvr
import ( import (
"time" "time"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/dtm-labs/dtm/dtmgrpc/dtmgpb"
"github.com/dtm-labs/dtm/dtmsvr/storage"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmgrpc/dtmgpb"
"github.com/yedf/dtm/dtmsvr/storage"
) )
// TransGlobal global transaction // TransGlobal global transaction

8
dtmsvr/trans_process.go

@ -9,10 +9,10 @@ package dtmsvr
import ( import (
"time" "time"
"github.com/yedf/dtm/common" "github.com/dtm-labs/dtm/common"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
) )
// Process process global transaction once // Process process global transaction once

10
dtmsvr/trans_status.go

@ -11,11 +11,11 @@ import (
"strings" "strings"
"time" "time"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/dtmgrpc/dtmgimp"
"github.com/yedf/dtmdriver" "github.com/dtm-labs/dtmdriver"
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
"google.golang.org/grpc/status" "google.golang.org/grpc/status"
) )

4
dtmsvr/trans_type_msg.go

@ -10,8 +10,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
) )
type transMsgProcessor struct { type transMsgProcessor struct {

6
dtmsvr/trans_type_saga.go

@ -10,9 +10,9 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
) )
type transSagaProcessor struct { type transSagaProcessor struct {

6
dtmsvr/trans_type_tcc.go

@ -7,9 +7,9 @@
package dtmsvr package dtmsvr
import ( import (
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
) )
type transTccProcessor struct { type transTccProcessor struct {

4
dtmsvr/trans_type_xa.go

@ -7,8 +7,8 @@
package dtmsvr package dtmsvr
import ( import (
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
) )
type transXaProcessor struct { type transXaProcessor struct {

8
dtmsvr/utils.go

@ -12,10 +12,10 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
"github.com/yedf/dtm/common" "github.com/dtm-labs/dtm/common"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmsvr/storage" "github.com/dtm-labs/dtm/dtmsvr/storage"
"github.com/yedf/dtm/dtmsvr/storage/registry" "github.com/dtm-labs/dtm/dtmsvr/storage/registry"
) )
type branchStatus struct { type branchStatus struct {

12
examples/base_grpc.go

@ -13,14 +13,14 @@ import (
"net" "net"
"time" "time"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/dtm-labs/dtm/dtmgrpc"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmgrpc"
"github.com/yedf/dtm/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/dtmgrpc/dtmgimp"
"github.com/yedf/dtm/dtmgrpc/dtmgpb" "github.com/dtm-labs/dtm/dtmgrpc/dtmgpb"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"

8
examples/base_http.go

@ -13,11 +13,11 @@ import (
"strings" "strings"
"time" "time"
"github.com/dtm-labs/dtm/common"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger"
"gorm.io/driver/mysql" "gorm.io/driver/mysql"
"gorm.io/driver/postgres" "gorm.io/driver/postgres"
"gorm.io/gorm" "gorm.io/gorm"

10
examples/base_types.go

@ -11,12 +11,12 @@ import (
"database/sql" "database/sql"
"fmt" "fmt"
"github.com/dtm-labs/dtm/common"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/dtm-labs/dtm/dtmgrpc"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmgrpc"
) )
// DtmHttpServer dtm service address // DtmHttpServer dtm service address

4
examples/data.go

@ -9,8 +9,8 @@ package examples
import ( import (
"fmt" "fmt"
"github.com/yedf/dtm/common" "github.com/dtm-labs/dtm/common"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
) )
var config = &common.Config var config = &common.Config

4
examples/grpc_msg.go

@ -7,8 +7,8 @@
package examples package examples
import ( import (
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
dtmgrpc "github.com/yedf/dtm/dtmgrpc" dtmgrpc "github.com/dtm-labs/dtm/dtmgrpc"
) )
func init() { func init() {

4
examples/grpc_saga.go

@ -7,8 +7,8 @@
package examples package examples
import ( import (
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
dtmgrpc "github.com/yedf/dtm/dtmgrpc" dtmgrpc "github.com/dtm-labs/dtm/dtmgrpc"
) )
func init() { func init() {

8
examples/grpc_saga_barrier.go

@ -10,10 +10,10 @@ import (
"context" "context"
"database/sql" "database/sql"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmgrpc" "github.com/dtm-labs/dtm/dtmgrpc"
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
"google.golang.org/grpc/status" "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb" emptypb "google.golang.org/protobuf/types/known/emptypb"

4
examples/grpc_tcc.go

@ -7,8 +7,8 @@
package examples package examples
import ( import (
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
dtmgrpc "github.com/yedf/dtm/dtmgrpc" dtmgrpc "github.com/dtm-labs/dtm/dtmgrpc"
emptypb "google.golang.org/protobuf/types/known/emptypb" emptypb "google.golang.org/protobuf/types/known/emptypb"
) )

4
examples/grpc_xa.go

@ -9,8 +9,8 @@ package examples
import ( import (
context "context" context "context"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmgrpc" "github.com/dtm-labs/dtm/dtmgrpc"
"google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/emptypb"
) )

4
examples/http_gorm_xa.go

@ -7,9 +7,9 @@
package examples package examples
import ( import (
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/logger"
) )
func init() { func init() {

4
examples/http_msg.go

@ -7,8 +7,8 @@
package examples package examples
import ( import (
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
) )
func init() { func init() {

4
examples/http_saga.go

@ -7,8 +7,8 @@
package examples package examples
import ( import (
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
) )
func init() { func init() {

8
examples/http_saga_barrier.go

@ -9,11 +9,11 @@ package examples
import ( import (
"database/sql" "database/sql"
"github.com/dtm-labs/dtm/common"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger"
) )
func init() { func init() {

6
examples/http_saga_gorm_barrier.go

@ -9,10 +9,10 @@ package examples
import ( import (
"database/sql" "database/sql"
"github.com/dtm-labs/dtm/common"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/logger"
) )
func init() { func init() {

6
examples/http_tcc.go

@ -7,11 +7,11 @@
package examples package examples
import ( import (
"github.com/dtm-labs/dtm/common"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/logger"
) )
func init() { func init() {

8
examples/http_tcc_barrier.go

@ -10,12 +10,12 @@ import (
"database/sql" "database/sql"
"fmt" "fmt"
"github.com/dtm-labs/dtm/common"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger"
) )
func init() { func init() {

6
examples/http_xa.go

@ -7,11 +7,11 @@
package examples package examples
import ( import (
"github.com/dtm-labs/dtm/common"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/logger"
) )
// XaClient XA client connection // XaClient XA client connection

8
examples/quick_start.go

@ -10,11 +10,11 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/dtm-labs/dtm/common"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger"
) )
// 启动命令:go run app/main.go qs // 启动命令:go run app/main.go qs

10
go.mod

@ -1,8 +1,12 @@
module github.com/yedf/dtm module github.com/dtm-labs/dtm
go 1.15 go 1.15
require ( require (
github.com/dtm-labs/dtmdriver v0.0.1
github.com/dtm-labs/dtmdriver-gozero v0.0.1
github.com/dtm-labs/dtmdriver-polaris v0.0.2
github.com/dtm-labs/dtmdriver-protocol1 v0.0.1
github.com/gin-gonic/gin v1.6.3 github.com/gin-gonic/gin v1.6.3
github.com/go-playground/assert/v2 v2.0.1 github.com/go-playground/assert/v2 v2.0.1
github.com/go-redis/redis/v8 v8.11.4 github.com/go-redis/redis/v8 v8.11.4
@ -15,10 +19,6 @@ require (
github.com/polarismesh/grpc-go-polaris v0.0.0-20211128162137-1a59cd7b5733 // indirect github.com/polarismesh/grpc-go-polaris v0.0.0-20211128162137-1a59cd7b5733 // indirect
github.com/prometheus/client_golang v1.11.0 github.com/prometheus/client_golang v1.11.0
github.com/stretchr/testify v1.7.0 github.com/stretchr/testify v1.7.0
github.com/ychensha/dtmdriver-polaris v0.0.1
github.com/yedf/dtmdriver v0.0.0-20211203060147-29426c663b6e
github.com/yedf/dtmdriver-gozero v0.0.0-20211204083751-a14485949435
github.com/yedf/dtmdriver-protocol1 v0.0.0-20211205112411-d7a7052dc90e
go.etcd.io/bbolt v1.3.6 go.etcd.io/bbolt v1.3.6
go.uber.org/atomic v1.9.0 // indirect go.uber.org/atomic v1.9.0 // indirect
go.uber.org/automaxprocs v1.4.1-0.20210525221652-0180b04c18a7 go.uber.org/automaxprocs v1.4.1-0.20210525221652-0180b04c18a7

23
go.sum

@ -31,6 +31,8 @@ github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/ClickHouse/clickhouse-go v1.5.1/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI= github.com/ClickHouse/clickhouse-go v1.5.1/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
@ -92,6 +94,20 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
github.com/dtm-labs/dtmdriver v0.0.0-20211203060147-29426c663b6e h1:xXyb4mr46T5KqR5SXd37ivXNJ33k/MSAAwsGP6btmh8=
github.com/dtm-labs/dtmdriver v0.0.0-20211203060147-29426c663b6e/go.mod h1:aeo6ZWiVI0x8P8O18r6uB1cG2uw9BCQyYZaH15MlRDI=
github.com/dtm-labs/dtmdriver v0.0.1 h1:dHUZQ6g2ZN6eRUqds9kKq/3K7u9bcUGatUlbthD92fA=
github.com/dtm-labs/dtmdriver v0.0.1/go.mod h1:fLiEeD2BPwM9Yq96TfcP9KpbTwFsn5nTxa/PP0jmFuk=
github.com/dtm-labs/dtmdriver-gozero v0.0.0-20211204083751-a14485949435 h1:qLBNU16bK1ZeaZ6tmfarf49qx9O9sUJAe7/IzoXpuEg=
github.com/dtm-labs/dtmdriver-gozero v0.0.0-20211204083751-a14485949435/go.mod h1:RYtA6oZny6LzlIRb1tPGt5bHfgqws/JaU6ogFly8ByQ=
github.com/dtm-labs/dtmdriver-gozero v0.0.1 h1:ExDhMsn3MJCd+psSmIJVDgGUqbFrQGP0IpKL8x900AE=
github.com/dtm-labs/dtmdriver-gozero v0.0.1/go.mod h1:uIiAMkG/Vp4jvINk5XfVMT0mSCzRqIYyXgpmqAQfqbA=
github.com/dtm-labs/dtmdriver-polaris v0.0.2 h1:bh8u7bLWhairwpiA688dZMAX/OWcRoQk7a5bVcGzsjo=
github.com/dtm-labs/dtmdriver-polaris v0.0.2/go.mod h1:vyXDTRj3CpROiRnI0dqM/lHFfZaKY9JAS1MSey2azIQ=
github.com/dtm-labs/dtmdriver-protocol1 v0.0.0-20211205112411-d7a7052dc90e h1:hNSfnVdE46i45HS6aneN+6umk+12EqI3AErbbzeLsoo=
github.com/dtm-labs/dtmdriver-protocol1 v0.0.0-20211205112411-d7a7052dc90e/go.mod h1:kB3NPnDKSGioVjgdfj6qgbqYJinOml45GnlHqR46Ycc=
github.com/dtm-labs/dtmdriver-protocol1 v0.0.1 h1:nwGpGWi7XlUAcDhEw1qZ3TheBskqCvfE96n1uVjmDf4=
github.com/dtm-labs/dtmdriver-protocol1 v0.0.1/go.mod h1:x3bRe8x7pAfHIIQBTK+LibVq96gBSzMzsgRYe85zxAc=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
@ -495,12 +511,6 @@ github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+
github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
github.com/ychensha/dtmdriver-polaris v0.0.1 h1:+gYWFma5pflxNyV1HkcXmhzVHpijMSW9G4qTDcs63xc= github.com/ychensha/dtmdriver-polaris v0.0.1 h1:+gYWFma5pflxNyV1HkcXmhzVHpijMSW9G4qTDcs63xc=
github.com/ychensha/dtmdriver-polaris v0.0.1/go.mod h1:0BdQvxXlGOlF6YVlsDoVvu8jyxdTlJZ9Kyh5t9lRA94= github.com/ychensha/dtmdriver-polaris v0.0.1/go.mod h1:0BdQvxXlGOlF6YVlsDoVvu8jyxdTlJZ9Kyh5t9lRA94=
github.com/yedf/dtmdriver v0.0.0-20211203060147-29426c663b6e h1:xXyb4mr46T5KqR5SXd37ivXNJ33k/MSAAwsGP6btmh8=
github.com/yedf/dtmdriver v0.0.0-20211203060147-29426c663b6e/go.mod h1:aeo6ZWiVI0x8P8O18r6uB1cG2uw9BCQyYZaH15MlRDI=
github.com/yedf/dtmdriver-gozero v0.0.0-20211204083751-a14485949435 h1:qLBNU16bK1ZeaZ6tmfarf49qx9O9sUJAe7/IzoXpuEg=
github.com/yedf/dtmdriver-gozero v0.0.0-20211204083751-a14485949435/go.mod h1:RYtA6oZny6LzlIRb1tPGt5bHfgqws/JaU6ogFly8ByQ=
github.com/yedf/dtmdriver-protocol1 v0.0.0-20211205112411-d7a7052dc90e h1:hNSfnVdE46i45HS6aneN+6umk+12EqI3AErbbzeLsoo=
github.com/yedf/dtmdriver-protocol1 v0.0.0-20211205112411-d7a7052dc90e/go.mod h1:kB3NPnDKSGioVjgdfj6qgbqYJinOml45GnlHqR46Ycc=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
@ -892,4 +902,3 @@ sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZa
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=

8
helper/sync-dtmcli.sh

@ -24,7 +24,7 @@ git tag $ver
git push --tags git push --tags
cd ../dtmcli-go-sample cd ../dtmcli-go-sample
go get -u github.com/yedf/dtmcli@$ver go get -u github.com/dtm-labs/dtmcli@$ver
go mod tidy go mod tidy
go build || exit 1 go build || exit 1
git add . git add .
@ -37,7 +37,7 @@ git push --tags
cd ../dtmgrpc cd ../dtmgrpc
rm -rf *.go dtmgimp rm -rf *.go dtmgimp
cp -r ../dtm/dtmgrpc/* ./ cp -r ../dtm/dtmgrpc/* ./
go get github.com/yedf/dtmcli@$ver go get github.com/dtm-labs/dtmcli@$ver
sed -i '' -e 's/yedf\/dtm\//yedf\//g' *.go sed -i '' -e 's/yedf\/dtm\//yedf\//g' *.go
sed -i '' -e 's/yedf\/dtm\//yedf\//g' dtmgimp/*.go dtmgimp/*.proto sed -i '' -e 's/yedf\/dtm\//yedf\//g' dtmgimp/*.go dtmgimp/*.proto
rm -rf *_test.go rm -rf *_test.go
@ -50,8 +50,8 @@ git tag $ver
git push --tags git push --tags
cd ../dtmgrpc-go-sample cd ../dtmgrpc-go-sample
go get github.com/yedf/dtmcli@$ver go get github.com/dtm-labs/dtmcli@$ver
go get github.com/yedf/dtmgrpc@$ver go get github.com/dtm-labs/dtmgrpc@$ver
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative busi/*.proto || exit 1 protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative busi/*.proto || exit 1
go build || exit 1 go build || exit 1
git add . git add .

2
helper/test-cover.sh

@ -2,7 +2,7 @@ set -x
echo "" > coverage.txt echo "" > coverage.txt
for store in redis mysql boltdb; do for store in redis mysql boltdb; do
for d in $(go list ./... | grep -v vendor); do for d in $(go list ./... | grep -v vendor); do
TEST_STORE=$store go test -covermode count -coverprofile=profile.out -coverpkg=github.com/yedf/dtm/common,github.com/yedf/dtm/dtmcli,github.com/yedf/dtm/dtmcli/dtmimp,github.com/yedf/dtm/dtmgrpc,github.com/yedf/dtm/dtmgrpc/dtmgimp,github.com/yedf/dtm/dtmsvr,github.com/yedf/dtm/dtmsvr/storage,github.com/yedf/dtm/dtmsvr/storage/boltdb,github.com/yedf/dtm/dtmsvr/storage/redis,github.com/yedf/dtm/dtmsvr/storage/registry,github.com/yedf/dtm/dtmsvr/storage/sql,github.com/yedf/dtm/dtmsvr/storage/boltdb,github.com/yedf/dtm/dtmsvr/storage/registry -gcflags=-l $d TEST_STORE=$store go test -covermode count -coverprofile=profile.out -coverpkg=github.com/dtm-labs/dtm/common,github.com/dtm-labs/dtm/dtmcli,github.com/dtm-labs/dtm/dtmcli/dtmimp,github.com/dtm-labs/dtm/dtmgrpc,github.com/dtm-labs/dtm/dtmgrpc/dtmgimp,github.com/dtm-labs/dtm/dtmsvr,github.com/dtm-labs/dtm/dtmsvr/storage,github.com/dtm-labs/dtm/dtmsvr/storage/boltdb,github.com/dtm-labs/dtm/dtmsvr/storage/redis,github.com/dtm-labs/dtm/dtmsvr/storage/registry,github.com/dtm-labs/dtm/dtmsvr/storage/sql,github.com/dtm-labs/dtm/dtmsvr/storage/boltdb,github.com/dtm-labs/dtm/dtmsvr/storage/registry -gcflags=-l $d
if [ -f profile.out ]; then if [ -f profile.out ]; then
cat profile.out >> coverage.txt cat profile.out >> coverage.txt
echo > profile.out echo > profile.out

4
test/api_test.go

@ -10,9 +10,9 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/examples"
) )
func TestAPIQuery(t *testing.T) { func TestAPIQuery(t *testing.T) {

10
test/base_test.go

@ -11,12 +11,12 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/dtm-labs/dtm/common"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger"
"github.com/yedf/dtm/examples"
) )
// BarrierModel barrier model for gorm // BarrierModel barrier model for gorm

10
test/dtmsvr_test.go

@ -10,13 +10,13 @@ import (
"testing" "testing"
"time" "time"
"github.com/dtm-labs/dtm/common"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmsvr"
"github.com/dtm-labs/dtm/examples"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmsvr"
"github.com/yedf/dtm/examples"
) )
var DtmServer = examples.DtmHttpServer var DtmServer = examples.DtmHttpServer

2
test/examples_test.go

@ -9,7 +9,7 @@ package test
import ( import (
"testing" "testing"
"github.com/yedf/dtm/examples" "github.com/dtm-labs/dtm/examples"
) )
func TestExamples(t *testing.T) { func TestExamples(t *testing.T) {

8
test/main_test.go

@ -11,11 +11,11 @@ import (
"testing" "testing"
"time" "time"
"github.com/dtm-labs/dtm/common"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmsvr"
"github.com/dtm-labs/dtm/examples"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmsvr"
"github.com/yedf/dtm/examples"
) )
func exitIf(code int) { func exitIf(code int) {

8
test/msg_grpc_test.go

@ -10,11 +10,11 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmgrpc"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmgrpc"
"github.com/yedf/dtm/examples"
) )
func TestMsgGrpcNormal(t *testing.T) { func TestMsgGrpcNormal(t *testing.T) {

6
test/msg_options_test.go

@ -9,10 +9,10 @@ package test
import ( import (
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/examples"
) )
func TestMsgOptionsTimeout(t *testing.T) { func TestMsgOptionsTimeout(t *testing.T) {

6
test/msg_test.go

@ -9,10 +9,10 @@ package test
import ( import (
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/examples"
) )
func TestMsgNormal(t *testing.T) { func TestMsgNormal(t *testing.T) {

6
test/saga_barrier_test.go

@ -9,10 +9,10 @@ package test
import ( import (
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/examples"
) )
func TestSagaBarrierNormal(t *testing.T) { func TestSagaBarrierNormal(t *testing.T) {

4
test/saga_compatible_test.go

@ -10,9 +10,9 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/examples"
) )
func TestSagaCompatibleNormal(t *testing.T) { // compatible with old http, which put payload in steps.data func TestSagaCompatibleNormal(t *testing.T) { // compatible with old http, which put payload in steps.data

6
test/saga_concurrent_test.go

@ -9,10 +9,10 @@ package test
import ( import (
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/examples"
) )
func genSagaCon(gid string, outFailed bool, inFailed bool) *dtmcli.Saga { func genSagaCon(gid string, outFailed bool, inFailed bool) *dtmcli.Saga {

6
test/saga_grpc_barrier_test.go

@ -9,10 +9,10 @@ package test
import ( import (
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmgrpc"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmgrpc"
"github.com/yedf/dtm/examples"
) )
func TestSagaGrpcBarrierNormal(t *testing.T) { func TestSagaGrpcBarrierNormal(t *testing.T) {

8
test/saga_grpc_test.go

@ -9,11 +9,11 @@ package test
import ( import (
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmgrpc"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmgrpc"
"github.com/yedf/dtm/examples"
) )
func TestSagaGrpcNormal(t *testing.T) { func TestSagaGrpcNormal(t *testing.T) {

6
test/saga_options_test.go

@ -9,10 +9,10 @@ package test
import ( import (
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/examples"
) )
func TestSagaOptionsRetryOngoing(t *testing.T) { func TestSagaOptionsRetryOngoing(t *testing.T) {

6
test/saga_test.go

@ -9,10 +9,10 @@ package test
import ( import (
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/examples"
) )
func TestSagaNormal(t *testing.T) { func TestSagaNormal(t *testing.T) {

6
test/store_test.go

@ -6,9 +6,9 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmsvr/storage" "github.com/dtm-labs/dtm/dtmsvr/storage"
"github.com/yedf/dtm/dtmsvr/storage/registry" "github.com/dtm-labs/dtm/dtmsvr/storage/registry"
) )
func initTransGlobal(gid string) (*storage.TransGlobalStore, storage.Store) { func initTransGlobal(gid string) (*storage.TransGlobalStore, storage.Store) {

8
test/tcc_barrier_test.go

@ -14,13 +14,13 @@ import (
"testing" "testing"
"time" "time"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/dtm-labs/dtm/examples"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger"
"github.com/yedf/dtm/examples"
) )
func TestTccBarrierNormal(t *testing.T) { func TestTccBarrierNormal(t *testing.T) {

6
test/tcc_cover_test.go

@ -3,11 +3,11 @@ package test
import ( import (
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/examples"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/examples"
) )
func TestTccCoverNotConnected(t *testing.T) { func TestTccCoverNotConnected(t *testing.T) {

6
test/tcc_grpc_cover_test.go

@ -3,10 +3,10 @@ package test
import ( import (
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmgrpc"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmgrpc"
"github.com/yedf/dtm/examples"
"google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/emptypb"
) )

10
test/tcc_grpc_test.go

@ -10,12 +10,12 @@ import (
"context" "context"
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/dtm-labs/dtm/dtmgrpc"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmgrpc"
"github.com/yedf/dtm/examples"
"google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/emptypb"
) )

6
test/tcc_test.go

@ -9,11 +9,11 @@ package test
import ( import (
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/examples"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/examples"
) )
func TestTccNormal(t *testing.T) { func TestTccNormal(t *testing.T) {

10
test/types.go

@ -9,11 +9,11 @@ package test
import ( import (
"time" "time"
"github.com/yedf/dtm/common" "github.com/dtm-labs/dtm/common"
"github.com/yedf/dtm/dtmcli" "github.com/dtm-labs/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp" "github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmcli/logger" "github.com/dtm-labs/dtm/dtmcli/logger"
"github.com/yedf/dtm/dtmsvr" "github.com/dtm-labs/dtm/dtmsvr"
) )
var config = &common.Config var config = &common.Config

6
test/xa_cover_test.go

@ -3,11 +3,11 @@ package test
import ( import (
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/examples"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/examples"
) )
func TestXaCoverDBError(t *testing.T) { func TestXaCoverDBError(t *testing.T) {

6
test/xa_grpc_test.go

@ -11,10 +11,10 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/dtmgrpc"
"github.com/dtm-labs/dtm/examples"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/dtmgrpc"
"github.com/yedf/dtm/examples"
"google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/emptypb"
) )

6
test/xa_test.go

@ -10,11 +10,11 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/dtm-labs/dtm/dtmcli"
"github.com/dtm-labs/dtm/dtmcli/dtmimp"
"github.com/dtm-labs/dtm/examples"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli"
"github.com/yedf/dtm/dtmcli/dtmimp"
"github.com/yedf/dtm/examples"
) )
func getXc() *dtmcli.XaClient { func getXc() *dtmcli.XaClient {

Loading…
Cancel
Save