🔥A cross-language distributed transaction manager. Support xa, tcc, saga, transactional messages. 跨语言分布式事务管理器
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.
 
 
 
 
 
 

54 lines
1.7 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 dtmcli
import (
"github.com/dtm-labs/dtm/client/dtmcli/dtmimp"
)
const (
// StatusPrepared status for global/branch trans status.
// first step, tx preparation period
StatusPrepared = "prepared"
// StatusSubmitted status for global trans status.
StatusSubmitted = "submitted"
// StatusSucceed status for global/branch trans status.
StatusSucceed = "succeed"
// StatusFailed status for global/branch trans status.
// NOTE: change global status to failed can stop trigger (Not recommended in production env)
StatusFailed = "failed"
// StatusAborting status for global trans status.
StatusAborting = "aborting"
// ResultSuccess for result of a trans/trans branch
ResultSuccess = dtmimp.ResultSuccess
// ResultFailure for result of a trans/trans branch
ResultFailure = dtmimp.ResultFailure
// ResultOngoing for result of a trans/trans branch
ResultOngoing = dtmimp.ResultOngoing
// DBTypeMysql const for driver mysql
DBTypeMysql = dtmimp.DBTypeMysql
// DBTypePostgres const for driver postgres
DBTypePostgres = dtmimp.DBTypePostgres
)
// MapSuccess HTTP result of SUCCESS
var MapSuccess = dtmimp.MapSuccess
// MapFailure HTTP result of FAILURE
var MapFailure = dtmimp.MapFailure
// ErrFailure error for returned failure
var ErrFailure = dtmimp.ErrFailure
// ErrOngoing error for returned ongoing
var ErrOngoing = dtmimp.ErrOngoing
// ErrDuplicated error of DUPLICATED for only msg
// if QueryPrepared executed before call. then DoAndSubmit return this error
var ErrDuplicated = dtmimp.ErrDuplicated