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.
23 lines
503 B
23 lines
503 B
package examples
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func Main() {
|
|
logrus.Printf("examples starting")
|
|
gin.SetMode(gin.ReleaseMode)
|
|
app := gin.Default()
|
|
app.POST(BusiApi+"/TransIn", TransIn)
|
|
app.POST(BusiApi+"/TransInCompensate", TransInCompensate)
|
|
app.POST(BusiApi+"/TransQuery", TransQuery)
|
|
|
|
go app.Run(":8081")
|
|
logrus.Printf("examples istening at %d", BusiPort)
|
|
trans(&TransReq{
|
|
amount: 30,
|
|
transInFailed: false,
|
|
transOutFailed: false,
|
|
})
|
|
}
|
|
|