dtm/app/main.go
2021-05-29 11:50:10 +08:00

26 lines
413 B
Go

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