grpc change to dtmpb
This commit is contained in:
parent
72ff2aa4a8
commit
3799661824
@ -2,9 +2,9 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.26.0
|
// protoc-gen-go v1.26.0
|
||||||
// protoc v3.17.3
|
// protoc v3.17.3
|
||||||
// source: dtmcli/dtmcli.proto
|
// source: dtmpb/dtmpb.proto
|
||||||
|
|
||||||
package dtmcli
|
package dtmpb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
@ -34,7 +34,7 @@ type DtmTransInfo struct {
|
|||||||
func (x *DtmTransInfo) Reset() {
|
func (x *DtmTransInfo) Reset() {
|
||||||
*x = DtmTransInfo{}
|
*x = DtmTransInfo{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_dtmcli_dtmcli_proto_msgTypes[0]
|
mi := &file_dtmpb_dtmpb_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -47,7 +47,7 @@ func (x *DtmTransInfo) String() string {
|
|||||||
func (*DtmTransInfo) ProtoMessage() {}
|
func (*DtmTransInfo) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *DtmTransInfo) ProtoReflect() protoreflect.Message {
|
func (x *DtmTransInfo) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_dtmcli_dtmcli_proto_msgTypes[0]
|
mi := &file_dtmpb_dtmpb_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 {
|
||||||
@ -60,7 +60,7 @@ func (x *DtmTransInfo) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use DtmTransInfo.ProtoReflect.Descriptor instead.
|
// Deprecated: Use DtmTransInfo.ProtoReflect.Descriptor instead.
|
||||||
func (*DtmTransInfo) Descriptor() ([]byte, []int) {
|
func (*DtmTransInfo) Descriptor() ([]byte, []int) {
|
||||||
return file_dtmcli_dtmcli_proto_rawDescGZIP(), []int{0}
|
return file_dtmpb_dtmpb_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DtmTransInfo) GetGid() string {
|
func (x *DtmTransInfo) GetGid() string {
|
||||||
@ -108,7 +108,7 @@ type DtmRequest struct {
|
|||||||
func (x *DtmRequest) Reset() {
|
func (x *DtmRequest) Reset() {
|
||||||
*x = DtmRequest{}
|
*x = DtmRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_dtmcli_dtmcli_proto_msgTypes[1]
|
mi := &file_dtmpb_dtmpb_proto_msgTypes[1]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -121,7 +121,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_dtmcli_dtmcli_proto_msgTypes[1]
|
mi := &file_dtmpb_dtmpb_proto_msgTypes[1]
|
||||||
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 {
|
||||||
@ -134,7 +134,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_dtmcli_dtmcli_proto_rawDescGZIP(), []int{1}
|
return file_dtmpb_dtmpb_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DtmRequest) GetGid() string {
|
func (x *DtmRequest) GetGid() string {
|
||||||
@ -192,7 +192,7 @@ type DtmReply struct {
|
|||||||
func (x *DtmReply) Reset() {
|
func (x *DtmReply) Reset() {
|
||||||
*x = DtmReply{}
|
*x = DtmReply{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_dtmcli_dtmcli_proto_msgTypes[2]
|
mi := &file_dtmpb_dtmpb_proto_msgTypes[2]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -205,7 +205,7 @@ func (x *DtmReply) String() string {
|
|||||||
func (*DtmReply) ProtoMessage() {}
|
func (*DtmReply) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *DtmReply) ProtoReflect() protoreflect.Message {
|
func (x *DtmReply) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_dtmcli_dtmcli_proto_msgTypes[2]
|
mi := &file_dtmpb_dtmpb_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))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -218,7 +218,7 @@ func (x *DtmReply) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use DtmReply.ProtoReflect.Descriptor instead.
|
// Deprecated: Use DtmReply.ProtoReflect.Descriptor instead.
|
||||||
func (*DtmReply) Descriptor() ([]byte, []int) {
|
func (*DtmReply) Descriptor() ([]byte, []int) {
|
||||||
return file_dtmcli_dtmcli_proto_rawDescGZIP(), []int{2}
|
return file_dtmpb_dtmpb_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DtmReply) GetDtmResult() string {
|
func (x *DtmReply) GetDtmResult() string {
|
||||||
@ -249,7 +249,7 @@ type BusiRequest struct {
|
|||||||
func (x *BusiRequest) Reset() {
|
func (x *BusiRequest) Reset() {
|
||||||
*x = BusiRequest{}
|
*x = BusiRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_dtmcli_dtmcli_proto_msgTypes[3]
|
mi := &file_dtmpb_dtmpb_proto_msgTypes[3]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -262,7 +262,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_dtmcli_dtmcli_proto_msgTypes[3]
|
mi := &file_dtmpb_dtmpb_proto_msgTypes[3]
|
||||||
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 {
|
||||||
@ -275,7 +275,7 @@ 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_dtmcli_dtmcli_proto_rawDescGZIP(), []int{3}
|
return file_dtmpb_dtmpb_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BusiRequest) GetInfo() *DtmTransInfo {
|
func (x *BusiRequest) GetInfo() *DtmTransInfo {
|
||||||
@ -312,7 +312,7 @@ type BusiReply struct {
|
|||||||
func (x *BusiReply) Reset() {
|
func (x *BusiReply) Reset() {
|
||||||
*x = BusiReply{}
|
*x = BusiReply{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_dtmcli_dtmcli_proto_msgTypes[4]
|
mi := &file_dtmpb_dtmpb_proto_msgTypes[4]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -325,7 +325,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_dtmcli_dtmcli_proto_msgTypes[4]
|
mi := &file_dtmpb_dtmpb_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 {
|
||||||
@ -338,7 +338,7 @@ 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_dtmcli_dtmcli_proto_rawDescGZIP(), []int{4}
|
return file_dtmpb_dtmpb_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BusiReply) GetDtmResult() string {
|
func (x *BusiReply) GetDtmResult() string {
|
||||||
@ -355,78 +355,78 @@ func (x *BusiReply) GetDtmMessage() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
var File_dtmcli_dtmcli_proto protoreflect.FileDescriptor
|
var File_dtmpb_dtmpb_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_dtmcli_dtmcli_proto_rawDesc = []byte{
|
var file_dtmpb_dtmpb_proto_rawDesc = []byte{
|
||||||
0x0a, 0x13, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2f, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e,
|
0x0a, 0x11, 0x64, 0x74, 0x6d, 0x70, 0x62, 0x2f, 0x64, 0x74, 0x6d, 0x70, 0x62, 0x2e, 0x70, 0x72,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x22, 0x6c, 0x0a,
|
0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x22, 0x6c, 0x0a, 0x0c, 0x44,
|
||||||
0x0c, 0x44, 0x74, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a,
|
0x74, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x47,
|
||||||
0x03, 0x47, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x47, 0x69, 0x64, 0x12,
|
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x47, 0x69, 0x64, 0x12, 0x1c, 0x0a,
|
||||||
0x1c, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
|
0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x28, 0x09, 0x52, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a,
|
0x52, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x42,
|
||||||
0x08, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x42,
|
||||||
0x08, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x12, 0x10, 0x0a, 0x03, 0x44, 0x74, 0x6d,
|
0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x12, 0x10, 0x0a, 0x03, 0x44, 0x74, 0x6d, 0x18, 0x04,
|
||||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x44, 0x74, 0x6d, 0x22, 0x83, 0x02, 0x0a, 0x0a,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x44, 0x74, 0x6d, 0x22, 0x83, 0x02, 0x0a, 0x0a, 0x44, 0x74,
|
||||||
0x44, 0x74, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x47, 0x69,
|
0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x47, 0x69, 0x64, 0x18,
|
||||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x47, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09,
|
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x47, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x72,
|
||||||
0x54, 0x72, 0x61, 0x6e, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x61, 0x6e, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x54,
|
||||||
0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x51, 0x75,
|
0x72, 0x61, 0x6e, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72,
|
||||||
0x65, 0x72, 0x79, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
|
0x79, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x09, 0x52, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64,
|
0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x12, 0x16,
|
||||||
0x12, 0x16, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
|
0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||||
0x52, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x33, 0x0a, 0x05, 0x45, 0x78, 0x74, 0x72,
|
0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x33, 0x0a, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x18,
|
||||||
0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69,
|
0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x44,
|
||||||
0x2e, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x72,
|
0x74, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45,
|
||||||
0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x18, 0x0a,
|
|
||||||
0x07, 0x41, 0x70, 0x70, 0x44, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
|
|
||||||
0x41, 0x70, 0x70, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x38, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61,
|
|
||||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
|
||||||
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
|
||||||
0x01, 0x22, 0x48, 0x0a, 0x08, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1c, 0x0a,
|
|
||||||
0x09, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x09, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x44,
|
|
||||||
0x74, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
||||||
0x0a, 0x44, 0x74, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xc1, 0x01, 0x0a, 0x0b,
|
|
||||||
0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x69,
|
|
||||||
0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x74, 0x6d, 0x63,
|
|
||||||
0x6c, 0x69, 0x2e, 0x44, 0x74, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
|
||||||
0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x18, 0x02,
|
|
||||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75,
|
|
||||||
0x73, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45,
|
|
||||||
0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x41,
|
0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x41,
|
||||||
0x70, 0x70, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x41, 0x70,
|
0x70, 0x70, 0x44, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x41, 0x70,
|
||||||
0x70, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x38, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e,
|
0x70, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x38, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e,
|
||||||
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
|
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
|
||||||
0x49, 0x0a, 0x09, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1c, 0x0a, 0x09,
|
0x48, 0x0a, 0x08, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x44,
|
||||||
0x44, 0x74, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x74, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||||
0x09, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x74,
|
0x44, 0x74, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x74, 0x6d,
|
||||||
0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
|
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x44,
|
||||||
0x44, 0x74, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x35, 0x0a, 0x03, 0x44, 0x74,
|
0x74, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xc1, 0x01, 0x0a, 0x0b, 0x42, 0x75,
|
||||||
0x6d, 0x12, 0x2e, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x12, 0x2e, 0x64, 0x74, 0x6d, 0x63,
|
0x73, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x69, 0x6e, 0x66,
|
||||||
0x6c, 0x69, 0x2e, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e,
|
0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69,
|
||||||
0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
|
0x2e, 0x44, 0x74, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69,
|
||||||
0x00, 0x42, 0x1c, 0x5a, 0x1a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x18, 0x02, 0x20, 0x03,
|
||||||
0x79, 0x65, 0x64, 0x66, 0x2f, 0x64, 0x74, 0x6d, 0x2f, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x62,
|
0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69,
|
||||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x74,
|
||||||
|
0x72, 0x79, 0x52, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x70, 0x70,
|
||||||
|
0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x41, 0x70, 0x70, 0x44,
|
||||||
|
0x61, 0x74, 0x61, 0x1a, 0x38, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72,
|
||||||
|
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||||
|
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x49, 0x0a,
|
||||||
|
0x09, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x44, 0x74,
|
||||||
|
0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x44,
|
||||||
|
0x74, 0x6d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x74, 0x6d, 0x4d,
|
||||||
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x44, 0x74,
|
||||||
|
0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x35, 0x0a, 0x03, 0x44, 0x74, 0x6d, 0x12,
|
||||||
|
0x2e, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x12, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69,
|
||||||
|
0x2e, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x64, 0x74,
|
||||||
|
0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x44, 0x74, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42,
|
||||||
|
0x1b, 0x5a, 0x19, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x79, 0x65,
|
||||||
|
0x64, 0x66, 0x2f, 0x64, 0x74, 0x6d, 0x2f, 0x64, 0x74, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_dtmcli_dtmcli_proto_rawDescOnce sync.Once
|
file_dtmpb_dtmpb_proto_rawDescOnce sync.Once
|
||||||
file_dtmcli_dtmcli_proto_rawDescData = file_dtmcli_dtmcli_proto_rawDesc
|
file_dtmpb_dtmpb_proto_rawDescData = file_dtmpb_dtmpb_proto_rawDesc
|
||||||
)
|
)
|
||||||
|
|
||||||
func file_dtmcli_dtmcli_proto_rawDescGZIP() []byte {
|
func file_dtmpb_dtmpb_proto_rawDescGZIP() []byte {
|
||||||
file_dtmcli_dtmcli_proto_rawDescOnce.Do(func() {
|
file_dtmpb_dtmpb_proto_rawDescOnce.Do(func() {
|
||||||
file_dtmcli_dtmcli_proto_rawDescData = protoimpl.X.CompressGZIP(file_dtmcli_dtmcli_proto_rawDescData)
|
file_dtmpb_dtmpb_proto_rawDescData = protoimpl.X.CompressGZIP(file_dtmpb_dtmpb_proto_rawDescData)
|
||||||
})
|
})
|
||||||
return file_dtmcli_dtmcli_proto_rawDescData
|
return file_dtmpb_dtmpb_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_dtmcli_dtmcli_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
var file_dtmpb_dtmpb_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||||
var file_dtmcli_dtmcli_proto_goTypes = []interface{}{
|
var file_dtmpb_dtmpb_proto_goTypes = []interface{}{
|
||||||
(*DtmTransInfo)(nil), // 0: dtmcli.DtmTransInfo
|
(*DtmTransInfo)(nil), // 0: dtmcli.DtmTransInfo
|
||||||
(*DtmRequest)(nil), // 1: dtmcli.DtmRequest
|
(*DtmRequest)(nil), // 1: dtmcli.DtmRequest
|
||||||
(*DtmReply)(nil), // 2: dtmcli.DtmReply
|
(*DtmReply)(nil), // 2: dtmcli.DtmReply
|
||||||
@ -435,7 +435,7 @@ var file_dtmcli_dtmcli_proto_goTypes = []interface{}{
|
|||||||
nil, // 5: dtmcli.DtmRequest.ExtraEntry
|
nil, // 5: dtmcli.DtmRequest.ExtraEntry
|
||||||
nil, // 6: dtmcli.BusiRequest.ExtraEntry
|
nil, // 6: dtmcli.BusiRequest.ExtraEntry
|
||||||
}
|
}
|
||||||
var file_dtmcli_dtmcli_proto_depIdxs = []int32{
|
var file_dtmpb_dtmpb_proto_depIdxs = []int32{
|
||||||
5, // 0: dtmcli.DtmRequest.Extra:type_name -> dtmcli.DtmRequest.ExtraEntry
|
5, // 0: dtmcli.DtmRequest.Extra:type_name -> dtmcli.DtmRequest.ExtraEntry
|
||||||
0, // 1: dtmcli.BusiRequest.info:type_name -> dtmcli.DtmTransInfo
|
0, // 1: dtmcli.BusiRequest.info:type_name -> dtmcli.DtmTransInfo
|
||||||
6, // 2: dtmcli.BusiRequest.Extra:type_name -> dtmcli.BusiRequest.ExtraEntry
|
6, // 2: dtmcli.BusiRequest.Extra:type_name -> dtmcli.BusiRequest.ExtraEntry
|
||||||
@ -448,13 +448,13 @@ var file_dtmcli_dtmcli_proto_depIdxs = []int32{
|
|||||||
0, // [0:3] is the sub-list for field type_name
|
0, // [0:3] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_dtmcli_dtmcli_proto_init() }
|
func init() { file_dtmpb_dtmpb_proto_init() }
|
||||||
func file_dtmcli_dtmcli_proto_init() {
|
func file_dtmpb_dtmpb_proto_init() {
|
||||||
if File_dtmcli_dtmcli_proto != nil {
|
if File_dtmpb_dtmpb_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_dtmcli_dtmcli_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_dtmpb_dtmpb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*DtmTransInfo); i {
|
switch v := v.(*DtmTransInfo); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -466,7 +466,7 @@ func file_dtmcli_dtmcli_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_dtmcli_dtmcli_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_dtmpb_dtmpb_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
|
||||||
@ -478,7 +478,7 @@ func file_dtmcli_dtmcli_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_dtmcli_dtmcli_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_dtmpb_dtmpb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*DtmReply); i {
|
switch v := v.(*DtmReply); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -490,7 +490,7 @@ func file_dtmcli_dtmcli_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_dtmcli_dtmcli_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
file_dtmpb_dtmpb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*BusiRequest); i {
|
switch v := v.(*BusiRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -502,7 +502,7 @@ func file_dtmcli_dtmcli_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_dtmcli_dtmcli_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
file_dtmpb_dtmpb_proto_msgTypes[4].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
|
||||||
@ -519,18 +519,18 @@ func file_dtmcli_dtmcli_proto_init() {
|
|||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_dtmcli_dtmcli_proto_rawDesc,
|
RawDescriptor: file_dtmpb_dtmpb_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 7,
|
NumMessages: 7,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
GoTypes: file_dtmcli_dtmcli_proto_goTypes,
|
GoTypes: file_dtmpb_dtmpb_proto_goTypes,
|
||||||
DependencyIndexes: file_dtmcli_dtmcli_proto_depIdxs,
|
DependencyIndexes: file_dtmpb_dtmpb_proto_depIdxs,
|
||||||
MessageInfos: file_dtmcli_dtmcli_proto_msgTypes,
|
MessageInfos: file_dtmpb_dtmpb_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_dtmcli_dtmcli_proto = out.File
|
File_dtmpb_dtmpb_proto = out.File
|
||||||
file_dtmcli_dtmcli_proto_rawDesc = nil
|
file_dtmpb_dtmpb_proto_rawDesc = nil
|
||||||
file_dtmcli_dtmcli_proto_goTypes = nil
|
file_dtmpb_dtmpb_proto_goTypes = nil
|
||||||
file_dtmcli_dtmcli_proto_depIdxs = nil
|
file_dtmpb_dtmpb_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
option go_package = "github.com/yedf/dtm/dtmcli";
|
option go_package = "github.com/yedf/dtm/dtmpb";
|
||||||
|
|
||||||
package dtmcli;
|
package dtmcli;
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
|
||||||
package dtmcli
|
package dtmpb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
@ -97,5 +97,5 @@ var Dtm_ServiceDesc = grpc.ServiceDesc{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "dtmcli/dtmcli.proto",
|
Metadata: "dtmpb/dtmpb.proto",
|
||||||
}
|
}
|
||||||
@ -1,14 +1,16 @@
|
|||||||
package dtmcli
|
package dtmpb
|
||||||
|
|
||||||
|
import "github.com/yedf/dtm/dtmcli"
|
||||||
|
|
||||||
// MsgGrpc reliable msg type
|
// MsgGrpc reliable msg type
|
||||||
type MsgGrpc struct {
|
type MsgGrpc struct {
|
||||||
MsgDataGrpc
|
MsgDataGrpc
|
||||||
TransBase
|
dtmcli.TransBase
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgDataGrpc msg data
|
// MsgDataGrpc msg data
|
||||||
type MsgDataGrpc struct {
|
type MsgDataGrpc struct {
|
||||||
TransData
|
dtmcli.TransData
|
||||||
Steps []MsgStepGrpc `json:"steps"`
|
Steps []MsgStepGrpc `json:"steps"`
|
||||||
QueryPrepared string `json:"query_prepared"`
|
QueryPrepared string `json:"query_prepared"`
|
||||||
}
|
}
|
||||||
@ -22,11 +24,11 @@ type MsgStepGrpc struct {
|
|||||||
// NewMsgGrpc create new msg
|
// NewMsgGrpc create new msg
|
||||||
func NewMsgGrpc(server string, gid string) *MsgGrpc {
|
func NewMsgGrpc(server string, gid string) *MsgGrpc {
|
||||||
return &MsgGrpc{
|
return &MsgGrpc{
|
||||||
MsgDataGrpc: MsgDataGrpc{TransData: TransData{
|
MsgDataGrpc: MsgDataGrpc{TransData: dtmcli.TransData{
|
||||||
Gid: gid,
|
Gid: gid,
|
||||||
TransType: "msg",
|
TransType: "msg",
|
||||||
}},
|
}},
|
||||||
TransBase: TransBase{
|
TransBase: dtmcli.TransBase{
|
||||||
Dtm: server,
|
Dtm: server,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -34,10 +36,10 @@ func NewMsgGrpc(server string, gid string) *MsgGrpc {
|
|||||||
|
|
||||||
// Add add a new step
|
// Add add a new step
|
||||||
func (s *MsgGrpc) Add(action string, postData interface{}) *MsgGrpc {
|
func (s *MsgGrpc) Add(action string, postData interface{}) *MsgGrpc {
|
||||||
Logf("msg %s Add %s %v", s.MsgDataGrpc.Gid, action, postData)
|
dtmcli.Logf("msg %s Add %s %v", s.MsgDataGrpc.Gid, action, postData)
|
||||||
step := MsgStepGrpc{
|
step := MsgStepGrpc{
|
||||||
Action: action,
|
Action: action,
|
||||||
Data: MustMarshalString(postData),
|
Data: dtmcli.MustMarshalString(postData),
|
||||||
}
|
}
|
||||||
s.Steps = append(s.Steps, step)
|
s.Steps = append(s.Steps, step)
|
||||||
return s
|
return s
|
||||||
@ -6,7 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/yedf/dtm/dtmcli"
|
"github.com/yedf/dtm/dtmcli"
|
||||||
pb "github.com/yedf/dtm/dtmcli"
|
pb "github.com/yedf/dtm/dtmpb"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -28,8 +28,8 @@ func dynamicCallPb(ctx context.Context, in *pb.DtmRequest, pbAddr string, data [
|
|||||||
method := "/" + strings.Join(fs[1:], "/")
|
method := "/" + strings.Join(fs[1:], "/")
|
||||||
conn, err := grpc.Dial(grpcAddr, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithUnaryInterceptor(dtmcli.GrpcClientLog))
|
conn, err := grpc.Dial(grpcAddr, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithUnaryInterceptor(dtmcli.GrpcClientLog))
|
||||||
dtmcli.FatalIfError(err)
|
dtmcli.FatalIfError(err)
|
||||||
reply := &dtmcli.BusiReply{}
|
reply := &pb.BusiReply{}
|
||||||
err = conn.Invoke(ctx, method, &dtmcli.BusiRequest{Info: &dtmcli.DtmTransInfo{Gid: in.Gid}}, reply)
|
err = conn.Invoke(ctx, method, &pb.BusiRequest{Info: &pb.DtmTransInfo{Gid: in.Gid}}, reply)
|
||||||
dtmcli.FatalIfError(err)
|
dtmcli.FatalIfError(err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ import (
|
|||||||
|
|
||||||
"github.com/yedf/dtm/common"
|
"github.com/yedf/dtm/common"
|
||||||
"github.com/yedf/dtm/dtmcli"
|
"github.com/yedf/dtm/dtmcli"
|
||||||
|
"github.com/yedf/dtm/dtmpb"
|
||||||
|
|
||||||
"github.com/yedf/dtm/examples"
|
"github.com/yedf/dtm/examples"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
@ -25,7 +27,7 @@ func StartSvr() {
|
|||||||
lis, err := net.Listen("tcp", fmt.Sprintf(":%d", dtmsvrGrpcPort))
|
lis, err := net.Listen("tcp", fmt.Sprintf(":%d", dtmsvrGrpcPort))
|
||||||
dtmcli.FatalIfError(err)
|
dtmcli.FatalIfError(err)
|
||||||
s := grpc.NewServer(grpc.UnaryInterceptor(dtmcli.GrpcServerLog))
|
s := grpc.NewServer(grpc.UnaryInterceptor(dtmcli.GrpcServerLog))
|
||||||
dtmcli.RegisterDtmServer(s, &dtmServer{})
|
dtmpb.RegisterDtmServer(s, &dtmServer{})
|
||||||
dtmcli.Logf("grpc listening at %v", lis.Addr())
|
dtmcli.Logf("grpc listening at %v", lis.Addr())
|
||||||
go func() {
|
go func() {
|
||||||
err := s.Serve(lis)
|
err := s.Serve(lis)
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
package examples
|
package examples
|
||||||
|
|
||||||
import (
|
import (
|
||||||
dtmcli "github.com/yedf/dtm/dtmcli"
|
dtmpb "github.com/yedf/dtm/dtmpb"
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
@ -25,33 +25,33 @@ var File_examples_busi_proto protoreflect.FileDescriptor
|
|||||||
var file_examples_busi_proto_rawDesc = []byte{
|
var file_examples_busi_proto_rawDesc = []byte{
|
||||||
0x0a, 0x13, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x62, 0x75, 0x73, 0x69, 0x2e,
|
0x0a, 0x13, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x62, 0x75, 0x73, 0x69, 0x2e,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x1a,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x1a,
|
||||||
0x13, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2f, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x70,
|
0x11, 0x64, 0x74, 0x6d, 0x70, 0x62, 0x2f, 0x64, 0x74, 0x6d, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x32, 0x9a, 0x02, 0x0a, 0x04, 0x42, 0x75, 0x73, 0x69, 0x12, 0x30, 0x0a,
|
0x74, 0x6f, 0x32, 0x9a, 0x02, 0x0a, 0x04, 0x42, 0x75, 0x73, 0x69, 0x12, 0x30, 0x0a, 0x04, 0x43,
|
||||||
0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x13, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42,
|
0x61, 0x6c, 0x6c, 0x12, 0x13, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73,
|
||||||
|
0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c,
|
||||||
|
0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x33, 0x0a,
|
||||||
|
0x07, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x12, 0x13, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c,
|
||||||
|
0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e,
|
||||||
|
0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79,
|
||||||
|
0x22, 0x00, 0x12, 0x34, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x12, 0x13,
|
||||||
|
0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x75,
|
||||||
|
0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73,
|
||||||
|
0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x6e,
|
||||||
|
0x73, 0x49, 0x6e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x12, 0x13, 0x2e, 0x64, 0x74, 0x6d, 0x63,
|
||||||
|
0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11,
|
||||||
|
0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x70, 0x6c,
|
||||||
|
0x79, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x52,
|
||||||
|
0x65, 0x76, 0x65, 0x72, 0x74, 0x12, 0x13, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42,
|
||||||
0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x64, 0x74, 0x6d,
|
0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x64, 0x74, 0x6d,
|
||||||
0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12,
|
0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42,
|
||||||
0x33, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x12, 0x13, 0x2e, 0x64, 0x74, 0x6d,
|
0x1e, 0x5a, 0x1c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x79, 0x65,
|
||||||
0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
0x64, 0x66, 0x2f, 0x64, 0x74, 0x6d, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x62,
|
||||||
0x11, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x70,
|
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x6c, 0x79, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74,
|
|
||||||
0x12, 0x13, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65,
|
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42,
|
|
||||||
0x75, 0x73, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0d, 0x54, 0x72,
|
|
||||||
0x61, 0x6e, 0x73, 0x49, 0x6e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x12, 0x13, 0x2e, 0x64, 0x74,
|
|
||||||
0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
|
||||||
0x1a, 0x11, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65,
|
|
||||||
0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75,
|
|
||||||
0x74, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x12, 0x13, 0x2e, 0x64, 0x74, 0x6d, 0x63, 0x6c, 0x69,
|
|
||||||
0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x64,
|
|
||||||
0x74, 0x6d, 0x63, 0x6c, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
|
|
||||||
0x00, 0x42, 0x1e, 0x5a, 0x1c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
|
||||||
0x79, 0x65, 0x64, 0x66, 0x2f, 0x64, 0x74, 0x6d, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
|
|
||||||
0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_examples_busi_proto_goTypes = []interface{}{
|
var file_examples_busi_proto_goTypes = []interface{}{
|
||||||
(*dtmcli.BusiRequest)(nil), // 0: dtmcli.BusiRequest
|
(*dtmpb.BusiRequest)(nil), // 0: dtmcli.BusiRequest
|
||||||
(*dtmcli.BusiReply)(nil), // 1: dtmcli.BusiReply
|
(*dtmpb.BusiReply)(nil), // 1: dtmcli.BusiReply
|
||||||
}
|
}
|
||||||
var file_examples_busi_proto_depIdxs = []int32{
|
var file_examples_busi_proto_depIdxs = []int32{
|
||||||
0, // 0: examples.Busi.Call:input_type -> dtmcli.BusiRequest
|
0, // 0: examples.Busi.Call:input_type -> dtmcli.BusiRequest
|
||||||
|
|||||||
@ -3,7 +3,7 @@ syntax = "proto3";
|
|||||||
package examples;
|
package examples;
|
||||||
|
|
||||||
option go_package = "github.com/yedf/dtm/examples";
|
option go_package = "github.com/yedf/dtm/examples";
|
||||||
import "dtmcli/dtmcli.proto";
|
import "dtmpb/dtmpb.proto";
|
||||||
|
|
||||||
// The dtm service definition.
|
// The dtm service definition.
|
||||||
service Busi {
|
service Busi {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ package examples
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
dtmcli "github.com/yedf/dtm/dtmcli"
|
dtmpb "github.com/yedf/dtm/dtmpb"
|
||||||
grpc "google.golang.org/grpc"
|
grpc "google.golang.org/grpc"
|
||||||
codes "google.golang.org/grpc/codes"
|
codes "google.golang.org/grpc/codes"
|
||||||
status "google.golang.org/grpc/status"
|
status "google.golang.org/grpc/status"
|
||||||
@ -19,11 +19,11 @@ 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.
|
// 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 {
|
type BusiClient interface {
|
||||||
Call(ctx context.Context, in *dtmcli.BusiRequest, opts ...grpc.CallOption) (*dtmcli.BusiReply, error)
|
Call(ctx context.Context, in *dtmpb.BusiRequest, opts ...grpc.CallOption) (*dtmpb.BusiReply, error)
|
||||||
TransIn(ctx context.Context, in *dtmcli.BusiRequest, opts ...grpc.CallOption) (*dtmcli.BusiReply, error)
|
TransIn(ctx context.Context, in *dtmpb.BusiRequest, opts ...grpc.CallOption) (*dtmpb.BusiReply, error)
|
||||||
TransOut(ctx context.Context, in *dtmcli.BusiRequest, opts ...grpc.CallOption) (*dtmcli.BusiReply, error)
|
TransOut(ctx context.Context, in *dtmpb.BusiRequest, opts ...grpc.CallOption) (*dtmpb.BusiReply, error)
|
||||||
TransInRevert(ctx context.Context, in *dtmcli.BusiRequest, opts ...grpc.CallOption) (*dtmcli.BusiReply, error)
|
TransInRevert(ctx context.Context, in *dtmpb.BusiRequest, opts ...grpc.CallOption) (*dtmpb.BusiReply, error)
|
||||||
TransOutRevert(ctx context.Context, in *dtmcli.BusiRequest, opts ...grpc.CallOption) (*dtmcli.BusiReply, error)
|
TransOutRevert(ctx context.Context, in *dtmpb.BusiRequest, opts ...grpc.CallOption) (*dtmpb.BusiReply, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type busiClient struct {
|
type busiClient struct {
|
||||||
@ -34,8 +34,8 @@ func NewBusiClient(cc grpc.ClientConnInterface) BusiClient {
|
|||||||
return &busiClient{cc}
|
return &busiClient{cc}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *busiClient) Call(ctx context.Context, in *dtmcli.BusiRequest, opts ...grpc.CallOption) (*dtmcli.BusiReply, error) {
|
func (c *busiClient) Call(ctx context.Context, in *dtmpb.BusiRequest, opts ...grpc.CallOption) (*dtmpb.BusiReply, error) {
|
||||||
out := new(dtmcli.BusiReply)
|
out := new(dtmpb.BusiReply)
|
||||||
err := c.cc.Invoke(ctx, "/examples.Busi/Call", in, out, opts...)
|
err := c.cc.Invoke(ctx, "/examples.Busi/Call", in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -43,8 +43,8 @@ func (c *busiClient) Call(ctx context.Context, in *dtmcli.BusiRequest, opts ...g
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *busiClient) TransIn(ctx context.Context, in *dtmcli.BusiRequest, opts ...grpc.CallOption) (*dtmcli.BusiReply, error) {
|
func (c *busiClient) TransIn(ctx context.Context, in *dtmpb.BusiRequest, opts ...grpc.CallOption) (*dtmpb.BusiReply, error) {
|
||||||
out := new(dtmcli.BusiReply)
|
out := new(dtmpb.BusiReply)
|
||||||
err := c.cc.Invoke(ctx, "/examples.Busi/TransIn", in, out, opts...)
|
err := c.cc.Invoke(ctx, "/examples.Busi/TransIn", in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -52,8 +52,8 @@ func (c *busiClient) TransIn(ctx context.Context, in *dtmcli.BusiRequest, opts .
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *busiClient) TransOut(ctx context.Context, in *dtmcli.BusiRequest, opts ...grpc.CallOption) (*dtmcli.BusiReply, error) {
|
func (c *busiClient) TransOut(ctx context.Context, in *dtmpb.BusiRequest, opts ...grpc.CallOption) (*dtmpb.BusiReply, error) {
|
||||||
out := new(dtmcli.BusiReply)
|
out := new(dtmpb.BusiReply)
|
||||||
err := c.cc.Invoke(ctx, "/examples.Busi/TransOut", in, out, opts...)
|
err := c.cc.Invoke(ctx, "/examples.Busi/TransOut", in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -61,8 +61,8 @@ func (c *busiClient) TransOut(ctx context.Context, in *dtmcli.BusiRequest, opts
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *busiClient) TransInRevert(ctx context.Context, in *dtmcli.BusiRequest, opts ...grpc.CallOption) (*dtmcli.BusiReply, error) {
|
func (c *busiClient) TransInRevert(ctx context.Context, in *dtmpb.BusiRequest, opts ...grpc.CallOption) (*dtmpb.BusiReply, error) {
|
||||||
out := new(dtmcli.BusiReply)
|
out := new(dtmpb.BusiReply)
|
||||||
err := c.cc.Invoke(ctx, "/examples.Busi/TransInRevert", in, out, opts...)
|
err := c.cc.Invoke(ctx, "/examples.Busi/TransInRevert", in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -70,8 +70,8 @@ func (c *busiClient) TransInRevert(ctx context.Context, in *dtmcli.BusiRequest,
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *busiClient) TransOutRevert(ctx context.Context, in *dtmcli.BusiRequest, opts ...grpc.CallOption) (*dtmcli.BusiReply, error) {
|
func (c *busiClient) TransOutRevert(ctx context.Context, in *dtmpb.BusiRequest, opts ...grpc.CallOption) (*dtmpb.BusiReply, error) {
|
||||||
out := new(dtmcli.BusiReply)
|
out := new(dtmpb.BusiReply)
|
||||||
err := c.cc.Invoke(ctx, "/examples.Busi/TransOutRevert", in, out, opts...)
|
err := c.cc.Invoke(ctx, "/examples.Busi/TransOutRevert", in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -83,11 +83,11 @@ func (c *busiClient) TransOutRevert(ctx context.Context, in *dtmcli.BusiRequest,
|
|||||||
// All implementations must embed UnimplementedBusiServer
|
// All implementations must embed UnimplementedBusiServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
type BusiServer interface {
|
type BusiServer interface {
|
||||||
Call(context.Context, *dtmcli.BusiRequest) (*dtmcli.BusiReply, error)
|
Call(context.Context, *dtmpb.BusiRequest) (*dtmpb.BusiReply, error)
|
||||||
TransIn(context.Context, *dtmcli.BusiRequest) (*dtmcli.BusiReply, error)
|
TransIn(context.Context, *dtmpb.BusiRequest) (*dtmpb.BusiReply, error)
|
||||||
TransOut(context.Context, *dtmcli.BusiRequest) (*dtmcli.BusiReply, error)
|
TransOut(context.Context, *dtmpb.BusiRequest) (*dtmpb.BusiReply, error)
|
||||||
TransInRevert(context.Context, *dtmcli.BusiRequest) (*dtmcli.BusiReply, error)
|
TransInRevert(context.Context, *dtmpb.BusiRequest) (*dtmpb.BusiReply, error)
|
||||||
TransOutRevert(context.Context, *dtmcli.BusiRequest) (*dtmcli.BusiReply, error)
|
TransOutRevert(context.Context, *dtmpb.BusiRequest) (*dtmpb.BusiReply, error)
|
||||||
mustEmbedUnimplementedBusiServer()
|
mustEmbedUnimplementedBusiServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,19 +95,19 @@ type BusiServer interface {
|
|||||||
type UnimplementedBusiServer struct {
|
type UnimplementedBusiServer struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (UnimplementedBusiServer) Call(context.Context, *dtmcli.BusiRequest) (*dtmcli.BusiReply, error) {
|
func (UnimplementedBusiServer) Call(context.Context, *dtmpb.BusiRequest) (*dtmpb.BusiReply, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Call not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method Call not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedBusiServer) TransIn(context.Context, *dtmcli.BusiRequest) (*dtmcli.BusiReply, error) {
|
func (UnimplementedBusiServer) TransIn(context.Context, *dtmpb.BusiRequest) (*dtmpb.BusiReply, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method TransIn not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method TransIn not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedBusiServer) TransOut(context.Context, *dtmcli.BusiRequest) (*dtmcli.BusiReply, error) {
|
func (UnimplementedBusiServer) TransOut(context.Context, *dtmpb.BusiRequest) (*dtmpb.BusiReply, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method TransOut not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method TransOut not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedBusiServer) TransInRevert(context.Context, *dtmcli.BusiRequest) (*dtmcli.BusiReply, error) {
|
func (UnimplementedBusiServer) TransInRevert(context.Context, *dtmpb.BusiRequest) (*dtmpb.BusiReply, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method TransInRevert not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method TransInRevert not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedBusiServer) TransOutRevert(context.Context, *dtmcli.BusiRequest) (*dtmcli.BusiReply, error) {
|
func (UnimplementedBusiServer) TransOutRevert(context.Context, *dtmpb.BusiRequest) (*dtmpb.BusiReply, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method TransOutRevert not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method TransOutRevert not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedBusiServer) mustEmbedUnimplementedBusiServer() {}
|
func (UnimplementedBusiServer) mustEmbedUnimplementedBusiServer() {}
|
||||||
@ -124,7 +124,7 @@ func RegisterBusiServer(s grpc.ServiceRegistrar, srv BusiServer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func _Busi_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Busi_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(dtmcli.BusiRequest)
|
in := new(dtmpb.BusiRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -136,13 +136,13 @@ func _Busi_Call_Handler(srv interface{}, ctx context.Context, dec func(interface
|
|||||||
FullMethod: "/examples.Busi/Call",
|
FullMethod: "/examples.Busi/Call",
|
||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(BusiServer).Call(ctx, req.(*dtmcli.BusiRequest))
|
return srv.(BusiServer).Call(ctx, req.(*dtmpb.BusiRequest))
|
||||||
}
|
}
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Busi_TransIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Busi_TransIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(dtmcli.BusiRequest)
|
in := new(dtmpb.BusiRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -154,13 +154,13 @@ func _Busi_TransIn_Handler(srv interface{}, ctx context.Context, dec func(interf
|
|||||||
FullMethod: "/examples.Busi/TransIn",
|
FullMethod: "/examples.Busi/TransIn",
|
||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(BusiServer).TransIn(ctx, req.(*dtmcli.BusiRequest))
|
return srv.(BusiServer).TransIn(ctx, req.(*dtmpb.BusiRequest))
|
||||||
}
|
}
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Busi_TransOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Busi_TransOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(dtmcli.BusiRequest)
|
in := new(dtmpb.BusiRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -172,13 +172,13 @@ func _Busi_TransOut_Handler(srv interface{}, ctx context.Context, dec func(inter
|
|||||||
FullMethod: "/examples.Busi/TransOut",
|
FullMethod: "/examples.Busi/TransOut",
|
||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(BusiServer).TransOut(ctx, req.(*dtmcli.BusiRequest))
|
return srv.(BusiServer).TransOut(ctx, req.(*dtmpb.BusiRequest))
|
||||||
}
|
}
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Busi_TransInRevert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Busi_TransInRevert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(dtmcli.BusiRequest)
|
in := new(dtmpb.BusiRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -190,13 +190,13 @@ func _Busi_TransInRevert_Handler(srv interface{}, ctx context.Context, dec func(
|
|||||||
FullMethod: "/examples.Busi/TransInRevert",
|
FullMethod: "/examples.Busi/TransInRevert",
|
||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(BusiServer).TransInRevert(ctx, req.(*dtmcli.BusiRequest))
|
return srv.(BusiServer).TransInRevert(ctx, req.(*dtmpb.BusiRequest))
|
||||||
}
|
}
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Busi_TransOutRevert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Busi_TransOutRevert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(dtmcli.BusiRequest)
|
in := new(dtmpb.BusiRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -208,7 +208,7 @@ func _Busi_TransOutRevert_Handler(srv interface{}, ctx context.Context, dec func
|
|||||||
FullMethod: "/examples.Busi/TransOutRevert",
|
FullMethod: "/examples.Busi/TransOutRevert",
|
||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(BusiServer).TransOutRevert(ctx, req.(*dtmcli.BusiRequest))
|
return srv.(BusiServer).TransOutRevert(ctx, req.(*dtmpb.BusiRequest))
|
||||||
}
|
}
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/yedf/dtm/common"
|
"github.com/yedf/dtm/common"
|
||||||
"github.com/yedf/dtm/dtmcli"
|
"github.com/yedf/dtm/dtmcli"
|
||||||
|
dtmpb "github.com/yedf/dtm/dtmpb"
|
||||||
grpc "google.golang.org/grpc"
|
grpc "google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -27,7 +28,7 @@ var Busi string = fmt.Sprintf("http://localhost:%d%s", BusiPort, BusiAPI)
|
|||||||
var BusiPb string = fmt.Sprintf("localhost:%d", BusiPbPort)
|
var BusiPb string = fmt.Sprintf("localhost:%d", BusiPbPort)
|
||||||
|
|
||||||
// DtmClient grpc client for dtm
|
// DtmClient grpc client for dtm
|
||||||
var DtmClient dtmcli.DtmClient = nil
|
var DtmClient dtmpb.DtmClient = nil
|
||||||
|
|
||||||
// BaseAppStartup base app startup
|
// BaseAppStartup base app startup
|
||||||
func BaseAppStartup() *gin.Engine {
|
func BaseAppStartup() *gin.Engine {
|
||||||
@ -39,7 +40,7 @@ func BaseAppStartup() *gin.Engine {
|
|||||||
|
|
||||||
conn, err := grpc.Dial(DtmGrpcServer, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithUnaryInterceptor(dtmcli.GrpcClientLog))
|
conn, err := grpc.Dial(DtmGrpcServer, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithUnaryInterceptor(dtmcli.GrpcClientLog))
|
||||||
dtmcli.FatalIfError(err)
|
dtmcli.FatalIfError(err)
|
||||||
DtmClient = dtmcli.NewDtmClient(conn)
|
DtmClient = dtmpb.NewDtmClient(conn)
|
||||||
dtmcli.Logf("dtm client inited")
|
dtmcli.Logf("dtm client inited")
|
||||||
|
|
||||||
lis, err := net.Listen("tcp", fmt.Sprintf(":%d", BusiPbPort))
|
lis, err := net.Listen("tcp", fmt.Sprintf(":%d", BusiPbPort))
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
dtmcli "github.com/yedf/dtm/dtmcli"
|
dtmpb "github.com/yedf/dtm/dtmpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
// busiServer is used to implement helloworld.GreeterServer.
|
// busiServer is used to implement helloworld.GreeterServer.
|
||||||
@ -13,7 +13,7 @@ type busiServer struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SayHello implements helloworld.GreeterServer
|
// SayHello implements helloworld.GreeterServer
|
||||||
func (s *busiServer) Call(ctx context.Context, in *dtmcli.BusiRequest) (*dtmcli.BusiReply, error) {
|
func (s *busiServer) Call(ctx context.Context, in *dtmpb.BusiRequest) (*dtmpb.BusiReply, error) {
|
||||||
log.Printf("busiServer received: %v", in)
|
log.Printf("busiServer received: %v", in)
|
||||||
return &dtmcli.BusiReply{DtmResult: "SUCCESS", DtmMessage: "ok"}, nil
|
return &dtmpb.BusiReply{DtmResult: "SUCCESS", DtmMessage: "ok"}, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/yedf/dtm/dtmcli"
|
"github.com/yedf/dtm/dtmcli"
|
||||||
|
dtmpb "github.com/yedf/dtm/dtmpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MsgPbSetup 1
|
// MsgPbSetup 1
|
||||||
@ -15,7 +16,7 @@ func MsgPbSetup(app *gin.Engine) {
|
|||||||
// MsgPbFireRequest 1
|
// MsgPbFireRequest 1
|
||||||
func MsgPbFireRequest() string {
|
func MsgPbFireRequest() string {
|
||||||
dtmcli.Logf("MsgPbFireRequest")
|
dtmcli.Logf("MsgPbFireRequest")
|
||||||
reply, err := DtmClient.Call(context.Background(), &dtmcli.DtmRequest{
|
reply, err := DtmClient.Call(context.Background(), &dtmpb.DtmRequest{
|
||||||
Gid: "pb_test",
|
Gid: "pb_test",
|
||||||
TransType: "msg",
|
TransType: "msg",
|
||||||
Method: "submit",
|
Method: "submit",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user