diff --git a/README-cn.md b/README-cn.md index 241d125..8f866fc 100644 --- a/README-cn.md +++ b/README-cn.md @@ -98,7 +98,7 @@ DTM是一款golang开发的分布式事务管理器,解决了跨数据库、 const qsBusi = "http://localhost:8081/api/busi_saga" req := &gin.H{"amount": 30} // 微服务的载荷 // DtmServer为DTM服务的地址,是一个url - DtmServer := "http://localhost:8080/api/dtmsvr" + DtmServer := "http://localhost:36789/api/dtmsvr" saga := dtmcli.NewSaga(DtmServer, dtmcli.MustGenGid(DtmServer)). // 添加一个TransOut的子事务,正向操作为url: qsBusi+"/TransOut", 补偿操作为url: qsBusi+"/TransOutCompensate" Add(qsBusi+"/TransOut", qsBusi+"/TransOutCompensate", req). diff --git a/README-en.md b/README-en.md index bd13a01..e106d9e 100644 --- a/README-en.md +++ b/README-en.md @@ -87,7 +87,7 @@ If your language stack is Java, you can also choose to access dtm and use sub-tr // business micro-service address const qsBusi = "http://localhost:8081/api/busi_saga" // The address where DtmServer serves DTM, which is a url - DtmServer := "http://localhost:8080/api/dtmsvr" + DtmServer := "http://localhost:36789/api/dtmsvr" req := &gin.H{"amount": 30} // micro-service payload // DtmServer is the address of DTM micro-service saga := dtmcli.NewSaga(DtmServer, dtmcli.MustGenGid(DtmServer)). diff --git a/README.md b/README.md index 241d125..8f866fc 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ DTM是一款golang开发的分布式事务管理器,解决了跨数据库、 const qsBusi = "http://localhost:8081/api/busi_saga" req := &gin.H{"amount": 30} // 微服务的载荷 // DtmServer为DTM服务的地址,是一个url - DtmServer := "http://localhost:8080/api/dtmsvr" + DtmServer := "http://localhost:36789/api/dtmsvr" saga := dtmcli.NewSaga(DtmServer, dtmcli.MustGenGid(DtmServer)). // 添加一个TransOut的子事务,正向操作为url: qsBusi+"/TransOut", 补偿操作为url: qsBusi+"/TransOutCompensate" Add(qsBusi+"/TransOut", qsBusi+"/TransOutCompensate", req). diff --git a/conf.sample.yml b/conf.sample.yml index c6b12ba..9d736fd 100644 --- a/conf.sample.yml +++ b/conf.sample.yml @@ -1,4 +1,4 @@ -# Store: # specify which engine to store trans status +Store: # specify which engine to store trans status # Driver: 'boltdb' # default store engine # Driver: 'redis' @@ -7,11 +7,11 @@ # Password: '' # Port: 6379 -# Driver: 'mysql' -# Host: 'localhost' -# User: 'root' -# Password: '' -# Port: 3306 + Driver: 'mysql' + Host: 'localhost' + User: 'root' + Password: '' + Port: 3306 # Driver: 'postgres' # Host: 'localhost' diff --git a/dtmcli/trans_test.go b/dtmcli/trans_test.go index f12de07..05e6ab4 100644 --- a/dtmcli/trans_test.go +++ b/dtmcli/trans_test.go @@ -25,6 +25,6 @@ func TestQuery(t *testing.T) { } func TestXa(t *testing.T) { - _, err := NewXaClient("http://localhost:8080", DBConf{}, ":::::", nil) + _, err := NewXaClient("http://localhost:36789", DBConf{}, ":::::", nil) assert.Error(t, err) } diff --git a/dtmcli/types_test.go b/dtmcli/types_test.go index 849fe57..8128e7d 100644 --- a/dtmcli/types_test.go +++ b/dtmcli/types_test.go @@ -16,7 +16,7 @@ import ( func TestTypes(t *testing.T) { err := dtmimp.CatchP(func() { - MustGenGid("http://localhost:8080/api/no") + MustGenGid("http://localhost:36789/api/no") }) assert.Error(t, err) assert.Error(t, err) diff --git a/helper/compose.cloud.yml b/helper/compose.cloud.yml index 1336052..641adf9 100644 --- a/helper/compose.cloud.yml +++ b/helper/compose.cloud.yml @@ -5,16 +5,13 @@ services: volumes: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro + - ..:/app/dtm extra_hosts: - 'host.docker.internal:host-gateway' environment: IS_DOCKER: 1 - DISABLE_LOCALHOST: 1 - RETRY_LIMIT: 6 ports: - '9080:8080' - volumes: - - ..:/app/dtm mysql: image: 'mysql:5.7' volumes: diff --git a/helper/compose.qs.yml b/helper/compose.qs.yml deleted file mode 100644 index 2b50a8b..0000000 --- a/helper/compose.qs.yml +++ /dev/null @@ -1,32 +0,0 @@ -version: '3.3' -services: - api: - image: 'yedf/dtm' - environment: - IS_DOCKER: '1' - ports: - - '8080:8080' - - '8082:8082' - - '58080:58080' - volumes: - - ..:/app/work - - /etc/localtime:/etc/localtime:ro - - /etc/timezone:/etc/timezone:ro - command: ['/app/dtm/main', 'qs'] - working_dir: /app/work - extra_hosts: - - 'host.docker.internal:host-gateway' - db: - image: 'mysql:5.7' - environment: - MYSQL_ALLOW_EMPTY_PASSWORD: 1 - volumes: - - /etc/localtime:/etc/localtime:ro - - /etc/timezone:/etc/timezone:ro - command: - [ - '--character-set-server=utf8mb4', - '--collation-server=utf8mb4_unicode_ci', - ] - ports: - - '3306:3306'