mirror of https://github.com/dtm-labs/dtm.git
csharpjavadistributed-transactionsdtmgogolangmicroservicenodejsphpdatabasesagaseatatcctransactiontransactionsxapythondistributed
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.6 KiB
58 lines
1.6 KiB
/*
|
|
* Copyright (c) 2021 yedf. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style
|
|
* license that can be found in the LICENSE file.
|
|
*/
|
|
|
|
package dtmimp
|
|
|
|
const (
|
|
// ResultFailure for result of a trans/trans branch
|
|
// Same as HTTP status 409 and GRPC code 10
|
|
ResultFailure = "FAILURE"
|
|
// ResultSuccess for result of a trans/trans branch
|
|
// Same as HTTP status 200 and GRPC code 0
|
|
ResultSuccess = "SUCCESS"
|
|
// ResultOngoing for result of a trans/trans branch
|
|
// Same as HTTP status 425 and GRPC code 9
|
|
ResultOngoing = "ONGOING"
|
|
|
|
// OpTry branch type for TCC
|
|
OpTry = "try"
|
|
// OpConfirm branch type for TCC
|
|
OpConfirm = "confirm"
|
|
// OpCancel branch type for TCC
|
|
OpCancel = "cancel"
|
|
// OpAction branch type for message, SAGA, XA
|
|
OpAction = "action"
|
|
// OpCompensate branch type for SAGA
|
|
OpCompensate = "compensate"
|
|
// OpCommit branch type for XA
|
|
OpCommit = "commit"
|
|
// OpRollback branch type for XA
|
|
OpRollback = "rollback"
|
|
|
|
// DBTypeMysql const for driver mysql
|
|
DBTypeMysql = "mysql"
|
|
// DBTypePostgres const for driver postgres
|
|
DBTypePostgres = "postgres"
|
|
// DBTypeRedis const for driver redis
|
|
DBTypeRedis = "redis"
|
|
// Jrpc const for json-rpc
|
|
Jrpc = "json-rpc"
|
|
// JrpcCodeFailure const for json-rpc failure
|
|
JrpcCodeFailure = -32901
|
|
|
|
// JrpcCodeOngoing const for json-rpc ongoing
|
|
JrpcCodeOngoing = -32902
|
|
|
|
// MsgDoBranch0 const for DoAndSubmit barrier branch
|
|
MsgDoBranch0 = "00"
|
|
// MsgDoBarrier1 const for DoAndSubmit barrier barrierID
|
|
MsgDoBarrier1 = "01"
|
|
// MsgDoOp const for DoAndSubmit barrier op
|
|
MsgDoOp = "msg"
|
|
|
|
// XaBarrier1 const for xa barrier id
|
|
XaBarrier1 = "01"
|
|
)
|
|
|