From 62b99b2fd37fcd1987585b5aeda77c230d5644e4 Mon Sep 17 00:00:00 2001 From: yedf2 <120050102@qq.com> Date: Fri, 8 Jul 2022 15:31:09 +0800 Subject: [PATCH] BusiReq rename to ReqGrpc --- test/busi/barrier.go | 20 +-- test/busi/base_grpc.go | 28 ++-- test/busi/base_types.go | 2 +- test/busi/busi.pb.go | 142 ++++++++--------- test/busi/busi.proto | 56 +++---- test/busi/busi_grpc.pb.go | 290 +++++++++++++++++----------------- test/busi/data.go | 2 +- test/busi/utils.go | 3 - test/msg_grpc_test.go | 2 +- test/tcc_grpc_test.go | 2 +- test/workflow_grpc_test.go | 12 +- test/workflow_ongoing_test.go | 2 +- 12 files changed, 279 insertions(+), 282 deletions(-) diff --git a/test/busi/barrier.go b/test/busi/barrier.go index b80cb55..5f61994 100644 --- a/test/busi/barrier.go +++ b/test/busi/barrier.go @@ -203,61 +203,61 @@ func TccBarrierTransOutCancel(c *gin.Context) interface{} { }) } -func (s *busiServer) TransInBSaga(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransInBSaga(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { barrier := MustBarrierFromGrpc(ctx) return &emptypb.Empty{}, barrier.Call(txGet(), func(tx *sql.Tx) error { return sagaGrpcAdjustBalance(tx, TransInUID, in.Amount, in.TransInResult) }) } -func (s *busiServer) TransOutBSaga(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransOutBSaga(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { barrier := MustBarrierFromGrpc(ctx) return &emptypb.Empty{}, barrier.CallWithDB(pdbGet(), func(tx *sql.Tx) error { return sagaGrpcAdjustBalance(tx, TransOutUID, -in.Amount, in.TransOutResult) }) } -func (s *busiServer) TransInRevertBSaga(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransInRevertBSaga(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { barrier := MustBarrierFromGrpc(ctx) return &emptypb.Empty{}, barrier.CallWithDB(pdbGet(), func(tx *sql.Tx) error { return sagaGrpcAdjustBalance(tx, TransInUID, -in.Amount, "") }) } -func (s *busiServer) TransOutRevertBSaga(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransOutRevertBSaga(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { barrier := MustBarrierFromGrpc(ctx) return &emptypb.Empty{}, barrier.CallWithDB(pdbGet(), func(tx *sql.Tx) error { return sagaGrpcAdjustBalance(tx, TransOutUID, in.Amount, "") }) } -func (s *busiServer) TransInRedis(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransInRedis(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { barrier := MustBarrierFromGrpc(ctx) return &emptypb.Empty{}, barrier.RedisCheckAdjustAmount(RedisGet(), GetRedisAccountKey(TransInUID), int(in.Amount), 86400) } -func (s *busiServer) TransOutRedis(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransOutRedis(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { barrier := MustBarrierFromGrpc(ctx) return &emptypb.Empty{}, barrier.RedisCheckAdjustAmount(RedisGet(), GetRedisAccountKey(TransOutUID), int(-in.Amount), 86400) } -func (s *busiServer) TransInRevertRedis(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransInRevertRedis(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { barrier := MustBarrierFromGrpc(ctx) return &emptypb.Empty{}, barrier.RedisCheckAdjustAmount(RedisGet(), GetRedisAccountKey(TransInUID), -int(in.Amount), 86400) } -func (s *busiServer) TransOutRevertRedis(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransOutRevertRedis(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { barrier := MustBarrierFromGrpc(ctx) return &emptypb.Empty{}, barrier.RedisCheckAdjustAmount(RedisGet(), GetRedisAccountKey(TransOutUID), int(in.Amount), 86400) } -func (s *busiServer) QueryPreparedB(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) QueryPreparedB(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { barrier := MustBarrierFromGrpc(ctx) err := barrier.QueryPrepared(dbGet().ToSQLDB()) return &emptypb.Empty{}, dtmgrpc.DtmError2GrpcError(err) } -func (s *busiServer) QueryPreparedRedis(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) QueryPreparedRedis(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { barrier := MustBarrierFromGrpc(ctx) err := barrier.RedisQueryPrepared(RedisGet(), 86400) return &emptypb.Empty{}, dtmgrpc.DtmError2GrpcError(err) diff --git a/test/busi/base_grpc.go b/test/busi/base_grpc.go index a00d101..5086025 100644 --- a/test/busi/base_grpc.go +++ b/test/busi/base_grpc.go @@ -66,58 +66,58 @@ type busiServer struct { UnimplementedBusiServer } -func (s *busiServer) QueryPrepared(ctx context.Context, in *BusiReq) (*BusiReply, error) { +func (s *busiServer) QueryPrepared(ctx context.Context, in *ReqGrpc) (*BusiReply, error) { res := MainSwitch.QueryPreparedResult.Fetch() err := dtmcli.String2DtmError(res) return &BusiReply{Message: "a sample data"}, dtmgrpc.DtmError2GrpcError(err) } -func (s *busiServer) TransIn(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransIn(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransInResult.Fetch(), in.TransInResult, dtmimp.GetFuncName()) } -func (s *busiServer) TransOut(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransOut(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransOutResult.Fetch(), in.TransOutResult, dtmimp.GetFuncName()) } -func (s *busiServer) TransInRevert(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransInRevert(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransInRevertResult.Fetch(), "", dtmimp.GetFuncName()) } -func (s *busiServer) TransOutRevert(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransOutRevert(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransOutRevertResult.Fetch(), "", dtmimp.GetFuncName()) } -func (s *busiServer) TransInConfirm(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransInConfirm(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransInConfirmResult.Fetch(), "", dtmimp.GetFuncName()) } -func (s *busiServer) TransOutConfirm(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransOutConfirm(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransOutConfirmResult.Fetch(), "", dtmimp.GetFuncName()) } -func (s *busiServer) TransInTcc(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransInTcc(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransInResult.Fetch(), in.TransInResult, dtmimp.GetFuncName()) } -func (s *busiServer) TransOutTcc(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransOutTcc(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransOutResult.Fetch(), in.TransOutResult, dtmimp.GetFuncName()) } -func (s *busiServer) TransInXa(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransInXa(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { return &emptypb.Empty{}, dtmgrpc.XaLocalTransaction(ctx, BusiConf, func(db *sql.DB, xa *dtmgrpc.XaGrpc) error { return sagaGrpcAdjustBalance(db, TransInUID, in.Amount, in.TransInResult) }) } -func (s *busiServer) TransOutXa(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransOutXa(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { return &emptypb.Empty{}, dtmgrpc.XaLocalTransaction(ctx, BusiConf, func(db *sql.DB, xa *dtmgrpc.XaGrpc) error { return sagaGrpcAdjustBalance(db, TransOutUID, in.Amount, in.TransOutResult) }) } -func (s *busiServer) TransInTccNested(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransInTccNested(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { tcc, err := dtmgrpc.TccFromGrpc(ctx) logger.FatalIfError(err) r := &emptypb.Empty{} @@ -126,7 +126,7 @@ func (s *busiServer) TransInTccNested(ctx context.Context, in *BusiReq) (*emptyp return r, handleGrpcBusiness(in, MainSwitch.TransInResult.Fetch(), in.TransInResult, dtmimp.GetFuncName()) } -func (s *busiServer) TransOutHeaderYes(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransOutHeaderYes(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { meta := dtmgimp.GetMetaFromContext(ctx, "test_header") if meta == "" { return &emptypb.Empty{}, errors.New("no header found in HeaderYes") @@ -134,7 +134,7 @@ func (s *busiServer) TransOutHeaderYes(ctx context.Context, in *BusiReq) (*empty return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransOutResult.Fetch(), in.TransOutResult, dtmimp.GetFuncName()) } -func (s *busiServer) TransOutHeaderNo(ctx context.Context, in *BusiReq) (*emptypb.Empty, error) { +func (s *busiServer) TransOutHeaderNo(ctx context.Context, in *ReqGrpc) (*emptypb.Empty, error) { meta := dtmgimp.GetMetaFromContext(ctx, "test_header") if meta != "" { return &emptypb.Empty{}, errors.New("header found in HeaderNo") diff --git a/test/busi/base_types.go b/test/busi/base_types.go index 6c97bb6..395850d 100644 --- a/test/busi/base_types.go +++ b/test/busi/base_types.go @@ -83,7 +83,7 @@ func GenReqHTTP(amount int, outFailed bool, inFailed bool) *ReqHTTP { // GenReqGrpc 1 func GenReqGrpc(amount int, outFailed bool, inFailed bool) *ReqGrpc { - return &BusiReq{ + return &ReqGrpc{ Amount: int64(amount), TransOutResult: dtmimp.If(outFailed, dtmcli.ResultFailure, "").(string), TransInResult: dtmimp.If(inFailed, dtmcli.ResultFailure, "").(string), diff --git a/test/busi/busi.pb.go b/test/busi/busi.pb.go index ee64b5a..2f5f50b 100644 --- a/test/busi/busi.pb.go +++ b/test/busi/busi.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.19.4 +// protoc-gen-go v1.28.0 +// protoc v3.17.3 // source: test/busi/busi.proto package busi @@ -22,7 +22,7 @@ const ( ) // DtmRequest request sent to dtm server -type BusiReq struct { +type ReqGrpc struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -32,8 +32,8 @@ type BusiReq struct { TransInResult string `protobuf:"bytes,3,opt,name=TransInResult,proto3" json:"TransInResult,omitempty"` } -func (x *BusiReq) Reset() { - *x = BusiReq{} +func (x *ReqGrpc) Reset() { + *x = ReqGrpc{} if protoimpl.UnsafeEnabled { mi := &file_test_busi_busi_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -41,13 +41,13 @@ func (x *BusiReq) Reset() { } } -func (x *BusiReq) String() string { +func (x *ReqGrpc) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BusiReq) ProtoMessage() {} +func (*ReqGrpc) ProtoMessage() {} -func (x *BusiReq) ProtoReflect() protoreflect.Message { +func (x *ReqGrpc) ProtoReflect() protoreflect.Message { mi := &file_test_busi_busi_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59,26 +59,26 @@ func (x *BusiReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BusiReq.ProtoReflect.Descriptor instead. -func (*BusiReq) Descriptor() ([]byte, []int) { +// Deprecated: Use ReqGrpc.ProtoReflect.Descriptor instead. +func (*ReqGrpc) Descriptor() ([]byte, []int) { return file_test_busi_busi_proto_rawDescGZIP(), []int{0} } -func (x *BusiReq) GetAmount() int64 { +func (x *ReqGrpc) GetAmount() int64 { if x != nil { return x.Amount } return 0 } -func (x *BusiReq) GetTransOutResult() string { +func (x *ReqGrpc) GetTransOutResult() string { if x != nil { return x.TransOutResult } return "" } -func (x *BusiReq) GetTransInResult() string { +func (x *ReqGrpc) GetTransInResult() string { if x != nil { return x.TransInResult } @@ -138,8 +138,8 @@ var file_test_busi_busi_proto_rawDesc = []byte{ 0x0a, 0x14, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x62, 0x75, 0x73, 0x69, 0x2f, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x62, 0x75, 0x73, 0x69, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, - 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6f, 0x0a, 0x07, 0x42, 0x75, 0x73, - 0x69, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6f, 0x0a, 0x07, 0x52, 0x65, 0x71, + 0x47, 0x72, 0x70, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x52, 0x65, @@ -149,96 +149,96 @@ var file_test_busi_busi_proto_rawDesc = []byte{ 0x73, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0xbe, 0x0b, 0x0a, 0x04, 0x42, 0x75, 0x73, 0x69, 0x12, 0x32, 0x0a, 0x07, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, - 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, 0x71, + 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, - 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x52, 0x65, - 0x76, 0x65, 0x72, 0x74, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, - 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x65, 0x72, 0x74, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, + 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x12, - 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, + 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, - 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, - 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, + 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x08, 0x58, 0x61, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x58, 0x61, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, - 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x58, - 0x61, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, + 0x61, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x54, 0x63, 0x63, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, - 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x54, 0x63, 0x63, - 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, + 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x54, 0x63, 0x63, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x0d, 0x2e, - 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, + 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, - 0x6e, 0x42, 0x53, 0x61, 0x67, 0x61, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, - 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x6e, 0x42, 0x53, 0x61, 0x67, 0x61, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, + 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x42, 0x53, 0x61, 0x67, 0x61, - 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, + 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x42, 0x53, 0x61, 0x67, 0x61, 0x12, - 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, + 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x42, 0x53, 0x61, 0x67, 0x61, 0x12, - 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, + 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x59, 0x65, 0x73, 0x12, 0x0d, 0x2e, - 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, + 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, - 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x52, 0x65, - 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, - 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, + 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, - 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, + 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, 0x62, - 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, 0x62, - 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, - 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, - 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, + 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x52, 0x65, + 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x0f, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x42, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, - 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x69, 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, - 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x2e, 0x52, 0x65, 0x71, 0x47, 0x72, 0x70, 0x63, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x2f, 0x62, 0x75, 0x73, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, @@ -258,36 +258,36 @@ func file_test_busi_busi_proto_rawDescGZIP() []byte { var file_test_busi_busi_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_test_busi_busi_proto_goTypes = []interface{}{ - (*BusiReq)(nil), // 0: busi.BusiReq + (*ReqGrpc)(nil), // 0: busi.ReqGrpc (*BusiReply)(nil), // 1: busi.BusiReply (*emptypb.Empty)(nil), // 2: google.protobuf.Empty } var file_test_busi_busi_proto_depIdxs = []int32{ - 0, // 0: busi.Busi.TransIn:input_type -> busi.BusiReq - 0, // 1: busi.Busi.TransOut:input_type -> busi.BusiReq - 0, // 2: busi.Busi.TransInRevert:input_type -> busi.BusiReq - 0, // 3: busi.Busi.TransOutRevert:input_type -> busi.BusiReq - 0, // 4: busi.Busi.TransInConfirm:input_type -> busi.BusiReq - 0, // 5: busi.Busi.TransOutConfirm:input_type -> busi.BusiReq + 0, // 0: busi.Busi.TransIn:input_type -> busi.ReqGrpc + 0, // 1: busi.Busi.TransOut:input_type -> busi.ReqGrpc + 0, // 2: busi.Busi.TransInRevert:input_type -> busi.ReqGrpc + 0, // 3: busi.Busi.TransOutRevert:input_type -> busi.ReqGrpc + 0, // 4: busi.Busi.TransInConfirm:input_type -> busi.ReqGrpc + 0, // 5: busi.Busi.TransOutConfirm:input_type -> busi.ReqGrpc 2, // 6: busi.Busi.XaNotify:input_type -> google.protobuf.Empty - 0, // 7: busi.Busi.TransInXa:input_type -> busi.BusiReq - 0, // 8: busi.Busi.TransOutXa:input_type -> busi.BusiReq - 0, // 9: busi.Busi.TransInTcc:input_type -> busi.BusiReq - 0, // 10: busi.Busi.TransOutTcc:input_type -> busi.BusiReq - 0, // 11: busi.Busi.TransInTccNested:input_type -> busi.BusiReq - 0, // 12: busi.Busi.TransInBSaga:input_type -> busi.BusiReq - 0, // 13: busi.Busi.TransOutBSaga:input_type -> busi.BusiReq - 0, // 14: busi.Busi.TransInRevertBSaga:input_type -> busi.BusiReq - 0, // 15: busi.Busi.TransOutRevertBSaga:input_type -> busi.BusiReq - 0, // 16: busi.Busi.TransOutHeaderYes:input_type -> busi.BusiReq - 0, // 17: busi.Busi.TransOutHeaderNo:input_type -> busi.BusiReq - 0, // 18: busi.Busi.TransInRedis:input_type -> busi.BusiReq - 0, // 19: busi.Busi.TransOutRedis:input_type -> busi.BusiReq - 0, // 20: busi.Busi.TransInRevertRedis:input_type -> busi.BusiReq - 0, // 21: busi.Busi.TransOutRevertRedis:input_type -> busi.BusiReq - 0, // 22: busi.Busi.QueryPrepared:input_type -> busi.BusiReq - 0, // 23: busi.Busi.QueryPreparedB:input_type -> busi.BusiReq - 0, // 24: busi.Busi.QueryPreparedRedis:input_type -> busi.BusiReq + 0, // 7: busi.Busi.TransInXa:input_type -> busi.ReqGrpc + 0, // 8: busi.Busi.TransOutXa:input_type -> busi.ReqGrpc + 0, // 9: busi.Busi.TransInTcc:input_type -> busi.ReqGrpc + 0, // 10: busi.Busi.TransOutTcc:input_type -> busi.ReqGrpc + 0, // 11: busi.Busi.TransInTccNested:input_type -> busi.ReqGrpc + 0, // 12: busi.Busi.TransInBSaga:input_type -> busi.ReqGrpc + 0, // 13: busi.Busi.TransOutBSaga:input_type -> busi.ReqGrpc + 0, // 14: busi.Busi.TransInRevertBSaga:input_type -> busi.ReqGrpc + 0, // 15: busi.Busi.TransOutRevertBSaga:input_type -> busi.ReqGrpc + 0, // 16: busi.Busi.TransOutHeaderYes:input_type -> busi.ReqGrpc + 0, // 17: busi.Busi.TransOutHeaderNo:input_type -> busi.ReqGrpc + 0, // 18: busi.Busi.TransInRedis:input_type -> busi.ReqGrpc + 0, // 19: busi.Busi.TransOutRedis:input_type -> busi.ReqGrpc + 0, // 20: busi.Busi.TransInRevertRedis:input_type -> busi.ReqGrpc + 0, // 21: busi.Busi.TransOutRevertRedis:input_type -> busi.ReqGrpc + 0, // 22: busi.Busi.QueryPrepared:input_type -> busi.ReqGrpc + 0, // 23: busi.Busi.QueryPreparedB:input_type -> busi.ReqGrpc + 0, // 24: busi.Busi.QueryPreparedRedis:input_type -> busi.ReqGrpc 2, // 25: busi.Busi.TransIn:output_type -> google.protobuf.Empty 2, // 26: busi.Busi.TransOut:output_type -> google.protobuf.Empty 2, // 27: busi.Busi.TransInRevert:output_type -> google.protobuf.Empty @@ -327,7 +327,7 @@ func file_test_busi_busi_proto_init() { } if !protoimpl.UnsafeEnabled { file_test_busi_busi_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BusiReq); i { + switch v := v.(*ReqGrpc); i { case 0: return &v.state case 1: diff --git a/test/busi/busi.proto b/test/busi/busi.proto index 72a92b6..fba833b 100644 --- a/test/busi/busi.proto +++ b/test/busi/busi.proto @@ -6,7 +6,7 @@ import "google/protobuf/empty.proto"; option go_package = "./busi"; // DtmRequest request sent to dtm server -message BusiReq { +message ReqGrpc { int64 Amount = 1; string TransOutResult = 2; string TransInResult = 3; @@ -17,34 +17,34 @@ message BusiReply { } // The dtm service definition. service Busi { - rpc TransIn(BusiReq) returns (google.protobuf.Empty) {} - rpc TransOut(BusiReq) returns (google.protobuf.Empty) {} - rpc TransInRevert(BusiReq) returns (google.protobuf.Empty) {} - rpc TransOutRevert(BusiReq) returns (google.protobuf.Empty) {} - rpc TransInConfirm(BusiReq) returns (google.protobuf.Empty) {} - rpc TransOutConfirm(BusiReq) returns (google.protobuf.Empty) {} + rpc TransIn(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransOut(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransInRevert(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransOutRevert(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransInConfirm(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransOutConfirm(ReqGrpc) returns (google.protobuf.Empty) {} rpc XaNotify(google.protobuf.Empty) returns (google.protobuf.Empty) {} - rpc TransInXa(BusiReq) returns (google.protobuf.Empty) {} - rpc TransOutXa(BusiReq) returns (google.protobuf.Empty) {} - rpc TransInTcc(BusiReq) returns (google.protobuf.Empty) {} - rpc TransOutTcc(BusiReq) returns (google.protobuf.Empty) {} - rpc TransInTccNested(BusiReq) returns (google.protobuf.Empty) {} - - rpc TransInBSaga(BusiReq) returns (google.protobuf.Empty) {} - rpc TransOutBSaga(BusiReq) returns (google.protobuf.Empty) {} - rpc TransInRevertBSaga(BusiReq) returns (google.protobuf.Empty) {} - rpc TransOutRevertBSaga(BusiReq) returns (google.protobuf.Empty) {} - rpc TransOutHeaderYes(BusiReq) returns (google.protobuf.Empty) {} - rpc TransOutHeaderNo(BusiReq) returns (google.protobuf.Empty) {} - - rpc TransInRedis(BusiReq) returns (google.protobuf.Empty) {} - rpc TransOutRedis(BusiReq) returns (google.protobuf.Empty) {} - rpc TransInRevertRedis(BusiReq) returns (google.protobuf.Empty) {} - rpc TransOutRevertRedis(BusiReq) returns (google.protobuf.Empty) {} - - rpc QueryPrepared(BusiReq) returns (BusiReply) {} - rpc QueryPreparedB(BusiReq) returns (google.protobuf.Empty) {} - rpc QueryPreparedRedis(BusiReq) returns (google.protobuf.Empty) {} + rpc TransInXa(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransOutXa(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransInTcc(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransOutTcc(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransInTccNested(ReqGrpc) returns (google.protobuf.Empty) {} + + rpc TransInBSaga(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransOutBSaga(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransInRevertBSaga(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransOutRevertBSaga(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransOutHeaderYes(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransOutHeaderNo(ReqGrpc) returns (google.protobuf.Empty) {} + + rpc TransInRedis(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransOutRedis(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransInRevertRedis(ReqGrpc) returns (google.protobuf.Empty) {} + rpc TransOutRevertRedis(ReqGrpc) returns (google.protobuf.Empty) {} + + rpc QueryPrepared(ReqGrpc) returns (BusiReply) {} + rpc QueryPreparedB(ReqGrpc) returns (google.protobuf.Empty) {} + rpc QueryPreparedRedis(ReqGrpc) returns (google.protobuf.Empty) {} } diff --git a/test/busi/busi_grpc.pb.go b/test/busi/busi_grpc.pb.go index 21828f1..77144dc 100644 --- a/test/busi/busi_grpc.pb.go +++ b/test/busi/busi_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 +// - protoc v3.17.3 // source: test/busi/busi.proto package busi @@ -23,31 +23,31 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type BusiClient interface { - TransIn(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransOut(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransInRevert(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransOutRevert(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransInConfirm(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransOutConfirm(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransIn(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransOut(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransInRevert(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransOutRevert(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransInConfirm(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransOutConfirm(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) XaNotify(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransInXa(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransOutXa(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransInTcc(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransOutTcc(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransInTccNested(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransInBSaga(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransOutBSaga(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransInRevertBSaga(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransOutRevertBSaga(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransOutHeaderYes(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransOutHeaderNo(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransInRedis(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransOutRedis(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransInRevertRedis(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransOutRevertRedis(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - QueryPrepared(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*BusiReply, error) - QueryPreparedB(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - QueryPreparedRedis(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransInXa(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransOutXa(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransInTcc(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransOutTcc(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransInTccNested(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransInBSaga(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransOutBSaga(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransInRevertBSaga(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransOutRevertBSaga(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransOutHeaderYes(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransOutHeaderNo(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransInRedis(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransOutRedis(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransInRevertRedis(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + TransOutRevertRedis(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + QueryPrepared(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*BusiReply, error) + QueryPreparedB(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) + QueryPreparedRedis(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) } type busiClient struct { @@ -58,7 +58,7 @@ func NewBusiClient(cc grpc.ClientConnInterface) BusiClient { return &busiClient{cc} } -func (c *busiClient) TransIn(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransIn(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransIn", in, out, opts...) if err != nil { @@ -67,7 +67,7 @@ func (c *busiClient) TransIn(ctx context.Context, in *BusiReq, opts ...grpc.Call return out, nil } -func (c *busiClient) TransOut(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransOut(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransOut", in, out, opts...) if err != nil { @@ -76,7 +76,7 @@ func (c *busiClient) TransOut(ctx context.Context, in *BusiReq, opts ...grpc.Cal return out, nil } -func (c *busiClient) TransInRevert(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransInRevert(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransInRevert", in, out, opts...) if err != nil { @@ -85,7 +85,7 @@ func (c *busiClient) TransInRevert(ctx context.Context, in *BusiReq, opts ...grp return out, nil } -func (c *busiClient) TransOutRevert(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransOutRevert(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransOutRevert", in, out, opts...) if err != nil { @@ -94,7 +94,7 @@ func (c *busiClient) TransOutRevert(ctx context.Context, in *BusiReq, opts ...gr return out, nil } -func (c *busiClient) TransInConfirm(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransInConfirm(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransInConfirm", in, out, opts...) if err != nil { @@ -103,7 +103,7 @@ func (c *busiClient) TransInConfirm(ctx context.Context, in *BusiReq, opts ...gr return out, nil } -func (c *busiClient) TransOutConfirm(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransOutConfirm(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransOutConfirm", in, out, opts...) if err != nil { @@ -121,7 +121,7 @@ func (c *busiClient) XaNotify(ctx context.Context, in *emptypb.Empty, opts ...gr return out, nil } -func (c *busiClient) TransInXa(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransInXa(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransInXa", in, out, opts...) if err != nil { @@ -130,7 +130,7 @@ func (c *busiClient) TransInXa(ctx context.Context, in *BusiReq, opts ...grpc.Ca return out, nil } -func (c *busiClient) TransOutXa(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransOutXa(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransOutXa", in, out, opts...) if err != nil { @@ -139,7 +139,7 @@ func (c *busiClient) TransOutXa(ctx context.Context, in *BusiReq, opts ...grpc.C return out, nil } -func (c *busiClient) TransInTcc(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransInTcc(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransInTcc", in, out, opts...) if err != nil { @@ -148,7 +148,7 @@ func (c *busiClient) TransInTcc(ctx context.Context, in *BusiReq, opts ...grpc.C return out, nil } -func (c *busiClient) TransOutTcc(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransOutTcc(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransOutTcc", in, out, opts...) if err != nil { @@ -157,7 +157,7 @@ func (c *busiClient) TransOutTcc(ctx context.Context, in *BusiReq, opts ...grpc. return out, nil } -func (c *busiClient) TransInTccNested(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransInTccNested(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransInTccNested", in, out, opts...) if err != nil { @@ -166,7 +166,7 @@ func (c *busiClient) TransInTccNested(ctx context.Context, in *BusiReq, opts ... return out, nil } -func (c *busiClient) TransInBSaga(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransInBSaga(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransInBSaga", in, out, opts...) if err != nil { @@ -175,7 +175,7 @@ func (c *busiClient) TransInBSaga(ctx context.Context, in *BusiReq, opts ...grpc return out, nil } -func (c *busiClient) TransOutBSaga(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransOutBSaga(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransOutBSaga", in, out, opts...) if err != nil { @@ -184,7 +184,7 @@ func (c *busiClient) TransOutBSaga(ctx context.Context, in *BusiReq, opts ...grp return out, nil } -func (c *busiClient) TransInRevertBSaga(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransInRevertBSaga(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransInRevertBSaga", in, out, opts...) if err != nil { @@ -193,7 +193,7 @@ func (c *busiClient) TransInRevertBSaga(ctx context.Context, in *BusiReq, opts . return out, nil } -func (c *busiClient) TransOutRevertBSaga(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransOutRevertBSaga(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransOutRevertBSaga", in, out, opts...) if err != nil { @@ -202,7 +202,7 @@ func (c *busiClient) TransOutRevertBSaga(ctx context.Context, in *BusiReq, opts return out, nil } -func (c *busiClient) TransOutHeaderYes(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransOutHeaderYes(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransOutHeaderYes", in, out, opts...) if err != nil { @@ -211,7 +211,7 @@ func (c *busiClient) TransOutHeaderYes(ctx context.Context, in *BusiReq, opts .. return out, nil } -func (c *busiClient) TransOutHeaderNo(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransOutHeaderNo(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransOutHeaderNo", in, out, opts...) if err != nil { @@ -220,7 +220,7 @@ func (c *busiClient) TransOutHeaderNo(ctx context.Context, in *BusiReq, opts ... return out, nil } -func (c *busiClient) TransInRedis(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransInRedis(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransInRedis", in, out, opts...) if err != nil { @@ -229,7 +229,7 @@ func (c *busiClient) TransInRedis(ctx context.Context, in *BusiReq, opts ...grpc return out, nil } -func (c *busiClient) TransOutRedis(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransOutRedis(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransOutRedis", in, out, opts...) if err != nil { @@ -238,7 +238,7 @@ func (c *busiClient) TransOutRedis(ctx context.Context, in *BusiReq, opts ...grp return out, nil } -func (c *busiClient) TransInRevertRedis(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransInRevertRedis(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransInRevertRedis", in, out, opts...) if err != nil { @@ -247,7 +247,7 @@ func (c *busiClient) TransInRevertRedis(ctx context.Context, in *BusiReq, opts . return out, nil } -func (c *busiClient) TransOutRevertRedis(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) TransOutRevertRedis(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransOutRevertRedis", in, out, opts...) if err != nil { @@ -256,7 +256,7 @@ func (c *busiClient) TransOutRevertRedis(ctx context.Context, in *BusiReq, opts return out, nil } -func (c *busiClient) QueryPrepared(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*BusiReply, error) { +func (c *busiClient) QueryPrepared(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*BusiReply, error) { out := new(BusiReply) err := c.cc.Invoke(ctx, "/busi.Busi/QueryPrepared", in, out, opts...) if err != nil { @@ -265,7 +265,7 @@ func (c *busiClient) QueryPrepared(ctx context.Context, in *BusiReq, opts ...grp return out, nil } -func (c *busiClient) QueryPreparedB(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) QueryPreparedB(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/QueryPreparedB", in, out, opts...) if err != nil { @@ -274,7 +274,7 @@ func (c *busiClient) QueryPreparedB(ctx context.Context, in *BusiReq, opts ...gr return out, nil } -func (c *busiClient) QueryPreparedRedis(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *busiClient) QueryPreparedRedis(ctx context.Context, in *ReqGrpc, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/QueryPreparedRedis", in, out, opts...) if err != nil { @@ -287,31 +287,31 @@ func (c *busiClient) QueryPreparedRedis(ctx context.Context, in *BusiReq, opts . // All implementations must embed UnimplementedBusiServer // for forward compatibility type BusiServer interface { - TransIn(context.Context, *BusiReq) (*emptypb.Empty, error) - TransOut(context.Context, *BusiReq) (*emptypb.Empty, error) - TransInRevert(context.Context, *BusiReq) (*emptypb.Empty, error) - TransOutRevert(context.Context, *BusiReq) (*emptypb.Empty, error) - TransInConfirm(context.Context, *BusiReq) (*emptypb.Empty, error) - TransOutConfirm(context.Context, *BusiReq) (*emptypb.Empty, error) + TransIn(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransOut(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransInRevert(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransOutRevert(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransInConfirm(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransOutConfirm(context.Context, *ReqGrpc) (*emptypb.Empty, error) XaNotify(context.Context, *emptypb.Empty) (*emptypb.Empty, error) - TransInXa(context.Context, *BusiReq) (*emptypb.Empty, error) - TransOutXa(context.Context, *BusiReq) (*emptypb.Empty, error) - TransInTcc(context.Context, *BusiReq) (*emptypb.Empty, error) - TransOutTcc(context.Context, *BusiReq) (*emptypb.Empty, error) - TransInTccNested(context.Context, *BusiReq) (*emptypb.Empty, error) - TransInBSaga(context.Context, *BusiReq) (*emptypb.Empty, error) - TransOutBSaga(context.Context, *BusiReq) (*emptypb.Empty, error) - TransInRevertBSaga(context.Context, *BusiReq) (*emptypb.Empty, error) - TransOutRevertBSaga(context.Context, *BusiReq) (*emptypb.Empty, error) - TransOutHeaderYes(context.Context, *BusiReq) (*emptypb.Empty, error) - TransOutHeaderNo(context.Context, *BusiReq) (*emptypb.Empty, error) - TransInRedis(context.Context, *BusiReq) (*emptypb.Empty, error) - TransOutRedis(context.Context, *BusiReq) (*emptypb.Empty, error) - TransInRevertRedis(context.Context, *BusiReq) (*emptypb.Empty, error) - TransOutRevertRedis(context.Context, *BusiReq) (*emptypb.Empty, error) - QueryPrepared(context.Context, *BusiReq) (*BusiReply, error) - QueryPreparedB(context.Context, *BusiReq) (*emptypb.Empty, error) - QueryPreparedRedis(context.Context, *BusiReq) (*emptypb.Empty, error) + TransInXa(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransOutXa(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransInTcc(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransOutTcc(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransInTccNested(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransInBSaga(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransOutBSaga(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransInRevertBSaga(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransOutRevertBSaga(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransOutHeaderYes(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransOutHeaderNo(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransInRedis(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransOutRedis(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransInRevertRedis(context.Context, *ReqGrpc) (*emptypb.Empty, error) + TransOutRevertRedis(context.Context, *ReqGrpc) (*emptypb.Empty, error) + QueryPrepared(context.Context, *ReqGrpc) (*BusiReply, error) + QueryPreparedB(context.Context, *ReqGrpc) (*emptypb.Empty, error) + QueryPreparedRedis(context.Context, *ReqGrpc) (*emptypb.Empty, error) mustEmbedUnimplementedBusiServer() } @@ -319,79 +319,79 @@ type BusiServer interface { type UnimplementedBusiServer struct { } -func (UnimplementedBusiServer) TransIn(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransIn(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransIn not implemented") } -func (UnimplementedBusiServer) TransOut(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransOut(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransOut not implemented") } -func (UnimplementedBusiServer) TransInRevert(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransInRevert(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransInRevert not implemented") } -func (UnimplementedBusiServer) TransOutRevert(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransOutRevert(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransOutRevert not implemented") } -func (UnimplementedBusiServer) TransInConfirm(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransInConfirm(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransInConfirm not implemented") } -func (UnimplementedBusiServer) TransOutConfirm(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransOutConfirm(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransOutConfirm not implemented") } func (UnimplementedBusiServer) XaNotify(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method XaNotify not implemented") } -func (UnimplementedBusiServer) TransInXa(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransInXa(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransInXa not implemented") } -func (UnimplementedBusiServer) TransOutXa(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransOutXa(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransOutXa not implemented") } -func (UnimplementedBusiServer) TransInTcc(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransInTcc(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransInTcc not implemented") } -func (UnimplementedBusiServer) TransOutTcc(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransOutTcc(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransOutTcc not implemented") } -func (UnimplementedBusiServer) TransInTccNested(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransInTccNested(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransInTccNested not implemented") } -func (UnimplementedBusiServer) TransInBSaga(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransInBSaga(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransInBSaga not implemented") } -func (UnimplementedBusiServer) TransOutBSaga(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransOutBSaga(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransOutBSaga not implemented") } -func (UnimplementedBusiServer) TransInRevertBSaga(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransInRevertBSaga(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransInRevertBSaga not implemented") } -func (UnimplementedBusiServer) TransOutRevertBSaga(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransOutRevertBSaga(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransOutRevertBSaga not implemented") } -func (UnimplementedBusiServer) TransOutHeaderYes(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransOutHeaderYes(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransOutHeaderYes not implemented") } -func (UnimplementedBusiServer) TransOutHeaderNo(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransOutHeaderNo(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransOutHeaderNo not implemented") } -func (UnimplementedBusiServer) TransInRedis(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransInRedis(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransInRedis not implemented") } -func (UnimplementedBusiServer) TransOutRedis(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransOutRedis(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransOutRedis not implemented") } -func (UnimplementedBusiServer) TransInRevertRedis(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransInRevertRedis(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransInRevertRedis not implemented") } -func (UnimplementedBusiServer) TransOutRevertRedis(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) TransOutRevertRedis(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransOutRevertRedis not implemented") } -func (UnimplementedBusiServer) QueryPrepared(context.Context, *BusiReq) (*BusiReply, error) { +func (UnimplementedBusiServer) QueryPrepared(context.Context, *ReqGrpc) (*BusiReply, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryPrepared not implemented") } -func (UnimplementedBusiServer) QueryPreparedB(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) QueryPreparedB(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryPreparedB not implemented") } -func (UnimplementedBusiServer) QueryPreparedRedis(context.Context, *BusiReq) (*emptypb.Empty, error) { +func (UnimplementedBusiServer) QueryPreparedRedis(context.Context, *ReqGrpc) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryPreparedRedis not implemented") } func (UnimplementedBusiServer) mustEmbedUnimplementedBusiServer() {} @@ -408,7 +408,7 @@ func RegisterBusiServer(s grpc.ServiceRegistrar, srv BusiServer) { } func _Busi_TransIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -420,13 +420,13 @@ func _Busi_TransIn_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: "/busi.Busi/TransIn", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransIn(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransIn(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -438,13 +438,13 @@ func _Busi_TransOut_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: "/busi.Busi/TransOut", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransOut(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransOut(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransInRevert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -456,13 +456,13 @@ func _Busi_TransInRevert_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: "/busi.Busi/TransInRevert", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransInRevert(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransInRevert(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransOutRevert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -474,13 +474,13 @@ func _Busi_TransOutRevert_Handler(srv interface{}, ctx context.Context, dec func FullMethod: "/busi.Busi/TransOutRevert", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransOutRevert(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransOutRevert(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransInConfirm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -492,13 +492,13 @@ func _Busi_TransInConfirm_Handler(srv interface{}, ctx context.Context, dec func FullMethod: "/busi.Busi/TransInConfirm", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransInConfirm(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransInConfirm(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransOutConfirm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -510,7 +510,7 @@ func _Busi_TransOutConfirm_Handler(srv interface{}, ctx context.Context, dec fun FullMethod: "/busi.Busi/TransOutConfirm", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransOutConfirm(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransOutConfirm(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } @@ -534,7 +534,7 @@ func _Busi_XaNotify_Handler(srv interface{}, ctx context.Context, dec func(inter } func _Busi_TransInXa_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -546,13 +546,13 @@ func _Busi_TransInXa_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: "/busi.Busi/TransInXa", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransInXa(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransInXa(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransOutXa_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -564,13 +564,13 @@ func _Busi_TransOutXa_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/busi.Busi/TransOutXa", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransOutXa(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransOutXa(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransInTcc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -582,13 +582,13 @@ func _Busi_TransInTcc_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/busi.Busi/TransInTcc", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransInTcc(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransInTcc(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransOutTcc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -600,13 +600,13 @@ func _Busi_TransOutTcc_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: "/busi.Busi/TransOutTcc", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransOutTcc(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransOutTcc(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransInTccNested_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -618,13 +618,13 @@ func _Busi_TransInTccNested_Handler(srv interface{}, ctx context.Context, dec fu FullMethod: "/busi.Busi/TransInTccNested", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransInTccNested(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransInTccNested(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransInBSaga_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -636,13 +636,13 @@ func _Busi_TransInBSaga_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: "/busi.Busi/TransInBSaga", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransInBSaga(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransInBSaga(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransOutBSaga_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -654,13 +654,13 @@ func _Busi_TransOutBSaga_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: "/busi.Busi/TransOutBSaga", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransOutBSaga(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransOutBSaga(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransInRevertBSaga_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -672,13 +672,13 @@ func _Busi_TransInRevertBSaga_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/busi.Busi/TransInRevertBSaga", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransInRevertBSaga(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransInRevertBSaga(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransOutRevertBSaga_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -690,13 +690,13 @@ func _Busi_TransOutRevertBSaga_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/busi.Busi/TransOutRevertBSaga", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransOutRevertBSaga(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransOutRevertBSaga(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransOutHeaderYes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -708,13 +708,13 @@ func _Busi_TransOutHeaderYes_Handler(srv interface{}, ctx context.Context, dec f FullMethod: "/busi.Busi/TransOutHeaderYes", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransOutHeaderYes(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransOutHeaderYes(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransOutHeaderNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -726,13 +726,13 @@ func _Busi_TransOutHeaderNo_Handler(srv interface{}, ctx context.Context, dec fu FullMethod: "/busi.Busi/TransOutHeaderNo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransOutHeaderNo(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransOutHeaderNo(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransInRedis_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -744,13 +744,13 @@ func _Busi_TransInRedis_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: "/busi.Busi/TransInRedis", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransInRedis(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransInRedis(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransOutRedis_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -762,13 +762,13 @@ func _Busi_TransOutRedis_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: "/busi.Busi/TransOutRedis", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransOutRedis(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransOutRedis(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransInRevertRedis_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -780,13 +780,13 @@ func _Busi_TransInRevertRedis_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/busi.Busi/TransInRevertRedis", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransInRevertRedis(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransInRevertRedis(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_TransOutRevertRedis_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -798,13 +798,13 @@ func _Busi_TransOutRevertRedis_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/busi.Busi/TransOutRevertRedis", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransOutRevertRedis(ctx, req.(*BusiReq)) + return srv.(BusiServer).TransOutRevertRedis(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_QueryPrepared_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -816,13 +816,13 @@ func _Busi_QueryPrepared_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: "/busi.Busi/QueryPrepared", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).QueryPrepared(ctx, req.(*BusiReq)) + return srv.(BusiServer).QueryPrepared(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_QueryPreparedB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -834,13 +834,13 @@ func _Busi_QueryPreparedB_Handler(srv interface{}, ctx context.Context, dec func FullMethod: "/busi.Busi/QueryPreparedB", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).QueryPreparedB(ctx, req.(*BusiReq)) + return srv.(BusiServer).QueryPreparedB(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } func _Busi_QueryPreparedRedis_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) + in := new(ReqGrpc) if err := dec(in); err != nil { return nil, err } @@ -852,7 +852,7 @@ func _Busi_QueryPreparedRedis_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/busi.Busi/QueryPreparedRedis", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).QueryPreparedRedis(ctx, req.(*BusiReq)) + return srv.(BusiServer).QueryPreparedRedis(ctx, req.(*ReqGrpc)) } return interceptor(ctx, in, info, handler) } diff --git a/test/busi/data.go b/test/busi/data.go index ad2554a..f2f575a 100644 --- a/test/busi/data.go +++ b/test/busi/data.go @@ -44,7 +44,7 @@ const Redis = "redis" // Mongo 1 const Mongo = "mongo" -func handleGrpcBusiness(in *BusiReq, result1 string, result2 string, busi string) error { +func handleGrpcBusiness(in *ReqGrpc, result1 string, result2 string, busi string) error { res := dtmimp.OrString(result1, result2, dtmcli.ResultSuccess) logger.Debugf("grpc busi %s %v %s %s result: %s", busi, in, result1, result2, res) if res == dtmcli.ResultSuccess { diff --git a/test/busi/utils.go b/test/busi/utils.go index d8768d3..db07113 100644 --- a/test/busi/utils.go +++ b/test/busi/utils.go @@ -25,9 +25,6 @@ import ( "google.golang.org/grpc/metadata" ) -// ReqGrpc is the req for grpc protocol -type ReqGrpc = BusiReq - func dbGet() *dtmutil.DB { return dtmutil.DbGet(BusiConf) } diff --git a/test/msg_grpc_test.go b/test/msg_grpc_test.go index 05f3997..3d5cda0 100644 --- a/test/msg_grpc_test.go +++ b/test/msg_grpc_test.go @@ -59,7 +59,7 @@ func TestMsgGrpcTimeoutFailed(t *testing.T) { } func genGrpcMsg(gid string) *dtmgrpc.MsgGrpc { - req := &busi.BusiReq{Amount: 30} + req := &busi.ReqGrpc{Amount: 30} msg := dtmgrpc.NewMsgGrpc(dtmutil.DefaultGrpcServer, gid). Add(busi.BusiGrpc+"/busi.Busi/TransOut", req). Add(busi.BusiGrpc+"/busi.Busi/TransIn", req) diff --git a/test/tcc_grpc_test.go b/test/tcc_grpc_test.go index a48bde7..06d905f 100644 --- a/test/tcc_grpc_test.go +++ b/test/tcc_grpc_test.go @@ -86,7 +86,7 @@ func TestTccGrpcHeaders(t *testing.T) { } tg.WaitResult = true }, func(tcc *dtmgrpc.TccGrpc) error { - data := &busi.BusiReq{Amount: 30} + data := &busi.ReqGrpc{Amount: 30} r := &emptypb.Empty{} return tcc.CallBranch(data, busi.BusiGrpc+"/busi.Busi/TransOutHeaderYes", "", "", r) }) diff --git a/test/workflow_grpc_test.go b/test/workflow_grpc_test.go index 856e76b..a01c3cf 100644 --- a/test/workflow_grpc_test.go +++ b/test/workflow_grpc_test.go @@ -23,7 +23,7 @@ func TestWorkflowGrpcSimple(t *testing.T) { req := &busi.ReqGrpc{Amount: 30, TransInResult: "FAILURE"} gid := dtmimp.GetFuncName() workflow.Register(gid, func(wf *workflow.Workflow, data []byte) error { - var req busi.BusiReq + var req busi.ReqGrpc dtmgimp.MustProtoUnmarshal(data, &req) _, err := busi.BusiCli.TransOutBSaga(wf.NewBranchCtx(), &req) if err != nil { @@ -43,7 +43,7 @@ func TestWorkflowGrpcNormal(t *testing.T) { req := &busi.ReqGrpc{Amount: 30, TransInResult: "FAILURE"} gid := dtmimp.GetFuncName() workflow.Register(gid, func(wf *workflow.Workflow, data []byte) error { - var req busi.BusiReq + var req busi.ReqGrpc dtmgimp.MustProtoUnmarshal(data, &req) wf.NewBranch().OnRollback(func(bb *dtmcli.BranchBarrier) error { _, err := busi.BusiCli.TransOutRevertBSaga(wf.Context, &req) @@ -68,10 +68,10 @@ func TestWorkflowGrpcNormal(t *testing.T) { func TestWorkflowMixed(t *testing.T) { workflow.SetProtocolForTest(dtmimp.ProtocolHTTP) - req := &busi.BusiReq{Amount: 30} + req := &busi.ReqGrpc{Amount: 30} gid := dtmimp.GetFuncName() workflow.Register(gid, func(wf *workflow.Workflow, data []byte) error { - var req busi.BusiReq + var req busi.ReqGrpc dtmgimp.MustProtoUnmarshal(data, &req) wf.NewBranch().OnRollback(func(bb *dtmcli.BranchBarrier) error { @@ -110,11 +110,11 @@ func TestWorkflowMixed(t *testing.T) { func TestWorkflowGrpcError(t *testing.T) { workflow.SetProtocolForTest(dtmimp.ProtocolGRPC) - req := &busi.BusiReq{Amount: 30} + req := &busi.ReqGrpc{Amount: 30} gid := dtmimp.GetFuncName() busi.MainSwitch.TransOutResult.SetOnce("ERROR") workflow.Register(gid, func(wf *workflow.Workflow, data []byte) error { - var req busi.BusiReq + var req busi.ReqGrpc dtmgimp.MustProtoUnmarshal(data, &req) _, err := busi.BusiCli.TransOut(wf.NewBranchCtx(), &req) if err != nil { diff --git a/test/workflow_ongoing_test.go b/test/workflow_ongoing_test.go index a42cdc8..6d55864 100644 --- a/test/workflow_ongoing_test.go +++ b/test/workflow_ongoing_test.go @@ -59,7 +59,7 @@ func TestWorkflowGrpcRollbackResume(t *testing.T) { gid := dtmimp.GetFuncName() ongoingStep = 0 workflow.Register(gid, func(wf *workflow.Workflow, data []byte) error { - var req busi.BusiReq + var req busi.ReqGrpc dtmgimp.MustProtoUnmarshal(data, &req) if fetchOngoingStep(0) { return dtmcli.ErrOngoing