mirror of https://github.com/dtm-labs/dtm.git
csharpjavadistributed-transactionsdtmgogolangmicroservicenodejsphpdatabasesagaseatatcctransactiontransactionsxapythondistributed
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
513 B
34 lines
513 B
package examples
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
|
|
"github.com/sirupsen/logrus"
|
|
"github.com/yedf/dtm/common"
|
|
)
|
|
|
|
// 事务参与者的服务地址
|
|
const XaBusiPort = 8082
|
|
const XaBusiApi = "/api/busi_xa"
|
|
|
|
var XaBusi = fmt.Sprintf("http://localhost:%d%s", XaBusiPort, XaBusiApi)
|
|
|
|
func XaMain() {
|
|
go XaStartSvr()
|
|
xaFireRequest()
|
|
time.Sleep(1000 * time.Second)
|
|
}
|
|
|
|
func XaStartSvr() {
|
|
logrus.Printf("xa examples starting")
|
|
app := common.GetGinApp()
|
|
AddRoute(app)
|
|
app.Run(":8081")
|
|
}
|
|
|
|
func xaFireRequest() {
|
|
|
|
}
|
|
|
|
// api
|
|
|