before fixing msg bug
This commit is contained in:
parent
69b7495a71
commit
e751881898
@ -63,7 +63,6 @@ func (t *Tcc) CallBranch(body interface{}, tryURL string, confirmURL string, can
|
|||||||
"gid": t.Gid,
|
"gid": t.Gid,
|
||||||
"branch_id": branchID,
|
"branch_id": branchID,
|
||||||
"trans_type": "tcc",
|
"trans_type": "tcc",
|
||||||
"status": "prepared",
|
|
||||||
"data": string(MustMarshal(body)),
|
"data": string(MustMarshal(body)),
|
||||||
"try": tryURL,
|
"try": tryURL,
|
||||||
"confirm": confirmURL,
|
"confirm": confirmURL,
|
||||||
|
|||||||
@ -60,12 +60,17 @@ type TransBase struct {
|
|||||||
WaitResult bool
|
WaitResult bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewTransBase 1
|
||||||
|
func NewTransBase(dtm string, parentID string) *TransBase {
|
||||||
|
return &TransBase{
|
||||||
|
IDGenerator: IDGenerator{parentID: parentID},
|
||||||
|
Dtm: dtm,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TransBaseFromQuery construct transaction info from request
|
// TransBaseFromQuery construct transaction info from request
|
||||||
func TransBaseFromQuery(qs url.Values) *TransBase {
|
func TransBaseFromQuery(qs url.Values) *TransBase {
|
||||||
return &TransBase{
|
return NewTransBase(qs.Get("dtm"), qs.Get("branch_id"))
|
||||||
IDGenerator: IDGenerator{parentID: qs.Get("branch_id")},
|
|
||||||
Dtm: qs.Get("dtm"),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// CallDtm 调用dtm服务器,返回事务的状态
|
// CallDtm 调用dtm服务器,返回事务的状态
|
||||||
|
|||||||
18
dtmcli/xa.go
18
dtmcli/xa.go
@ -19,9 +19,9 @@ type XaRegisterCallback func(path string, xa *XaClient)
|
|||||||
|
|
||||||
// XaClient xa client
|
// XaClient xa client
|
||||||
type XaClient struct {
|
type XaClient struct {
|
||||||
Server string
|
Server string
|
||||||
Conf map[string]string
|
Conf map[string]string
|
||||||
CallbackURL string
|
NotifyURL string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Xa xa transaction
|
// Xa xa transaction
|
||||||
@ -40,13 +40,13 @@ func XaFromQuery(qs url.Values) (*Xa, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NewXaClient construct a xa client
|
// NewXaClient construct a xa client
|
||||||
func NewXaClient(server string, mysqlConf map[string]string, callbackURL string, register XaRegisterCallback) (*XaClient, error) {
|
func NewXaClient(server string, mysqlConf map[string]string, notifyURL string, register XaRegisterCallback) (*XaClient, error) {
|
||||||
xa := &XaClient{
|
xa := &XaClient{
|
||||||
Server: server,
|
Server: server,
|
||||||
Conf: mysqlConf,
|
Conf: mysqlConf,
|
||||||
CallbackURL: callbackURL,
|
NotifyURL: notifyURL,
|
||||||
}
|
}
|
||||||
u, err := url.Parse(callbackURL)
|
u, err := url.Parse(notifyURL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ func (xc *XaClient) XaLocalTransaction(qs url.Values, xaFunc XaLocalFunc) (ret i
|
|||||||
if rerr != nil {
|
if rerr != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
rerr = xa.CallDtm(&M{"gid": xa.Gid, "branch_id": branchID, "trans_type": "xa", "status": "prepared", "url": xc.CallbackURL}, "registerXaBranch")
|
rerr = xa.CallDtm(&M{"gid": xa.Gid, "branch_id": branchID, "trans_type": "xa", "url": xc.NotifyURL}, "registerXaBranch")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,103 +21,26 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
type DtmTransInfo struct {
|
// DtmRequest 发给dtm服务器的消息,响应为Emtpy,error == nil为成功,== Aborted 为失败 == 其他 可以重试
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
Gid string `protobuf:"bytes,1,opt,name=Gid,proto3" json:"Gid,omitempty"`
|
|
||||||
TransType string `protobuf:"bytes,2,opt,name=TransType,proto3" json:"TransType,omitempty"`
|
|
||||||
BranchID string `protobuf:"bytes,3,opt,name=BranchID,proto3" json:"BranchID,omitempty"`
|
|
||||||
BranchType string `protobuf:"bytes,4,opt,name=BranchType,proto3" json:"BranchType,omitempty"`
|
|
||||||
Dtm string `protobuf:"bytes,5,opt,name=Dtm,proto3" json:"Dtm,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DtmTransInfo) Reset() {
|
|
||||||
*x = DtmTransInfo{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[0]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DtmTransInfo) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*DtmTransInfo) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *DtmTransInfo) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[0]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use DtmTransInfo.ProtoReflect.Descriptor instead.
|
|
||||||
func (*DtmTransInfo) Descriptor() ([]byte, []int) {
|
|
||||||
return file_dtmgrpc_dtmgrpc_proto_rawDescGZIP(), []int{0}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DtmTransInfo) GetGid() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Gid
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DtmTransInfo) GetTransType() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.TransType
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DtmTransInfo) GetBranchID() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.BranchID
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DtmTransInfo) GetBranchType() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.BranchType
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DtmTransInfo) GetDtm() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Dtm
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
// The request message containing the user's name.
|
|
||||||
type DtmRequest struct {
|
type DtmRequest struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Gid string `protobuf:"bytes,1,opt,name=Gid,proto3" json:"Gid,omitempty"`
|
Gid string `protobuf:"bytes,1,opt,name=Gid,proto3" json:"Gid,omitempty"`
|
||||||
TransType string `protobuf:"bytes,2,opt,name=TransType,proto3" json:"TransType,omitempty"`
|
TransType string `protobuf:"bytes,2,opt,name=TransType,proto3" json:"TransType,omitempty"`
|
||||||
QueryPrepared string `protobuf:"bytes,3,opt,name=QueryPrepared,proto3" json:"QueryPrepared,omitempty"`
|
// QueryPrepared 对于事务消息处于prepared状态过期,责护查询QueryPrepared
|
||||||
WaitResult bool `protobuf:"varint,4,opt,name=WaitResult,proto3" json:"WaitResult,omitempty"`
|
QueryPrepared string `protobuf:"bytes,3,opt,name=QueryPrepared,proto3" json:"QueryPrepared,omitempty"`
|
||||||
Extra map[string]string `protobuf:"bytes,5,rep,name=Extra,proto3" json:"Extra,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
// WaitResult 设定这个值,Submit操作会等待dtm处理一次请求,可能在返回时,就可以把分布式事务完成
|
||||||
Data string `protobuf:"bytes,6,opt,name=Data,proto3" json:"Data,omitempty"`
|
WaitResult bool `protobuf:"varint,4,opt,name=WaitResult,proto3" json:"WaitResult,omitempty"`
|
||||||
|
// Data 包含saga、msg的子事务信息
|
||||||
|
Data string `protobuf:"bytes,5,opt,name=Data,proto3" json:"Data,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DtmRequest) Reset() {
|
func (x *DtmRequest) Reset() {
|
||||||
*x = DtmRequest{}
|
*x = DtmRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[1]
|
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -130,7 +53,7 @@ func (x *DtmRequest) String() string {
|
|||||||
func (*DtmRequest) ProtoMessage() {}
|
func (*DtmRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *DtmRequest) ProtoReflect() protoreflect.Message {
|
func (x *DtmRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[1]
|
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -143,7 +66,7 @@ func (x *DtmRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use DtmRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use DtmRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*DtmRequest) Descriptor() ([]byte, []int) {
|
func (*DtmRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_dtmgrpc_dtmgrpc_proto_rawDescGZIP(), []int{1}
|
return file_dtmgrpc_dtmgrpc_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DtmRequest) GetGid() string {
|
func (x *DtmRequest) GetGid() string {
|
||||||
@ -174,13 +97,6 @@ func (x *DtmRequest) GetWaitResult() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DtmRequest) GetExtra() map[string]string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Extra
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DtmRequest) GetData() string {
|
func (x *DtmRequest) GetData() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Data
|
return x.Data
|
||||||
@ -188,18 +104,92 @@ func (x *DtmRequest) GetData() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// The response message containing the greetings
|
// BranchInfo 事务分支信息
|
||||||
type DtmReply struct {
|
type BranchInfo struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
DtmResult string `protobuf:"bytes,1,opt,name=DtmResult,proto3" json:"DtmResult,omitempty"`
|
Gid string `protobuf:"bytes,1,opt,name=Gid,proto3" json:"Gid,omitempty"`
|
||||||
DtmMessage string `protobuf:"bytes,2,opt,name=DtmMessage,proto3" json:"DtmMessage,omitempty"`
|
TransType string `protobuf:"bytes,2,opt,name=TransType,proto3" json:"TransType,omitempty"`
|
||||||
|
BranchID string `protobuf:"bytes,3,opt,name=BranchID,proto3" json:"BranchID,omitempty"`
|
||||||
|
BranchType string `protobuf:"bytes,4,opt,name=BranchType,proto3" json:"BranchType,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DtmReply) Reset() {
|
func (x *BranchInfo) Reset() {
|
||||||
*x = DtmReply{}
|
*x = BranchInfo{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BranchInfo) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*BranchInfo) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *BranchInfo) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[1]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use BranchInfo.ProtoReflect.Descriptor instead.
|
||||||
|
func (*BranchInfo) Descriptor() ([]byte, []int) {
|
||||||
|
return file_dtmgrpc_dtmgrpc_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BranchInfo) GetGid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Gid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BranchInfo) GetTransType() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.TransType
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BranchInfo) GetBranchID() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.BranchID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BranchInfo) GetBranchType() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.BranchType
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type DtmTccBranchRequest struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Info *BranchInfo `protobuf:"bytes,1,opt,name=Info,proto3" json:"Info,omitempty"`
|
||||||
|
BusiData string `protobuf:"bytes,2,opt,name=BusiData,proto3" json:"BusiData,omitempty"`
|
||||||
|
Try string `protobuf:"bytes,3,opt,name=Try,proto3" json:"Try,omitempty"`
|
||||||
|
Confirm string `protobuf:"bytes,4,opt,name=Confirm,proto3" json:"Confirm,omitempty"`
|
||||||
|
Cancel string `protobuf:"bytes,5,opt,name=Cancel,proto3" json:"Cancel,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DtmTccBranchRequest) Reset() {
|
||||||
|
*x = DtmTccBranchRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[2]
|
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[2]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
@ -207,13 +197,13 @@ func (x *DtmReply) Reset() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DtmReply) String() string {
|
func (x *DtmTccBranchRequest) String() string {
|
||||||
return protoimpl.X.MessageStringOf(x)
|
return protoimpl.X.MessageStringOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*DtmReply) ProtoMessage() {}
|
func (*DtmTccBranchRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *DtmReply) ProtoReflect() protoreflect.Message {
|
func (x *DtmTccBranchRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[2]
|
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
@ -225,40 +215,125 @@ func (x *DtmReply) ProtoReflect() protoreflect.Message {
|
|||||||
return mi.MessageOf(x)
|
return mi.MessageOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Use DtmReply.ProtoReflect.Descriptor instead.
|
// Deprecated: Use DtmTccBranchRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*DtmReply) Descriptor() ([]byte, []int) {
|
func (*DtmTccBranchRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_dtmgrpc_dtmgrpc_proto_rawDescGZIP(), []int{2}
|
return file_dtmgrpc_dtmgrpc_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DtmReply) GetDtmResult() string {
|
func (x *DtmTccBranchRequest) GetInfo() *BranchInfo {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.DtmResult
|
return x.Info
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DtmTccBranchRequest) GetBusiData() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.BusiData
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DtmReply) GetDtmMessage() string {
|
func (x *DtmTccBranchRequest) GetTry() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.DtmMessage
|
return x.Try
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// The request message containing the user's name.
|
func (x *DtmTccBranchRequest) GetConfirm() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Confirm
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DtmTccBranchRequest) GetCancel() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Cancel
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type DtmXaBranchRequest struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Info *BranchInfo `protobuf:"bytes,1,opt,name=Info,proto3" json:"Info,omitempty"`
|
||||||
|
BusiData string `protobuf:"bytes,2,opt,name=BusiData,proto3" json:"BusiData,omitempty"`
|
||||||
|
// dtm通知业务提交和回滚的地址
|
||||||
|
Notify string `protobuf:"bytes,3,opt,name=Notify,proto3" json:"Notify,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DtmXaBranchRequest) Reset() {
|
||||||
|
*x = DtmXaBranchRequest{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[3]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DtmXaBranchRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*DtmXaBranchRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *DtmXaBranchRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[3]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use DtmXaBranchRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*DtmXaBranchRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_dtmgrpc_dtmgrpc_proto_rawDescGZIP(), []int{3}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DtmXaBranchRequest) GetInfo() *BranchInfo {
|
||||||
|
if x != nil {
|
||||||
|
return x.Info
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DtmXaBranchRequest) GetBusiData() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.BusiData
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DtmXaBranchRequest) GetNotify() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Notify
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// BusiRequest 请求业务的数据,需要携带事务信息,便于业务进行幂等处理
|
||||||
type BusiRequest struct {
|
type BusiRequest struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Info *DtmTransInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
|
Info *BranchInfo `protobuf:"bytes,1,opt,name=Info,proto3" json:"Info,omitempty"`
|
||||||
Extra map[string]string `protobuf:"bytes,2,rep,name=Extra,proto3" json:"Extra,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
Dtm string `protobuf:"bytes,2,opt,name=Dtm,proto3" json:"Dtm,omitempty"`
|
||||||
AppData []byte `protobuf:"bytes,3,opt,name=AppData,proto3" json:"AppData,omitempty"`
|
BusiData []byte `protobuf:"bytes,3,opt,name=BusiData,proto3" json:"BusiData,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BusiRequest) Reset() {
|
func (x *BusiRequest) Reset() {
|
||||||
*x = BusiRequest{}
|
*x = BusiRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[3]
|
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[4]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -271,7 +346,7 @@ func (x *BusiRequest) String() string {
|
|||||||
func (*BusiRequest) ProtoMessage() {}
|
func (*BusiRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *BusiRequest) ProtoReflect() protoreflect.Message {
|
func (x *BusiRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[3]
|
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -284,44 +359,43 @@ func (x *BusiRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use BusiRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use BusiRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*BusiRequest) Descriptor() ([]byte, []int) {
|
func (*BusiRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_dtmgrpc_dtmgrpc_proto_rawDescGZIP(), []int{3}
|
return file_dtmgrpc_dtmgrpc_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BusiRequest) GetInfo() *DtmTransInfo {
|
func (x *BusiRequest) GetInfo() *BranchInfo {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Info
|
return x.Info
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BusiRequest) GetExtra() map[string]string {
|
func (x *BusiRequest) GetDtm() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Extra
|
return x.Dtm
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BusiRequest) GetBusiData() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.BusiData
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BusiRequest) GetAppData() []byte {
|
// BusiReply 业务响应数据
|
||||||
if x != nil {
|
|
||||||
return x.AppData
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// The response message containing the greetings
|
|
||||||
type BusiReply struct {
|
type BusiReply struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
DtmResult string `protobuf:"bytes,1,opt,name=DtmResult,proto3" json:"DtmResult,omitempty"`
|
BusiData []byte `protobuf:"bytes,1,opt,name=BusiData,proto3" json:"BusiData,omitempty"`
|
||||||
DtmMessage string `protobuf:"bytes,2,opt,name=DtmMessage,proto3" json:"DtmMessage,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BusiReply) Reset() {
|
func (x *BusiReply) Reset() {
|
||||||
*x = BusiReply{}
|
*x = BusiReply{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[4]
|
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[5]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -334,7 +408,7 @@ func (x *BusiReply) String() string {
|
|||||||
func (*BusiReply) ProtoMessage() {}
|
func (*BusiReply) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *BusiReply) ProtoReflect() protoreflect.Message {
|
func (x *BusiReply) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[4]
|
mi := &file_dtmgrpc_dtmgrpc_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -347,21 +421,14 @@ func (x *BusiReply) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use BusiReply.ProtoReflect.Descriptor instead.
|
// Deprecated: Use BusiReply.ProtoReflect.Descriptor instead.
|
||||||
func (*BusiReply) Descriptor() ([]byte, []int) {
|
func (*BusiReply) Descriptor() ([]byte, []int) {
|
||||||
return file_dtmgrpc_dtmgrpc_proto_rawDescGZIP(), []int{4}
|
return file_dtmgrpc_dtmgrpc_proto_rawDescGZIP(), []int{5}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BusiReply) GetDtmResult() string {
|
func (x *BusiReply) GetBusiData() []byte {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.DtmResult
|
return x.BusiData
|
||||||
}
|
}
|
||||||
return ""
|
return nil
|
||||||
}
|
|
||||||
|
|
||||||
func (x *BusiReply) GetDtmMessage() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.DtmMessage
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var File_dtmgrpc_dtmgrpc_proto protoreflect.FileDescriptor
|
var File_dtmgrpc_dtmgrpc_proto protoreflect.FileDescriptor
|
||||||
@ -370,65 +437,74 @@ var file_dtmgrpc_dtmgrpc_proto_rawDesc = []byte{
|
|||||||
0x0a, 0x15, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70,
|
0x0a, 0x15, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70,
|
||||||
0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70, 0x63,
|
0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70, 0x63,
|
||||||
0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
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, 0x8c, 0x01,
|
0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x01,
|
||||||
0x0a, 0x0c, 0x44, 0x74, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10,
|
0x0a, 0x0a, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03,
|
||||||
0x0a, 0x03, 0x47, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x47, 0x69, 0x64,
|
0x47, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x47, 0x69, 0x64, 0x12, 0x1c,
|
||||||
0x12, 0x1c, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,
|
0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a,
|
0x09, 0x52, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d,
|
||||||
0x0a, 0x08, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20,
|
||||||
0x52, 0x08, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x42, 0x72,
|
0x01, 0x28, 0x09, 0x52, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72,
|
||||||
0x61, 0x6e, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
|
0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
|
||||||
0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x44, 0x74,
|
0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75,
|
||||||
0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x44, 0x74, 0x6d, 0x22, 0x86, 0x02, 0x0a,
|
0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x0a, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x47,
|
0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x78, 0x0a, 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,
|
||||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x47, 0x69, 0x64, 0x12, 0x1c, 0x0a,
|
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x47, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
0x09, 0x52, 0x03, 0x47, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x54,
|
||||||
0x52, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x51,
|
0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73,
|
||||||
0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01,
|
0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44,
|
||||||
0x28, 0x09, 0x52, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65,
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44,
|
||||||
0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18,
|
0x12, 0x1e, 0x0a, 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04,
|
||||||
0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65,
|
||||||
0x74, 0x12, 0x34, 0x0a, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
|
0x22, 0x9e, 0x01, 0x0a, 0x13, 0x44, 0x74, 0x6d, 0x54, 0x63, 0x63, 0x42, 0x72, 0x61, 0x6e, 0x63,
|
||||||
0x32, 0x1e, 0x2e, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x74, 0x6d, 0x52, 0x65,
|
0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70, 0x63,
|
||||||
0x52, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18,
|
0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66,
|
||||||
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x38, 0x0a, 0x0a, 0x45,
|
0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x42, 0x75, 0x73, 0x69, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20,
|
||||||
0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
|
0x01, 0x28, 0x09, 0x52, 0x08, 0x42, 0x75, 0x73, 0x69, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
|
0x03, 0x54, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x54, 0x72, 0x79, 0x12,
|
||||||
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
0x18, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x48, 0x0a, 0x08, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x70, 0x6c,
|
0x52, 0x07, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x43, 0x61, 0x6e,
|
||||||
0x79, 0x12, 0x1c, 0x0a, 0x09, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01,
|
0x63, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12,
|
0x6c, 0x22, 0x71, 0x0a, 0x12, 0x44, 0x74, 0x6d, 0x58, 0x61, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,
|
||||||
0x1e, 0x0a, 0x0a, 0x44, 0x74, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x18,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x0a, 0x44, 0x74, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22,
|
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70, 0x63, 0x2e,
|
||||||
0xc3, 0x01, 0x0a, 0x0b, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f,
|
||||||
0x29, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
|
0x12, 0x1a, 0x0a, 0x08, 0x42, 0x75, 0x73, 0x69, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x64, 0x74, 0x6d, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x74, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73,
|
0x28, 0x09, 0x52, 0x08, 0x42, 0x75, 0x73, 0x69, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06,
|
||||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x35, 0x0a, 0x05, 0x45, 0x78,
|
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4e, 0x6f,
|
||||||
0x74, 0x72, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x74, 0x6d, 0x67,
|
0x74, 0x69, 0x66, 0x79, 0x22, 0x64, 0x0a, 0x0b, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x72, 0x70, 0x63, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
|
0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x45, 0x78, 0x74, 0x72,
|
0x0b, 0x32, 0x13, 0x2e, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x72, 0x61, 0x6e,
|
||||||
0x61, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01,
|
0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03,
|
||||||
0x28, 0x0c, 0x52, 0x07, 0x41, 0x70, 0x70, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x38, 0x0a, 0x0a, 0x45,
|
0x44, 0x74, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x44, 0x74, 0x6d, 0x12, 0x1a,
|
||||||
0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
|
0x0a, 0x08, 0x42, 0x75, 0x73, 0x69, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
|
0x52, 0x08, 0x42, 0x75, 0x73, 0x69, 0x44, 0x61, 0x74, 0x61, 0x22, 0x27, 0x0a, 0x09, 0x42, 0x75,
|
||||||
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
0x73, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x42, 0x75, 0x73, 0x69, 0x44,
|
||||||
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x49, 0x0a, 0x09, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x70,
|
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x42, 0x75, 0x73, 0x69, 0x44,
|
||||||
0x6c, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18,
|
0x61, 0x74, 0x61, 0x32, 0xc8, 0x02, 0x0a, 0x03, 0x44, 0x74, 0x6d, 0x12, 0x37, 0x0a, 0x06, 0x53,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
|
0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0x13, 0x2e, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70, 0x63, 0x2e,
|
||||||
0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x74, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02,
|
0x44, 0x74, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x44, 0x74, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
|
||||||
0x32, 0x78, 0x0a, 0x03, 0x44, 0x74, 0x6d, 0x12, 0x37, 0x0a, 0x06, 0x53, 0x75, 0x62, 0x6d, 0x69,
|
0x74, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x07, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x12,
|
||||||
0x74, 0x12, 0x13, 0x2e, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x74, 0x6d, 0x52,
|
0x13, 0x2e, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x71,
|
||||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00,
|
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x36,
|
||||||
0x12, 0x38, 0x0a, 0x07, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x12, 0x13, 0x2e, 0x64, 0x74,
|
0x0a, 0x05, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x12, 0x13, 0x2e, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70,
|
||||||
0x6d, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
0x63, 0x2e, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,
|
||||||
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
|
||||||
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x1d, 0x5a, 0x1b, 0x67, 0x69,
|
0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
|
||||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x79, 0x65, 0x64, 0x66, 0x2f, 0x64, 0x74,
|
0x65, 0x72, 0x54, 0x63, 0x63, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x1c, 0x2e, 0x64, 0x74,
|
||||||
0x6d, 0x2f, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x6d, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x74, 0x6d, 0x54, 0x63, 0x63, 0x42, 0x72, 0x61, 0x6e,
|
||||||
0x33,
|
0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x49, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x58,
|
||||||
|
0x61, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x1b, 0x2e, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70,
|
||||||
|
0x63, 0x2e, 0x44, 0x74, 0x6d, 0x58, 0x61, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71,
|
||||||
|
0x75, 0x65, 0x73, 0x74, 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, 0x1d,
|
||||||
|
0x5a, 0x1b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x79, 0x65, 0x64,
|
||||||
|
0x66, 0x2f, 0x64, 0x74, 0x6d, 0x2f, 0x64, 0x74, 0x6d, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -443,27 +519,32 @@ func file_dtmgrpc_dtmgrpc_proto_rawDescGZIP() []byte {
|
|||||||
return file_dtmgrpc_dtmgrpc_proto_rawDescData
|
return file_dtmgrpc_dtmgrpc_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_dtmgrpc_dtmgrpc_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
var file_dtmgrpc_dtmgrpc_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||||
var file_dtmgrpc_dtmgrpc_proto_goTypes = []interface{}{
|
var file_dtmgrpc_dtmgrpc_proto_goTypes = []interface{}{
|
||||||
(*DtmTransInfo)(nil), // 0: dtmgrpc.DtmTransInfo
|
(*DtmRequest)(nil), // 0: dtmgrpc.DtmRequest
|
||||||
(*DtmRequest)(nil), // 1: dtmgrpc.DtmRequest
|
(*BranchInfo)(nil), // 1: dtmgrpc.BranchInfo
|
||||||
(*DtmReply)(nil), // 2: dtmgrpc.DtmReply
|
(*DtmTccBranchRequest)(nil), // 2: dtmgrpc.DtmTccBranchRequest
|
||||||
(*BusiRequest)(nil), // 3: dtmgrpc.BusiRequest
|
(*DtmXaBranchRequest)(nil), // 3: dtmgrpc.DtmXaBranchRequest
|
||||||
(*BusiReply)(nil), // 4: dtmgrpc.BusiReply
|
(*BusiRequest)(nil), // 4: dtmgrpc.BusiRequest
|
||||||
nil, // 5: dtmgrpc.DtmRequest.ExtraEntry
|
(*BusiReply)(nil), // 5: dtmgrpc.BusiReply
|
||||||
nil, // 6: dtmgrpc.BusiRequest.ExtraEntry
|
(*emptypb.Empty)(nil), // 6: google.protobuf.Empty
|
||||||
(*emptypb.Empty)(nil), // 7: google.protobuf.Empty
|
|
||||||
}
|
}
|
||||||
var file_dtmgrpc_dtmgrpc_proto_depIdxs = []int32{
|
var file_dtmgrpc_dtmgrpc_proto_depIdxs = []int32{
|
||||||
5, // 0: dtmgrpc.DtmRequest.Extra:type_name -> dtmgrpc.DtmRequest.ExtraEntry
|
1, // 0: dtmgrpc.DtmTccBranchRequest.Info:type_name -> dtmgrpc.BranchInfo
|
||||||
0, // 1: dtmgrpc.BusiRequest.info:type_name -> dtmgrpc.DtmTransInfo
|
1, // 1: dtmgrpc.DtmXaBranchRequest.Info:type_name -> dtmgrpc.BranchInfo
|
||||||
6, // 2: dtmgrpc.BusiRequest.Extra:type_name -> dtmgrpc.BusiRequest.ExtraEntry
|
1, // 2: dtmgrpc.BusiRequest.Info:type_name -> dtmgrpc.BranchInfo
|
||||||
1, // 3: dtmgrpc.Dtm.Submit:input_type -> dtmgrpc.DtmRequest
|
0, // 3: dtmgrpc.Dtm.Submit:input_type -> dtmgrpc.DtmRequest
|
||||||
1, // 4: dtmgrpc.Dtm.Prepare:input_type -> dtmgrpc.DtmRequest
|
0, // 4: dtmgrpc.Dtm.Prepare:input_type -> dtmgrpc.DtmRequest
|
||||||
7, // 5: dtmgrpc.Dtm.Submit:output_type -> google.protobuf.Empty
|
0, // 5: dtmgrpc.Dtm.Abort:input_type -> dtmgrpc.DtmRequest
|
||||||
7, // 6: dtmgrpc.Dtm.Prepare:output_type -> google.protobuf.Empty
|
2, // 6: dtmgrpc.Dtm.RegisterTccBranch:input_type -> dtmgrpc.DtmTccBranchRequest
|
||||||
5, // [5:7] is the sub-list for method output_type
|
3, // 7: dtmgrpc.Dtm.RegisterXaBranch:input_type -> dtmgrpc.DtmXaBranchRequest
|
||||||
3, // [3:5] is the sub-list for method input_type
|
6, // 8: dtmgrpc.Dtm.Submit:output_type -> google.protobuf.Empty
|
||||||
|
6, // 9: dtmgrpc.Dtm.Prepare:output_type -> google.protobuf.Empty
|
||||||
|
6, // 10: dtmgrpc.Dtm.Abort:output_type -> google.protobuf.Empty
|
||||||
|
6, // 11: dtmgrpc.Dtm.RegisterTccBranch:output_type -> google.protobuf.Empty
|
||||||
|
6, // 12: dtmgrpc.Dtm.RegisterXaBranch:output_type -> google.protobuf.Empty
|
||||||
|
8, // [8:13] is the sub-list for method output_type
|
||||||
|
3, // [3:8] is the sub-list for method input_type
|
||||||
3, // [3:3] is the sub-list for extension type_name
|
3, // [3:3] is the sub-list for extension type_name
|
||||||
3, // [3:3] is the sub-list for extension extendee
|
3, // [3:3] is the sub-list for extension extendee
|
||||||
0, // [0:3] is the sub-list for field type_name
|
0, // [0:3] is the sub-list for field type_name
|
||||||
@ -476,18 +557,6 @@ func file_dtmgrpc_dtmgrpc_proto_init() {
|
|||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_dtmgrpc_dtmgrpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_dtmgrpc_dtmgrpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*DtmTransInfo); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_dtmgrpc_dtmgrpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*DtmRequest); i {
|
switch v := v.(*DtmRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -499,8 +568,20 @@ func file_dtmgrpc_dtmgrpc_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_dtmgrpc_dtmgrpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*BranchInfo); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
file_dtmgrpc_dtmgrpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_dtmgrpc_dtmgrpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*DtmReply); i {
|
switch v := v.(*DtmTccBranchRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
@ -512,7 +593,7 @@ func file_dtmgrpc_dtmgrpc_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_dtmgrpc_dtmgrpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
file_dtmgrpc_dtmgrpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*BusiRequest); i {
|
switch v := v.(*DtmXaBranchRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
@ -524,6 +605,18 @@ func file_dtmgrpc_dtmgrpc_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_dtmgrpc_dtmgrpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
file_dtmgrpc_dtmgrpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*BusiRequest); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_dtmgrpc_dtmgrpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*BusiReply); i {
|
switch v := v.(*BusiReply); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -542,7 +635,7 @@ func file_dtmgrpc_dtmgrpc_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_dtmgrpc_dtmgrpc_proto_rawDesc,
|
RawDescriptor: file_dtmgrpc_dtmgrpc_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 7,
|
NumMessages: 6,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -9,42 +9,66 @@ package dtmgrpc;
|
|||||||
service Dtm {
|
service Dtm {
|
||||||
rpc Submit(DtmRequest) returns (google.protobuf.Empty) {}
|
rpc Submit(DtmRequest) returns (google.protobuf.Empty) {}
|
||||||
rpc Prepare(DtmRequest) returns (google.protobuf.Empty) {}
|
rpc Prepare(DtmRequest) returns (google.protobuf.Empty) {}
|
||||||
|
rpc Abort(DtmRequest) returns (google.protobuf.Empty) {}
|
||||||
|
rpc RegisterTccBranch(DtmTccBranchRequest) returns (google.protobuf.Empty) {}
|
||||||
|
rpc RegisterXaBranch(DtmXaBranchRequest) returns (google.protobuf.Empty) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
message DtmTransInfo {
|
// DtmRequest 发给dtm服务器的消息,响应为Emtpy,error == nil为成功,== Aborted 为失败 == 其他 可以重试
|
||||||
|
message DtmRequest {
|
||||||
|
string Gid = 1;
|
||||||
|
string TransType = 2;
|
||||||
|
// QueryPrepared 对于事务消息处于prepared状态过期,责护查询QueryPrepared
|
||||||
|
string QueryPrepared = 3;
|
||||||
|
// WaitResult 设定这个值,Submit操作会等待dtm处理一次请求,可能在返回时,就可以把分布式事务完成
|
||||||
|
bool WaitResult = 4;
|
||||||
|
// Data 包含saga、msg的子事务信息
|
||||||
|
string Data = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
"gid": t.Gid,
|
||||||
|
"branch_id": branchID,
|
||||||
|
"trans_type": "tcc",
|
||||||
|
"status": "prepared",
|
||||||
|
"data": string(MustMarshal(body)),
|
||||||
|
"try": tryURL,
|
||||||
|
"confirm": confirmURL,
|
||||||
|
"cancel": cancelURL,
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// BranchInfo 事务分支信息
|
||||||
|
message BranchInfo {
|
||||||
string Gid = 1;
|
string Gid = 1;
|
||||||
string TransType = 2;
|
string TransType = 2;
|
||||||
string BranchID = 3;
|
string BranchID = 3;
|
||||||
string BranchType = 4;
|
string BranchType = 4;
|
||||||
string Dtm = 5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// The request message containing the user's name.
|
message DtmTccBranchRequest {
|
||||||
message DtmRequest {
|
BranchInfo Info = 1;
|
||||||
string Gid = 1;
|
string BusiData = 2;
|
||||||
string TransType = 2;
|
string Try = 3;
|
||||||
string QueryPrepared = 3;
|
string Confirm = 4;
|
||||||
bool WaitResult = 4;
|
string Cancel = 5;
|
||||||
map<string, string> Extra = 5;
|
|
||||||
string Data = 6;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// The response message containing the greetings
|
message DtmXaBranchRequest {
|
||||||
message DtmReply {
|
BranchInfo Info = 1;
|
||||||
string DtmResult = 1;
|
string BusiData = 2;
|
||||||
string DtmMessage = 2;
|
// dtm通知业务提交和回滚的地址
|
||||||
|
string Notify = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The request message containing the user's name.
|
// BusiRequest 请求业务的数据,需要携带事务信息,便于业务进行幂等处理
|
||||||
message BusiRequest {
|
message BusiRequest {
|
||||||
DtmTransInfo info = 1;
|
BranchInfo Info = 1;
|
||||||
map<string, string> Extra = 2;
|
string Dtm = 2;
|
||||||
bytes AppData = 3;
|
bytes BusiData = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The response message containing the greetings
|
// BusiReply 业务响应数据
|
||||||
message BusiReply {
|
message BusiReply {
|
||||||
string DtmResult = 1;
|
bytes BusiData = 1;
|
||||||
string DtmMessage = 2;
|
|
||||||
}
|
}
|
||||||
@ -21,6 +21,9 @@ const _ = grpc.SupportPackageIsVersion7
|
|||||||
type DtmClient interface {
|
type DtmClient interface {
|
||||||
Submit(ctx context.Context, in *DtmRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
Submit(ctx context.Context, in *DtmRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||||
Prepare(ctx context.Context, in *DtmRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
Prepare(ctx context.Context, in *DtmRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||||
|
Abort(ctx context.Context, in *DtmRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||||
|
RegisterTccBranch(ctx context.Context, in *DtmTccBranchRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||||
|
RegisterXaBranch(ctx context.Context, in *DtmXaBranchRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type dtmClient struct {
|
type dtmClient struct {
|
||||||
@ -49,12 +52,42 @@ func (c *dtmClient) Prepare(ctx context.Context, in *DtmRequest, opts ...grpc.Ca
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *dtmClient) Abort(ctx context.Context, in *DtmRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||||
|
out := new(emptypb.Empty)
|
||||||
|
err := c.cc.Invoke(ctx, "/dtmgrpc.Dtm/Abort", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dtmClient) RegisterTccBranch(ctx context.Context, in *DtmTccBranchRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||||
|
out := new(emptypb.Empty)
|
||||||
|
err := c.cc.Invoke(ctx, "/dtmgrpc.Dtm/RegisterTccBranch", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dtmClient) RegisterXaBranch(ctx context.Context, in *DtmXaBranchRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||||
|
out := new(emptypb.Empty)
|
||||||
|
err := c.cc.Invoke(ctx, "/dtmgrpc.Dtm/RegisterXaBranch", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// DtmServer is the server API for Dtm service.
|
// DtmServer is the server API for Dtm service.
|
||||||
// All implementations must embed UnimplementedDtmServer
|
// All implementations must embed UnimplementedDtmServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
type DtmServer interface {
|
type DtmServer interface {
|
||||||
Submit(context.Context, *DtmRequest) (*emptypb.Empty, error)
|
Submit(context.Context, *DtmRequest) (*emptypb.Empty, error)
|
||||||
Prepare(context.Context, *DtmRequest) (*emptypb.Empty, error)
|
Prepare(context.Context, *DtmRequest) (*emptypb.Empty, error)
|
||||||
|
Abort(context.Context, *DtmRequest) (*emptypb.Empty, error)
|
||||||
|
RegisterTccBranch(context.Context, *DtmTccBranchRequest) (*emptypb.Empty, error)
|
||||||
|
RegisterXaBranch(context.Context, *DtmXaBranchRequest) (*emptypb.Empty, error)
|
||||||
mustEmbedUnimplementedDtmServer()
|
mustEmbedUnimplementedDtmServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,6 +101,15 @@ func (UnimplementedDtmServer) Submit(context.Context, *DtmRequest) (*emptypb.Emp
|
|||||||
func (UnimplementedDtmServer) Prepare(context.Context, *DtmRequest) (*emptypb.Empty, error) {
|
func (UnimplementedDtmServer) Prepare(context.Context, *DtmRequest) (*emptypb.Empty, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Prepare not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method Prepare not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedDtmServer) Abort(context.Context, *DtmRequest) (*emptypb.Empty, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Abort not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDtmServer) RegisterTccBranch(context.Context, *DtmTccBranchRequest) (*emptypb.Empty, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method RegisterTccBranch not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDtmServer) RegisterXaBranch(context.Context, *DtmXaBranchRequest) (*emptypb.Empty, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method RegisterXaBranch not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedDtmServer) mustEmbedUnimplementedDtmServer() {}
|
func (UnimplementedDtmServer) mustEmbedUnimplementedDtmServer() {}
|
||||||
|
|
||||||
// UnsafeDtmServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeDtmServer may be embedded to opt out of forward compatibility for this service.
|
||||||
@ -117,6 +159,60 @@ func _Dtm_Prepare_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Dtm_Abort_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DtmRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DtmServer).Abort(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/dtmgrpc.Dtm/Abort",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DtmServer).Abort(ctx, req.(*DtmRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Dtm_RegisterTccBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DtmTccBranchRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DtmServer).RegisterTccBranch(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/dtmgrpc.Dtm/RegisterTccBranch",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DtmServer).RegisterTccBranch(ctx, req.(*DtmTccBranchRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Dtm_RegisterXaBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DtmXaBranchRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DtmServer).RegisterXaBranch(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/dtmgrpc.Dtm/RegisterXaBranch",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DtmServer).RegisterXaBranch(ctx, req.(*DtmXaBranchRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// Dtm_ServiceDesc is the grpc.ServiceDesc for Dtm service.
|
// Dtm_ServiceDesc is the grpc.ServiceDesc for Dtm service.
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@ -132,6 +228,18 @@ var Dtm_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "Prepare",
|
MethodName: "Prepare",
|
||||||
Handler: _Dtm_Prepare_Handler,
|
Handler: _Dtm_Prepare_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Abort",
|
||||||
|
Handler: _Dtm_Abort_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "RegisterTccBranch",
|
||||||
|
Handler: _Dtm_RegisterTccBranch_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "RegisterXaBranch",
|
||||||
|
Handler: _Dtm_RegisterXaBranch_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "dtmgrpc/dtmgrpc.proto",
|
Metadata: "dtmgrpc/dtmgrpc.proto",
|
||||||
|
|||||||
@ -26,12 +26,12 @@ func NewSaga(server string, gid string) *SagaGrpc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add add a saga step
|
// Add add a saga step
|
||||||
func (s *SagaGrpc) Add(action string, compensate string, appData []byte) *SagaGrpc {
|
func (s *SagaGrpc) Add(action string, compensate string, busiData []byte) *SagaGrpc {
|
||||||
dtmcli.Logf("saga %s Add %s %s %v", s.SagaData.Gid, action, compensate, string(appData))
|
dtmcli.Logf("saga %s Add %s %s %v", s.SagaData.Gid, action, compensate, string(busiData))
|
||||||
step := dtmcli.SagaStep{
|
step := dtmcli.SagaStep{
|
||||||
Action: action,
|
Action: action,
|
||||||
Compensate: compensate,
|
Compensate: compensate,
|
||||||
Data: string(appData),
|
Data: string(busiData),
|
||||||
}
|
}
|
||||||
s.Steps = append(s.Steps, step)
|
s.Steps = append(s.Steps, step)
|
||||||
return s
|
return s
|
||||||
|
|||||||
@ -50,6 +50,7 @@ func registerXaBranch(c *gin.Context) (interface{}, error) {
|
|||||||
branch := TransBranch{}
|
branch := TransBranch{}
|
||||||
err := c.BindJSON(&branch)
|
err := c.BindJSON(&branch)
|
||||||
e2p(err)
|
e2p(err)
|
||||||
|
branch.Status = "prepared"
|
||||||
db := dbGet()
|
db := dbGet()
|
||||||
dbt := TransFromDb(db, branch.Gid)
|
dbt := TransFromDb(db, branch.Gid)
|
||||||
if dbt.Status != "prepared" {
|
if dbt.Status != "prepared" {
|
||||||
@ -74,7 +75,7 @@ func registerTccBranch(c *gin.Context) (interface{}, error) {
|
|||||||
branch := TransBranch{
|
branch := TransBranch{
|
||||||
Gid: data["gid"],
|
Gid: data["gid"],
|
||||||
BranchID: data["branch_id"],
|
BranchID: data["branch_id"],
|
||||||
Status: data["status"],
|
Status: "prepared",
|
||||||
Data: data["data"],
|
Data: data["data"],
|
||||||
}
|
}
|
||||||
db := dbGet()
|
db := dbGet()
|
||||||
|
|||||||
@ -54,7 +54,7 @@ func lockOneTrans(expireIn time.Duration) *TransGlobal {
|
|||||||
|
|
||||||
func handlePanic(perr *error) {
|
func handlePanic(perr *error) {
|
||||||
if err := recover(); err != nil {
|
if err := recover(); err != nil {
|
||||||
dtmcli.LogRedf("----panic %v handlered\n%s", err, string(debug.Stack()))
|
dtmcli.LogRedf("----recovered panic %v\n%s", err, string(debug.Stack()))
|
||||||
if perr != nil {
|
if perr != nil {
|
||||||
*perr = fmt.Errorf("dtm panic: %v", err)
|
*perr = fmt.Errorf("dtm panic: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -164,13 +164,13 @@ func (t *TransGlobal) getURLResult(url string, branchID, branchType string, bran
|
|||||||
server, method := dtmgrpc.GetServerAndMethod(url)
|
server, method := dtmgrpc.GetServerAndMethod(url)
|
||||||
conn := dtmgrpc.MustGetGrpcConn(server)
|
conn := dtmgrpc.MustGetGrpcConn(server)
|
||||||
err := conn.Invoke(context.Background(), method, &dtmgrpc.BusiRequest{
|
err := conn.Invoke(context.Background(), method, &dtmgrpc.BusiRequest{
|
||||||
Info: &dtmgrpc.DtmTransInfo{
|
Info: &dtmgrpc.BranchInfo{
|
||||||
Gid: t.Gid,
|
Gid: t.Gid,
|
||||||
TransType: t.TransType,
|
TransType: t.TransType,
|
||||||
BranchID: branchID,
|
BranchID: branchID,
|
||||||
BranchType: branchType,
|
BranchType: branchType,
|
||||||
},
|
},
|
||||||
AppData: []byte(branchData),
|
BusiData: []byte(branchData),
|
||||||
}, &emptypb.Empty{})
|
}, &emptypb.Empty{})
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return "SUCCESS"
|
return "SUCCESS"
|
||||||
|
|||||||
@ -61,36 +61,36 @@ func (s *busiServer) CanSubmit(ctx context.Context, in *dtmgrpc.BusiRequest) (*e
|
|||||||
|
|
||||||
func (s *busiServer) TransIn(ctx context.Context, in *dtmgrpc.BusiRequest) (*emptypb.Empty, error) {
|
func (s *busiServer) TransIn(ctx context.Context, in *dtmgrpc.BusiRequest) (*emptypb.Empty, error) {
|
||||||
req := TransReq{}
|
req := TransReq{}
|
||||||
dtmcli.MustUnmarshal(in.AppData, &req)
|
dtmcli.MustUnmarshal(in.BusiData, &req)
|
||||||
return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransInResult.Fetch(), req.TransInResult, dtmcli.GetFuncName())
|
return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransInResult.Fetch(), req.TransInResult, dtmcli.GetFuncName())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *busiServer) TransOut(ctx context.Context, in *dtmgrpc.BusiRequest) (*emptypb.Empty, error) {
|
func (s *busiServer) TransOut(ctx context.Context, in *dtmgrpc.BusiRequest) (*emptypb.Empty, error) {
|
||||||
req := TransReq{}
|
req := TransReq{}
|
||||||
dtmcli.MustUnmarshal(in.AppData, &req)
|
dtmcli.MustUnmarshal(in.BusiData, &req)
|
||||||
return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransOutResult.Fetch(), req.TransOutResult, dtmcli.GetFuncName())
|
return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransOutResult.Fetch(), req.TransOutResult, dtmcli.GetFuncName())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *busiServer) TransInRevert(ctx context.Context, in *dtmgrpc.BusiRequest) (*emptypb.Empty, error) {
|
func (s *busiServer) TransInRevert(ctx context.Context, in *dtmgrpc.BusiRequest) (*emptypb.Empty, error) {
|
||||||
req := TransReq{}
|
req := TransReq{}
|
||||||
dtmcli.MustUnmarshal(in.AppData, &req)
|
dtmcli.MustUnmarshal(in.BusiData, &req)
|
||||||
return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransInRevertResult.Fetch(), "", dtmcli.GetFuncName())
|
return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransInRevertResult.Fetch(), "", dtmcli.GetFuncName())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *busiServer) TransOutRevert(ctx context.Context, in *dtmgrpc.BusiRequest) (*emptypb.Empty, error) {
|
func (s *busiServer) TransOutRevert(ctx context.Context, in *dtmgrpc.BusiRequest) (*emptypb.Empty, error) {
|
||||||
req := TransReq{}
|
req := TransReq{}
|
||||||
dtmcli.MustUnmarshal(in.AppData, &req)
|
dtmcli.MustUnmarshal(in.BusiData, &req)
|
||||||
return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransOutRevertResult.Fetch(), "", dtmcli.GetFuncName())
|
return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransOutRevertResult.Fetch(), "", dtmcli.GetFuncName())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *busiServer) TransInConfirm(ctx context.Context, in *dtmgrpc.BusiRequest) (*emptypb.Empty, error) {
|
func (s *busiServer) TransInConfirm(ctx context.Context, in *dtmgrpc.BusiRequest) (*emptypb.Empty, error) {
|
||||||
req := TransReq{}
|
req := TransReq{}
|
||||||
dtmcli.MustUnmarshal(in.AppData, &req)
|
dtmcli.MustUnmarshal(in.BusiData, &req)
|
||||||
return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransInConfirmResult.Fetch(), "", dtmcli.GetFuncName())
|
return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransInConfirmResult.Fetch(), "", dtmcli.GetFuncName())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *busiServer) TransOutConfirm(ctx context.Context, in *dtmgrpc.BusiRequest) (*emptypb.Empty, error) {
|
func (s *busiServer) TransOutConfirm(ctx context.Context, in *dtmgrpc.BusiRequest) (*emptypb.Empty, error) {
|
||||||
req := TransReq{}
|
req := TransReq{}
|
||||||
dtmcli.MustUnmarshal(in.AppData, &req)
|
dtmcli.MustUnmarshal(in.BusiData, &req)
|
||||||
return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransOutConfirmResult.Fetch(), "", dtmcli.GetFuncName())
|
return &emptypb.Empty{}, handleGrpcBusiness(in, MainSwitch.TransOutConfirmResult.Fetch(), "", dtmcli.GetFuncName())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user