🔥A cross-language distributed transaction manager. Support xa, tcc, saga, transactional messages. 跨语言分布式事务管理器
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.
 
 
 
 
 
 

26 lines
455 B

package main
import (
"os"
"time"
"github.com/yedf/dtm/common"
"github.com/yedf/dtm/dtmsvr"
"github.com/yedf/dtm/examples"
)
type M = map[string]interface{}
func main() {
cmd := common.If(len(os.Args) > 1, os.Args[1], "").(string)
dtmsvr.LoadConfig()
if cmd == "" { // 所有服务都启动
go dtmsvr.StartSvr()
go examples.SagaStartSvr()
} else if cmd == "dtmsvr" {
go dtmsvr.StartSvr()
}
for {
time.Sleep(1000 * time.Second)
}
}