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
493 B
23 lines
493 B
package examples
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/yedf/dtm/dtmcli"
|
|
dtmpb "github.com/yedf/dtm/dtmpb"
|
|
)
|
|
|
|
// MsgPbSetup 1
|
|
func MsgPbSetup(app *gin.Engine) {
|
|
|
|
}
|
|
|
|
// MsgPbFireRequest 1
|
|
func MsgPbFireRequest() string {
|
|
req := dtmcli.MustMarshal(&TransReq{Amount: 30})
|
|
msg := dtmpb.NewMsgGrpc(DtmGrpcServer, dtmcli.MustGenGid(DtmServer)).
|
|
Add(BusiPb+"/examples.Busi/TransOut", req).
|
|
Add(BusiPb+"/examples.Busi/TransIn", req)
|
|
err := msg.Submit()
|
|
e2p(err)
|
|
return msg.Gid
|
|
}
|
|
|