Documentation ¶
Index ¶
- Variables
- func GetServerAndMethod(grpcURL string) (string, string)
- func MustGetConn(grpcServer string) *grpc.ClientConn
- func MustGetRawConn(grpcServer string) *grpc.ClientConn
- func MustMarshalString(v interface{}) string
- func MustProtoMarshal(msg proto.Message) []byte
- func PanicIf(cond bool, err error)
- func RegisterDtmSvcServer(s grpc.ServiceRegistrar, srv DtmSvcServer)
- type DtmRequest
- func (*DtmRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DtmRequest) GetBinPayloads() [][]byte
- func (x *DtmRequest) GetCustomedData() string
- func (x *DtmRequest) GetGid() string
- func (x *DtmRequest) GetQueryPrepared() string
- func (x *DtmRequest) GetSteps() string
- func (x *DtmRequest) GetTransOptions() string
- func (x *DtmRequest) GetTransType() string
- func (*DtmRequest) ProtoMessage()
- func (x *DtmRequest) ProtoReflect() protoreflect.Message
- func (x *DtmRequest) Reset()
- func (x *DtmRequest) String() string
- type DtmSvcClient
- type DtmSvcServer
- type TransBase
- type UnimplementedDtmSvcServer
- type UnsafeDtmSvcServer
Constants ¶
This section is empty.
Variables ¶
var DtmSvc_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dtmsdkimp.DtmSvc", HandlerType: (*DtmSvcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Submit", Handler: _DtmSvc_Submit_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "dtmsdk/dtmsdkimp/dtm.proto", }
DtmSvc_ServiceDesc is the grpc.ServiceDesc for DtmSvc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_dtmsdk_dtmsdkimp_dtm_proto protoreflect.FileDescriptor
Functions ¶
func GetServerAndMethod ¶
GetServerAndMethod 将grpc的url分解为server和method
func MustGetRawConn ¶
func MustGetRawConn(grpcServer string) *grpc.ClientConn
MustGetRawConn raw []byte in and out
func MustMarshalString ¶
func MustMarshalString(v interface{}) string
MustMarshalString checked version for marshal
func MustProtoMarshal ¶
MustProtoMarshal must version of proto.Marshal
func RegisterDtmSvcServer ¶
func RegisterDtmSvcServer(s grpc.ServiceRegistrar, srv DtmSvcServer)
Types ¶
type DtmRequest ¶
type DtmRequest struct { Gid string `protobuf:"bytes,1,opt,name=Gid,proto3" json:"Gid,omitempty"` TransType string `protobuf:"bytes,2,opt,name=TransType,proto3" json:"TransType,omitempty"` TransOptions string `protobuf:"bytes,3,opt,name=TransOptions,proto3" json:"TransOptions,omitempty"` CustomedData string `protobuf:"bytes,4,opt,name=CustomedData,proto3" json:"CustomedData,omitempty"` BinPayloads [][]byte `protobuf:"bytes,5,rep,name=BinPayloads,proto3" json:"BinPayloads,omitempty"` // for MSG/SAGA branch payloads QueryPrepared string `protobuf:"bytes,6,opt,name=QueryPrepared,proto3" json:"QueryPrepared,omitempty"` // for MSG Steps string `protobuf:"bytes,7,opt,name=Steps,proto3" json:"Steps,omitempty"` // contains filtered or unexported fields }
func (*DtmRequest) Descriptor
deprecated
func (*DtmRequest) Descriptor() ([]byte, []int)
Deprecated: Use DtmRequest.ProtoReflect.Descriptor instead.
func (*DtmRequest) GetBinPayloads ¶
func (x *DtmRequest) GetBinPayloads() [][]byte
func (*DtmRequest) GetCustomedData ¶
func (x *DtmRequest) GetCustomedData() string
func (*DtmRequest) GetGid ¶
func (x *DtmRequest) GetGid() string
func (*DtmRequest) GetQueryPrepared ¶
func (x *DtmRequest) GetQueryPrepared() string
func (*DtmRequest) GetSteps ¶
func (x *DtmRequest) GetSteps() string
func (*DtmRequest) GetTransOptions ¶
func (x *DtmRequest) GetTransOptions() string
func (*DtmRequest) GetTransType ¶
func (x *DtmRequest) GetTransType() string
func (*DtmRequest) ProtoMessage ¶
func (*DtmRequest) ProtoMessage()
func (*DtmRequest) ProtoReflect ¶
func (x *DtmRequest) ProtoReflect() protoreflect.Message
func (*DtmRequest) Reset ¶
func (x *DtmRequest) Reset()
func (*DtmRequest) String ¶
func (x *DtmRequest) String() string
type DtmSvcClient ¶
type DtmSvcClient interface { // rpc RegisterBranch(DtmBranchRequest) returns (google.protobuf.Empty) {} Submit(ctx context.Context, in *DtmRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
DtmSvcClient is the client API for DtmSvc service.
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.
func NewDtmSvcClient ¶
func NewDtmSvcClient(cc grpc.ClientConnInterface) DtmSvcClient
type DtmSvcServer ¶
type DtmSvcServer interface { // rpc RegisterBranch(DtmBranchRequest) returns (google.protobuf.Empty) {} Submit(context.Context, *DtmRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
DtmSvcServer is the server API for DtmSvc service. All implementations must embed UnimplementedDtmSvcServer for forward compatibility
type TransBase ¶
type TransBase struct { Gid string `json:"gid"` TransType string `json:"trans_type"` Dtm string `json:"-"` CustomData string `json:"custom_data,omitempty"` Steps []map[string]string `json:"steps,omitempty"` // use in MSG/SAGA Payloads []string `json:"payloads,omitempty"` // used in MSG/SAGA BinPayloads [][]byte `json:"-"` Op string `json:"-"` // used in XA/TCC QueryPrepared string `json:"query_prepared,omitempty"` // used in MSG }
TransBase base for all trans
type UnimplementedDtmSvcServer ¶
type UnimplementedDtmSvcServer struct{}
UnimplementedDtmSvcServer must be embedded to have forward compatible implementations.
func (UnimplementedDtmSvcServer) Submit ¶
func (UnimplementedDtmSvcServer) Submit(context.Context, *DtmRequest) (*emptypb.Empty, error)
type UnsafeDtmSvcServer ¶
type UnsafeDtmSvcServer interface {
// contains filtered or unexported methods
}
UnsafeDtmSvcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DtmSvcServer will result in compilation errors.