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
603 B
23 lines
603 B
package dtmsvr
|
|
|
|
import (
|
|
"context"
|
|
"log"
|
|
|
|
pb "github.com/yedf/dtm/dtmpb"
|
|
)
|
|
|
|
// dtmServer is used to implement helloworld.GreeterServer.
|
|
type dtmServer struct {
|
|
pb.UnimplementedDtmServer
|
|
}
|
|
|
|
func (s *dtmServer) Call(ctx context.Context, in *pb.DtmRequest) (*pb.DtmReply, error) {
|
|
log.Printf("dtmServer Received: %v", in)
|
|
return &pb.DtmReply{DtmResult: "SUCCESS", DtmMessage: "ok"}, nil
|
|
}
|
|
|
|
func (s *dtmServer) Submit(ctx context.Context, in *pb.DtmRequest) (*pb.DtmReply, error) {
|
|
svcSubmit(TransFromDtmRequest(in), in.WaitResult)
|
|
return &pb.DtmReply{DtmResult: "SUCCESS", DtmMessage: "ok"}, nil
|
|
}
|
|
|