dtmsdkimp

package
v0.0.0-...-5007fb2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
var File_dtmsdk_dtmsdkimp_dtm_proto protoreflect.FileDescriptor

Functions

func GetServerAndMethod

func GetServerAndMethod(grpcURL string) (string, string)

GetServerAndMethod 将grpc的url分解为server和method

func MustGetConn

func MustGetConn(grpcServer string) *grpc.ClientConn

MustGetConn get grpc conn

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

func MustProtoMarshal(msg proto.Message) []byte

MustProtoMarshal must version of proto.Marshal

func PanicIf

func PanicIf(cond bool, err error)

PanicIf name is clear

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

func (*TransBase) Call

func (s *TransBase) Call(operation string) error

Call call an operation

type UnimplementedDtmSvcServer

type UnimplementedDtmSvcServer struct{}

UnimplementedDtmSvcServer must be embedded to have forward compatible implementations.

func (UnimplementedDtmSvcServer) Submit

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL