package
1.17.3
Repository: https://github.com/dtm-labs/client.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

BarrierFrom construct transaction info from request.
BarrierFromQuery construct transaction info from request.
ErrorMessage2Error return an error fmt.Errorf("%s %w", errMsg, err) but trim out duplicate wrap eg.
GetCurrentDBType get currentDBType.
GetRestyClient get the resty.Client for http request.
GetRestyClient2 get the resty.Client with the specified timeout set.
HTTPResp2DtmError translate a resty response to error compatible with version < v1.10.
MustGenGid generate a new gid.
NewMsg create new msg.
NewSaga create a saga.
Result2HttpJSON return the http code and json result if result is error, the return proper code, else return StatusOK.
SetBarrierTableName sets barrier table name.
SetCurrentDBType set currentDBType.
TccFromQuery tcc from request info.
TccGlobalTransaction begin a tcc global transaction dtm dtm server address gid global transaction ID tccFunc define the detail tcc busi.
TccGlobalTransaction2 new version of TccGlobalTransaction, add custom param.
XaFromQuery construct xa info from request.
XaGlobalTransaction start a xa global transaction.
XaGlobalTransaction2 start a xa global transaction with xa custom function.
XaLocalTransaction start a xa local transaction.

# Constants

DBTypeMysql const for driver mysql.
DBTypePostgres const for driver postgres.
ResultFailure for result of a trans/trans branch.
ResultOngoing for result of a trans/trans branch.
ResultSuccess for result of a trans/trans branch.
StatusAborting status for global trans status.
StatusFailed status for global/branch trans status.
StatusPrepared status for global/branch trans status.
StatusSubmitted status for global trans status.
StatusSucceed status for global/branch trans status.

# Variables

ErrDuplicated error of DUPLICATED for only msg if QueryPrepared executed before call.
ErrFailure error for returned failure.
ErrOngoing error for returned ongoing.
MapFailure HTTP result of FAILURE.
MapSuccess HTTP result of SUCCESS.

# Structs

BranchBarrier every branch info.
Msg reliable msg type.
Saga struct of saga.
Tcc struct of tcc.
Xa xa transaction.

# Type aliases

BarrierBusiFunc type for busi func.
DB interface.
DBConf declares db configuration.
TccGlobalFunc type of global tcc call.
TransOptions transaction option.
XaGlobalFunc type of xa global function.
XaLocalFunc type of xa local function.