# README
English | 简体中文
dtmgrpc
dtmgrpc
is the http client sdk for dtm, a distributed transaction framework.
The code of this library is fully synchronised with the dtmgrpc directory under dtm. There will be very few dependencies associated with the current dtmgrpc and smaller size for the final binary file.
For detailed documentation and usage, please refer to dtm
a complete sample
# Functions
AddUnaryInterceptor adds grpc.UnaryClientInterceptor.
BarrierFromGrpc generate a Barrier from grpc context.
DtmError2GrpcError translate dtm error to grpc error.
GrpcError2DtmError translate grpc error to dtm error.
MustGenGid must gen a gid from grpcServer.
NewMsgGrpc create new msg.
NewSagaGrpc create a saga.
TccFromGrpc tcc from request info.
TccGlobalTransaction begin a tcc global transaction dtm dtm server url gid global transaction id tccFunc tcc busi func, define the transaction logic.
TccGlobalTransaction2 new version of TccGlobalTransaction.
UseDriver use the specified driver to handle grpc urls.
XaGlobalTransaction start a xa global transaction.
XaGlobalTransaction2 new version of XaGlobalTransaction.
XaGrpcFromRequest construct xa info from request.
XaLocalTransaction start a xa local transaction.
# Type aliases
TccGlobalFunc type of global tcc call.
XaGrpcGlobalFunc type of xa global function.
XaGrpcLocalFunc type of xa local function.